summaryrefslogtreecommitdiffstats
path: root/layout/generic/nsGridContainerFrame.cpp
diff options
context:
space:
mode:
authorGaming4JC <g4jc@hyperbola.info>2019-09-28 23:25:06 -0400
committerGaming4JC <g4jc@hyperbola.info>2019-09-28 23:47:04 -0400
commitf1adcd1eeed03591f10ecc72c5e5b71856a18ca9 (patch)
tree687b2a90bc14b1f83a38d7ba1462d647e9bb7eee /layout/generic/nsGridContainerFrame.cpp
parent22851ce36d97fca5a4768f3c49a4fff6cebd320a (diff)
downloadUXP-f1adcd1eeed03591f10ecc72c5e5b71856a18ca9.tar
UXP-f1adcd1eeed03591f10ecc72c5e5b71856a18ca9.tar.gz
UXP-f1adcd1eeed03591f10ecc72c5e5b71856a18ca9.tar.lz
UXP-f1adcd1eeed03591f10ecc72c5e5b71856a18ca9.tar.xz
UXP-f1adcd1eeed03591f10ecc72c5e5b71856a18ca9.zip
Issue #1233 - Part 2: Update Reftests
List of relevant patches applied: 1425599 part 15 - [css-grid] Test reference fixes + more tests. 1373678 Part 3: Add line number checks to test_grid_implicit.html. 1416350 - Part 3: Add test to verify line numbers of grids with leading implicit tracks. 1416350 - Part 4: Add a reftest of repeat:auto-fit grids with leading implicit tracks. 1417711 - [css-grid] An abs.pos. grid container child that only covers removed 'auto-fit' tracks should not span to the end padding edge. 1416350 - Part 5: Correct the expected results for grids that have leading implicit tracks. 1418727 part 3 - [css-grid] Reftest updates.
Diffstat (limited to 'layout/generic/nsGridContainerFrame.cpp')
-rw-r--r--layout/generic/nsGridContainerFrame.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp
index 59f58f268..054f01297 100644
--- a/layout/generic/nsGridContainerFrame.cpp
+++ b/layout/generic/nsGridContainerFrame.cpp
@@ -725,9 +725,6 @@ struct nsGridContainerFrame::LineRange
mEnd > mStart, "invalid line range");
mEnd -= aNumRemovedTracks[mEnd];
}
- if (mStart == mEnd) {
- mEnd = nsGridContainerFrame::kAutoLine;
- }
}
/**
* Return the contribution of this line range for step 2 in
@@ -5179,10 +5176,15 @@ nsGridContainerFrame::LineRange::ToPositionAndLengthForAbsPos(
: GridLineSide::eBeforeGridGap;
nscoord endPos = aTracks.GridLineEdge(mEnd, side);
*aLength = std::max(aGridOrigin + endPos, 0);
- } else {
+ } else if (MOZ_LIKELY(mStart != mEnd)) {
nscoord pos;
ToPositionAndLength(aTracks.mSizes, &pos, aLength);
*aPos = aGridOrigin + pos;
+ } else {
+ // The grid area only covers removed 'auto-fit' tracks.
+ nscoord pos = aTracks.GridLineEdge(mStart, GridLineSide::eBeforeGridGap);
+ *aPos = aGridOrigin + pos;
+ *aLength = nscoord(0);
}
}
}