Fix subgrid position when the gap is larger than track size.

When the subgrid gap forces a track to have a negative size, the old code was
clamping the track-size (`mBase`) to 0, but it was still placing that track at
`mPosition` that reflected its theoretical negative-size (shifting it
startwards). This patch removes that startwards shift.

Note on the tests: the existing grid-gap-011.html doesn't test the code change
around `lastTrack`. That is, we still pass the test without the position fix to
`lastTrack`. Hence I added grid-gap-012.html, which is adapted from
grid-gap-011.html, but with the subgrid gap changed to 250px (larger than the 2x
track size to test the position of the last track). Both Chrome and Safari
already pass the test.

Differential Revision: https://phabricator.services.mozilla.com/D197084

bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1841297
gecko-commit: d0a378b117e036c0bba7495151659c44c052ef13
gecko-reviewers: dholbert
diff --git a/css/css-grid/subgrid/grid-gap-012-ref.html b/css/css-grid/subgrid/grid-gap-012-ref.html
new file mode 100644
index 0000000..347fc79
--- /dev/null
+++ b/css/css-grid/subgrid/grid-gap-012-ref.html
@@ -0,0 +1,7 @@
+<!DOCTYPE HTML>
+<meta charset="utf-8">
+<title>CSS Grid Reference</title>
+<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
+
+<div style="width: 200px; height: 100px; background-color: blue; position: relative; left: 225px;"></div>
diff --git a/css/css-grid/subgrid/grid-gap-012.html b/css/css-grid/subgrid/grid-gap-012.html
new file mode 100644
index 0000000..02d9a0e
--- /dev/null
+++ b/css/css-grid/subgrid/grid-gap-012.html
@@ -0,0 +1,15 @@
+<!DOCTYPE HTML>
+<meta charset="utf-8">
+<title>CSS Grid Test: Subgrids with column gap larger than 2x the track size</title>
+<link rel="author" title="Ting-Yu Lin" href="mailto:tlin@mozilla.com">
+<link rel="author" title="Mozilla" href="https://www.mozilla.org/">
+<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1841297">
+<link rel="help" href="https://drafts.csswg.org/css-grid-2/#subgrid-item-contribution">
+<link rel="match" href="grid-gap-012-ref.html">
+
+<div style="display: grid; grid-template-columns: 100px 100px 100px; width: 300px">
+  <div style="display: grid; grid-template-columns: subgrid; gap: 250px; grid-column: span 3">
+    <div style="width: 100px; height: 100px; background-color: blue; grid-column: 2"></div>
+    <div style="width: 100px; height: 100px; background-color: blue; grid-column: 3"></div>
+  </div>
+</div>