From b15d020bef9fe37fb122be98d3284b008296140a Mon Sep 17 00:00:00 2001 From: Mats Palmgren Date: Mon, 30 Sep 2019 17:32:52 +0000 Subject: [PATCH] Bug 1581106 part 3 - [css-grid-2] Implement 'repeat(auto-fill, )' in subgridded axis. r=emilio Differential Revision: https://phabricator.services.mozilla.com/D46895 --HG-- extra : moz-landing-system : lando --- .../chrome/test_grid_repeat_auto_fill.html | 34 ++ layout/generic/nsGridContainerFrame.cpp | 409 +++++++++++------- .../components/style/values/generics/grid.rs | 9 +- .../subgrid/repeat-auto-fill-001-ref.html | 362 ++++++++++++++++ .../subgrid/repeat-auto-fill-001.html | 394 +++++++++++++++++ .../subgrid/repeat-auto-fill-002.html | 397 +++++++++++++++++ .../subgrid/repeat-auto-fill-003.html | 403 +++++++++++++++++ .../subgrid/repeat-auto-fill-004-ref.html | 362 ++++++++++++++++ .../subgrid/repeat-auto-fill-004.html | 397 +++++++++++++++++ .../subgrid/repeat-auto-fill-005-ref.html | 165 +++++++ .../subgrid/repeat-auto-fill-005.html | 167 +++++++ .../subgrid/repeat-auto-fill-006.html | 169 ++++++++ .../subgrid/repeat-auto-fill-007-ref.html | 167 +++++++ .../subgrid/repeat-auto-fill-007.html | 169 ++++++++ 14 files changed, 3439 insertions(+), 165 deletions(-) create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-002.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-003.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005-ref.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-006.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007-ref.html create mode 100644 testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007.html diff --git a/dom/grid/test/chrome/test_grid_repeat_auto_fill.html b/dom/grid/test/chrome/test_grid_repeat_auto_fill.html index 5f9979516270..4a558c434a91 100644 --- a/dom/grid/test/chrome/test_grid_repeat_auto_fill.html +++ b/dom/grid/test/chrome/test_grid_repeat_auto_fill.html @@ -72,6 +72,14 @@ body { .grid19 { grid-template-columns: repeat(auto-fill, [before] 1000px); } +.grid20 { + grid-column: 4 / -1; + grid-template-columns: subgrid repeat(auto-fill, [x]); +} +.grid21 { + grid-column: 4 / -1; + grid-template-columns: subgrid [a] repeat(auto-fill, [x]) [b]; +} .box { background-color: #444; @@ -511,6 +519,30 @@ function runTests() { ]; testLines("wrapper19", grid, expectedValues); + wrapper = document.getElementById("wrapper20"); + grid = wrapper.getGridFragments()[0]; + + // test starts and names + expectedValues = [ + { "names": "x" }, + { "names": "x" }, + { "names": "x" }, + { "names": "x" }, + ]; + testLines("wrapper20", grid, expectedValues); + + wrapper = document.getElementById("wrapper21"); + grid = wrapper.getGridFragments()[0]; + + // test starts and names + expectedValues = [ + { "names": "a" }, + { "names": "x" }, + { "names": "x" }, + { "names": "b" }, + ]; + testLines("wrapper21", grid, expectedValues); + SimpleTest.finish(); } @@ -566,12 +598,14 @@ function runTests() {
B
E
+
x

B
E
+
y

diff --git a/layout/generic/nsGridContainerFrame.cpp b/layout/generic/nsGridContainerFrame.cpp index fa33f567f69d..25b211b5f487 100644 --- a/layout/generic/nsGridContainerFrame.cpp +++ b/layout/generic/nsGridContainerFrame.cpp @@ -210,9 +210,9 @@ struct RepeatTrackSizingInput { const ComputedStyle* aStyle) { const auto& pos = aStyle->StylePosition(); const bool borderBoxSizing = pos->mBoxSizing == StyleBoxSizing::Border; - nscoord bp = NS_UNCONSTRAINEDSIZE; // a sentinel to calculate it only once - auto adjustForBoxSizing = - [borderBoxSizing, aWM, aAxis, aStyle, &bp](nscoord aSize) { + nscoord bp = NS_UNCONSTRAINEDSIZE; // a sentinel to calculate it only once + auto adjustForBoxSizing = [borderBoxSizing, aWM, aAxis, aStyle, + &bp](nscoord aSize) { if (!borderBoxSizing) { return aSize; } @@ -237,18 +237,18 @@ struct RepeatTrackSizingInput { nscoord& min = mMin.Size(aAxis, aWM); nscoord& size = mSize.Size(aAxis, aWM); nscoord& max = mMax.Size(aAxis, aWM); - const auto& minCoord = aAxis == eLogicalAxisInline ? pos->MinISize(aWM) - : pos->MinBSize(aWM); + const auto& minCoord = + aAxis == eLogicalAxisInline ? pos->MinISize(aWM) : pos->MinBSize(aWM); if (minCoord.ConvertsToLength()) { min = adjustForBoxSizing(minCoord.ToLength()); } - const auto& maxCoord = aAxis == eLogicalAxisInline ? pos->MaxISize(aWM) - : pos->MaxBSize(aWM); + const auto& maxCoord = + aAxis == eLogicalAxisInline ? pos->MaxISize(aWM) : pos->MaxBSize(aWM); if (maxCoord.ConvertsToLength()) { max = std::max(min, adjustForBoxSizing(maxCoord.ToLength())); } - const auto& sizeCoord = aAxis == eLogicalAxisInline ? pos->ISize(aWM) - : pos->BSize(aWM); + const auto& sizeCoord = + aAxis == eLogicalAxisInline ? pos->ISize(aWM) : pos->BSize(aWM); if (sizeCoord.ConvertsToLength()) { size = Clamp(adjustForBoxSizing(sizeCoord.ToLength()), min, max); } @@ -968,7 +968,11 @@ struct nsGridContainerFrame::TrackSizingFunctions { mRepeatAutoEnd(mRepeatAutoStart), mRepeatEndDelta(0), mHasRepeatAuto(aRepeatAutoIndex.isSome()) { - ExpandNonRepeatAutoTracks(aIsSubgrid); + MOZ_ASSERT(!mHasRepeatAuto || !aIsSubgrid, + "a track-list for a subgrid can't have an track"); + if (!aIsSubgrid) { + ExpandNonRepeatAutoTracks(); + } MOZ_ASSERT(!mHasRepeatAuto || (mExpandedTracks.Length() >= 1 && mRepeatAutoStart < mExpandedTracks.Length())); @@ -1132,21 +1136,6 @@ struct nsGridContainerFrame::TrackSizingFunctions { return std::min(numRepeatTracks, maxRepeatTracks); } - nsTArray> - GetResolvedLineNamesForComputedGridTrackInfo() const { - nsTArray> result; - for (auto& expandedLine : mExpandedLineNames) { - nsTArray line; - for (auto* chunk : expandedLine) { - for (auto& name : chunk->AsSpan()) { - line.AppendElement(name); - } - } - result.AppendElement(std::move(line)); - } - return result; - } - /** * Compute the explicit grid end line number (in a zero-based grid). * @param aGridTemplateAreasEnd 'grid-template-areas' end line in this axis @@ -1210,27 +1199,13 @@ struct nsGridContainerFrame::TrackSizingFunctions { mRepeatEndDelta = mHasRepeatAuto ? int32_t(aNumRepeatTracks) - 1 : 0; } - void ExpandNonRepeatAutoTracks(bool aIsSubgrid) { - auto lineNameLists = mTemplate.LineNameLists(aIsSubgrid); - - MOZ_ASSERT(mTrackListValues.Length() <= lineNameLists.Length()); - const NameList* nameListToMerge = nullptr; - // NOTE(emilio): We rely on std::move clearing out the array. - SmallPointerArray names; - for (size_t i = 0; i < lineNameLists.Length(); ++i) { - if (nameListToMerge) { - names.AppendElement(nameListToMerge); - nameListToMerge = nullptr; - } - names.AppendElement(&lineNameLists[i]); - if (i >= mTrackListValues.Length()) { - mExpandedLineNames.AppendElement(std::move(names)); - continue; - } + // Store mTrackListValues into mExpandedTracks with `repeat(INTEGER, ...)` + // tracks expanded. + void ExpandNonRepeatAutoTracks() { + for (size_t i = 0; i < mTrackListValues.Length(); ++i) { auto& value = mTrackListValues[i]; if (value.IsTrackSize()) { mExpandedTracks.AppendElement(MakePair(i, size_t(0))); - mExpandedLineNames.AppendElement(std::move(names)); continue; } auto& repeat = value.AsTrackRepeat(); @@ -1239,39 +1214,16 @@ struct nsGridContainerFrame::TrackSizingFunctions { mRepeatAutoStart = mExpandedTracks.Length(); mRepeatAutoEnd = mRepeatAutoStart; mExpandedTracks.AppendElement(MakePair(i, size_t(0))); - - auto repeatNames = repeat.line_names.AsSpan(); - MOZ_ASSERT(repeatNames.Length() == 2); - - names.AppendElement(&repeatNames[0]); - nameListToMerge = &repeatNames[1]; - mExpandedLineNames.AppendElement(std::move(names)); continue; } for (auto j : IntegerRange(repeat.count.AsNumber())) { Unused << j; - if (nameListToMerge) { - names.AppendElement(nameListToMerge); - nameListToMerge = nullptr; - } size_t trackSizesCount = repeat.track_sizes.Length(); - auto repeatLineNames = repeat.line_names.AsSpan(); - MOZ_ASSERT(repeatLineNames.Length() == trackSizesCount || - repeatLineNames.Length() == trackSizesCount + 1); for (auto k : IntegerRange(trackSizesCount)) { - names.AppendElement(&repeatLineNames[k]); - mExpandedLineNames.AppendElement(std::move(names)); mExpandedTracks.AppendElement(MakePair(i, k)); } - if (repeatLineNames.Length() == trackSizesCount + 1) { - nameListToMerge = &repeatLineNames[trackSizesCount]; - } } } - - if (MOZ_UNLIKELY(mExpandedLineNames.Length() > kMaxLine)) { - mExpandedLineNames.TruncateLength(kMaxLine); - } if (MOZ_UNLIKELY(mExpandedTracks.Length() > kMaxLine - 1)) { mExpandedTracks.TruncateLength(kMaxLine - 1); if (mHasRepeatAuto && mRepeatAutoStart > kMaxLine - 1) { @@ -1292,13 +1244,6 @@ struct nsGridContainerFrame::TrackSizingFunctions { // second one inside mTrackListValues' repeat value, if any, or zero // otherwise. nsTArray> mExpandedTracks; - // The expanded list of line-names. This is usually a single NameList, but can - // be multiple in the case where repeat() expands to something that has a line - // name list at the end or such thing. - // - // FIXME(emilio): This maybe shouldn't belong here, but that way we expand - // repeat() only once. - nsTArray> mExpandedLineNames; // Offset from the start of the implicit grid to the first explicit track. uint32_t mExplicitGridOffset; // The index of the repeat(auto-fill/fit) track, or zero if there is none. @@ -1340,27 +1285,123 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap { bool aIsSameDirection) : mStylePosition(aStylePosition), mAreas(aImplicitNamedAreas), - mTracks(aTracks), mRepeatAutoStart(aTracks.mRepeatAutoStart), mRepeatAutoEnd(aTracks.mRepeatAutoEnd), mRepeatEndDelta(aTracks.mRepeatEndDelta), - mTemplateLinesEnd(aTracks.mExpandedLineNames.Length() + - mRepeatEndDelta), mParentLineNameMap(aParentLineNameMap), mRange(aRange), mIsSameDirection(aIsSameDirection), mHasRepeatAuto(aTracks.mHasRepeatAuto) { - if (MOZ_UNLIKELY(aRange)) { // subgrid case + if (MOZ_UNLIKELY(aRange)) { // subgrid case mClampMinLine = 1; mClampMaxLine = 1 + aRange->Extent(); + mRepeatAutoEnd = mRepeatAutoStart; + const auto& styleSubgrid = aTracks.mTemplate.AsSubgrid(); + mHasRepeatAuto = + styleSubgrid->fill_idx != std::numeric_limits::max(); + if (mHasRepeatAuto) { + const auto& lineNameLists = styleSubgrid->names; + int32_t extraAutoFillLineCount = mClampMaxLine - lineNameLists.Length(); + mRepeatAutoStart = styleSubgrid->fill_idx; + mRepeatAutoEnd = mRepeatAutoStart + extraAutoFillLineCount + 1; + } } else { mClampMinLine = kMinLine; mClampMaxLine = kMaxLine; + if (mHasRepeatAuto) { + mTrackAutoRepeatLineNames = + aTracks.mTemplate.GetRepeatAutoValue()->line_names.AsSpan(); + } + } + ExpandRepeatLineNames(!!aRange, aTracks); + mTemplateLinesEnd = mExpandedLineNames.Length() + mRepeatEndDelta; + MOZ_ASSERT(mHasRepeatAuto || mRepeatEndDelta <= 0); + MOZ_ASSERT(!mHasRepeatAuto || aRange || + (mExpandedLineNames.Length() >= 2 && + mRepeatAutoStart <= mExpandedLineNames.Length())); + } + + // Store line names into mExpandedLineNames with `repeat(INTEGER, ...)` + // expanded (for non-subgrid), and all `repeat(...)` expanded (for subgrid). + void ExpandRepeatLineNames(bool aIsSubgrid, + const TrackSizingFunctions& aTracks) { + auto lineNameLists = aTracks.mTemplate.LineNameLists(aIsSubgrid); + + const auto& trackListValues = aTracks.mTrackListValues; + const NameList* nameListToMerge = nullptr; + // NOTE(emilio): We rely on std::move clearing out the array. + SmallPointerArray names; + uint32_t end = + std::min(lineNameLists.Length(), mClampMaxLine + 1); + for (uint32_t i = 0; i < end; ++i) { + if (aIsSubgrid) { + if (MOZ_UNLIKELY(mHasRepeatAuto && i == mRepeatAutoStart)) { + // XXX expand 'auto-fill' names for subgrid for now since HasNameAt() + // only deals with auto-repeat **tracks** currently. + for (auto j = i; j < mRepeatAutoEnd; ++j) { + names.AppendElement(&lineNameLists[i]); + mExpandedLineNames.AppendElement(std::move(names)); + } + mHasRepeatAuto = false; + } else { + names.AppendElement(&lineNameLists[i]); + mExpandedLineNames.AppendElement(std::move(names)); + } + // XXX expand repeat(, ...) line names here (bug 1583429) + continue; + } + + if (nameListToMerge) { + names.AppendElement(nameListToMerge); + nameListToMerge = nullptr; + } + names.AppendElement(&lineNameLists[i]); + if (i >= trackListValues.Length()) { + mExpandedLineNames.AppendElement(std::move(names)); + continue; + } + auto& value = trackListValues[i]; + if (value.IsTrackSize()) { + mExpandedLineNames.AppendElement(std::move(names)); + continue; + } + auto& repeat = value.AsTrackRepeat(); + if (!repeat.count.IsNumber()) { + MOZ_ASSERT(mRepeatAutoStart == mExpandedLineNames.Length()); + auto repeatNames = repeat.line_names.AsSpan(); + MOZ_ASSERT(repeatNames.Length() == 2); + + names.AppendElement(&repeatNames[0]); + nameListToMerge = &repeatNames[1]; + mExpandedLineNames.AppendElement(std::move(names)); + continue; + } + for (auto j : IntegerRange(repeat.count.AsNumber())) { + Unused << j; + if (nameListToMerge) { + names.AppendElement(nameListToMerge); + nameListToMerge = nullptr; + } + size_t trackSizesCount = repeat.track_sizes.Length(); + auto repeatLineNames = repeat.line_names.AsSpan(); + MOZ_ASSERT(repeatLineNames.Length() == trackSizesCount || + repeatLineNames.Length() == trackSizesCount + 1); + for (auto k : IntegerRange(trackSizesCount)) { + names.AppendElement(&repeatLineNames[k]); + mExpandedLineNames.AppendElement(std::move(names)); + } + if (repeatLineNames.Length() == trackSizesCount + 1) { + nameListToMerge = &repeatLineNames[trackSizesCount]; + } + } + } + + if (MOZ_UNLIKELY(mExpandedLineNames.Length() > uint32_t(mClampMaxLine))) { + mExpandedLineNames.TruncateLength(mClampMaxLine); + } + if (MOZ_UNLIKELY(mHasRepeatAuto && aIsSubgrid)) { + mHasRepeatAuto = false; // we've expanded all subgrid auto-fill lines } - MOZ_ASSERT(mHasRepeatAuto || mRepeatEndDelta == 0); - MOZ_ASSERT(!mHasRepeatAuto || - (mTracks.mExpandedLineNames.Length() >= 2 && - mRepeatAutoStart <= mTracks.mExpandedLineNames.Length())); } /** @@ -1467,6 +1508,86 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap { return false; } + // For generating line name data for devtools. + nsTArray> + GetResolvedLineNamesForComputedGridTrackInfo() const { + nsTArray> result; + for (auto& expandedLine : mExpandedLineNames) { + nsTArray line; + for (auto* chunk : expandedLine) { + for (auto& name : chunk->AsSpan()) { + line.AppendElement(name); + } + } + result.AppendElement(std::move(line)); + } + return result; + } + + nsTArray> GetExplicitLineNamesAtIndex(uint32_t aIndex) const { + nsTArray> lineNames; + auto AppendElements = + [&lineNames](const SmallPointerArray& aNames) { + for (auto* list : aNames) { + for (auto& ident : list->AsSpan()) { + lineNames.AppendElement(ident.AsAtom()); + } + } + }; + + // Note that for subgrid we already expanded auto-fill into + // mExpandedLineNames so this is intentionally null in that case. + // (and the logic that follows which merges names makes no sense + // for a subgrid line-name-list anyway) + const auto* repeatAuto = + HasRepeatAuto() && !mTrackAutoRepeatLineNames.IsEmpty() + ? &mTrackAutoRepeatLineNames + : nullptr; + const auto& lineNameLists = ExpandedLineNames(); + if (!repeatAuto || aIndex <= RepeatAutoStart()) { + if (aIndex < lineNameLists.Length()) { + AppendElements(lineNameLists[aIndex]); + } + } + + if (repeatAuto) { + const uint32_t repeatAutoStart = RepeatAutoStart(); + const uint32_t repeatTrackCount = NumRepeatTracks(); + const uint32_t repeatAutoEnd = (repeatAutoStart + repeatTrackCount); + const int32_t repeatEndDelta = int32_t(repeatTrackCount - 1); + + if (aIndex <= repeatAutoEnd && aIndex > repeatAutoStart) { + for (auto& name : (*repeatAuto)[1].AsSpan()) { + lineNames.AppendElement(name.AsAtom()); + } + } + if (aIndex < repeatAutoEnd && aIndex >= repeatAutoStart) { + for (auto& name : (*repeatAuto)[0].AsSpan()) { + lineNames.AppendElement(name.AsAtom()); + } + } + if (aIndex > repeatAutoEnd && aIndex > repeatAutoStart) { + uint32_t i = aIndex - repeatEndDelta; + if (i < lineNameLists.Length()) { + AppendElements(lineNameLists[i]); + } + } + } + + return lineNames; + } + + const nsTArray>& ExpandedLineNames() const { + return mExpandedLineNames; + } + const Span>& + TrackAutoRepeatLineNames() const { + return mTrackAutoRepeatLineNames; + } + bool HasRepeatAuto() const { return mHasRepeatAuto; } + uint32_t NumRepeatTracks() const { return mRepeatAutoEnd - mRepeatAutoStart; } + uint32_t RepeatAutoStart() const { return mRepeatAutoStart; } + // The min/max line number (1-based) for clamping. int32_t mClampMinLine; int32_t mClampMaxLine; @@ -1581,7 +1702,7 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap { // Return true if aName exists at aIndex in this map. bool HasNameAt(uint32_t aIndex, nsAtom* aName) const { auto ContainsNonAutoRepeat = [&](uint32_t aIndex) { - const auto& expanded = mTracks.mExpandedLineNames[aIndex]; + const auto& expanded = mExpandedLineNames[aIndex]; for (auto* list : expanded) { if (Contains(list->AsSpan(), aName)) { return true; @@ -1593,8 +1714,7 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap { if (!mHasRepeatAuto) { return ContainsNonAutoRepeat(aIndex); } - auto* autoRepeatValue = mTracks.mTemplate.GetRepeatAutoValue(); - auto repeat_names = autoRepeatValue->line_names.AsSpan(); + auto repeat_names = mTrackAutoRepeatLineNames; if (aIndex < mRepeatAutoEnd && aIndex >= mRepeatAutoStart && Contains(repeat_names[0].AsSpan(), aName)) { return true; @@ -1672,19 +1792,22 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap { // Some style data references, for easy access. const nsStylePosition* mStylePosition; const ImplicitNamedAreas* mAreas; - // In order to access the expanded line names. - const TrackSizingFunctions& mTracks; + // The expanded list of line-names. Each entry is usually a single NameList, + // but can be multiple in the case where repeat() expands to something that + // has a line name list at the end. + nsTArray> mExpandedLineNames; + // The repeat(auto-fill/fit) track value, if any. (always empty for subgrid) + Span> mTrackAutoRepeatLineNames; // The index of the repeat(auto-fill/fit) track, or zero if there is none. - const uint32_t mRepeatAutoStart; + uint32_t mRepeatAutoStart; // The (hypothetical) index of the last such repeat() track. - const uint32_t mRepeatAutoEnd; - // The difference between mTemplateLinesEnd and - // mTracks.mExpandedLineNames.Length(). - const int32_t mRepeatEndDelta; + uint32_t mRepeatAutoEnd; + // The difference between mTemplateLinesEnd and mExpandedLineNames.Length(). + int32_t mRepeatEndDelta; // The end of the line name lists with repeat(auto-fill/fit) tracks accounted - // for. It is equal to mTracks.mExpandedLineNames.Length() when a repeat() + // for. It is equal to mExpandedLineNames.Length() when a repeat() // track generates one track (making mRepeatEndDelta == 0). - const uint32_t mTemplateLinesEnd; + uint32_t mTemplateLinesEnd; // The parent line map, or null if this map isn't for a subgrid. const LineNameMap* mParentLineNameMap; @@ -1694,7 +1817,7 @@ class MOZ_STACK_CLASS nsGridContainerFrame::LineNameMap { const bool mIsSameDirection; // True if there is a specified repeat(auto-fill/fit) track. - const bool mHasRepeatAuto; + bool mHasRepeatAuto; }; /** @@ -2296,54 +2419,6 @@ struct nsGridContainerFrame::Tracks { return size; } - nsTArray> GetExplicitLineNamesAtIndex( - const TrackSizingFunctions& aFunctions, uint32_t aIndex) { - nsTArray> lineNames; - - auto AppendElements = - [&lineNames](const SmallPointerArray& aNames) { - for (auto* list : aNames) { - for (auto& ident : list->AsSpan()) { - lineNames.AppendElement(ident.AsAtom()); - } - } - }; - - const auto& lineNameLists = aFunctions.mExpandedLineNames; - if (!aFunctions.mHasRepeatAuto || aIndex <= aFunctions.mRepeatAutoStart) { - if (aIndex < lineNameLists.Length()) { - AppendElements(lineNameLists[aIndex]); - } - } - - if (aFunctions.mHasRepeatAuto) { - const uint32_t repeatAutoStart = aFunctions.mRepeatAutoStart; - const uint32_t repeatTrackCount = aFunctions.NumRepeatTracks(); - const uint32_t repeatAutoEnd = (repeatAutoStart + repeatTrackCount); - const int32_t repeatEndDelta = int32_t(repeatTrackCount - 1); - auto* repeatAuto = aFunctions.mTemplate.GetRepeatAutoValue(); - - if (aIndex <= repeatAutoEnd && aIndex > repeatAutoStart) { - for (auto& name : repeatAuto->line_names.AsSpan()[1].AsSpan()) { - lineNames.AppendElement(name.AsAtom()); - } - } - if (aIndex < repeatAutoEnd && aIndex >= repeatAutoStart) { - for (auto& name : repeatAuto->line_names.AsSpan()[0].AsSpan()) { - lineNames.AppendElement(name.AsAtom()); - } - } - if (aIndex > repeatAutoEnd && aIndex > repeatAutoStart) { - uint32_t i = aIndex - repeatEndDelta; - if (i < lineNameLists.Length()) { - AppendElements(lineNameLists[i]); - } - } - } - - return lineNames; - } - #ifdef DEBUG void Dump() const { for (uint32_t i = 0, len = mSizes.Length(); i < len; ++i) { @@ -7411,6 +7486,14 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext, // Now that we know column and row sizes and positions, set // the ComputedGridTrackInfo and related properties + const auto* subgrid = GetProperty(Subgrid::Prop()); + const auto* subgridColRange = subgrid && IsSubgrid(eLogicalAxisInline) + ? &subgrid->SubgridCols() + : nullptr; + + LineNameMap colLineNameMap( + gridReflowInput.mGridStyle, GetImplicitNamedAreas(), + gridReflowInput.mColFunctions, nullptr, subgridColRange, true); uint32_t colTrackCount = gridReflowInput.mCols.mSizes.Length(); nsTArray colTrackPositions(colTrackCount); nsTArray colTrackSizes(colTrackCount); @@ -7438,10 +7521,15 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext, 0, col, std::move(colTrackPositions), std::move(colTrackSizes), std::move(colTrackStates), std::move(colRemovedRepeatTracks), gridReflowInput.mColFunctions.mRepeatAutoStart, - gridReflowInput.mColFunctions - .GetResolvedLineNamesForComputedGridTrackInfo()); + colLineNameMap.GetResolvedLineNamesForComputedGridTrackInfo()); SetProperty(GridColTrackInfo(), colInfo); + const auto* subgridRowRange = subgrid && IsSubgrid(eLogicalAxisBlock) + ? &subgrid->SubgridRows() + : nullptr; + LineNameMap rowLineNameMap( + gridReflowInput.mGridStyle, GetImplicitNamedAreas(), + gridReflowInput.mRowFunctions, nullptr, subgridRowRange, true); uint32_t rowTrackCount = gridReflowInput.mRows.mSizes.Length(); nsTArray rowTrackPositions(rowTrackCount); nsTArray rowTrackSizes(rowTrackCount); @@ -7473,8 +7561,7 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext, std::move(rowTrackSizes), std::move(rowTrackStates), std::move(rowRemovedRepeatTracks), gridReflowInput.mRowFunctions.mRepeatAutoStart, - gridReflowInput.mRowFunctions - .GetResolvedLineNamesForComputedGridTrackInfo()); + rowLineNameMap.GetResolvedLineNamesForComputedGridTrackInfo()); SetProperty(GridRowTrackInfo(), rowInfo); if (prevInFlow) { @@ -7520,8 +7607,8 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext, for (col = 0; col <= gridReflowInput.mCols.mSizes.Length(); col++) { // Offset col by the explicit grid offset, to get the original names. nsTArray> explicitNames = - gridReflowInput.mCols.GetExplicitLineNamesAtIndex( - colFunctions, col - colFunctions.mExplicitGridOffset); + colLineNameMap.GetExplicitLineNamesAtIndex( + col - colFunctions.mExplicitGridOffset); columnLineNames.AppendElement(explicitNames); } @@ -7529,17 +7616,18 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext, nsTArray> colNamesFollowingRepeat; nsTArray> colBeforeRepeatAuto; nsTArray> colAfterRepeatAuto; - if (colFunctions.mHasRepeatAuto) { + // Note: the following is only used for a non-subgridded axis. + if (colLineNameMap.HasRepeatAuto()) { + MOZ_ASSERT(!colFunctions.mTemplate.IsSubgrid()); // The line name list after the repeatAutoIndex holds the line names // for the first explicit line after the repeat auto declaration. - uint32_t repeatAutoEnd = colFunctions.mRepeatAutoStart + 1; - for (auto* list : colFunctions.mExpandedLineNames[repeatAutoEnd]) { + uint32_t repeatAutoEnd = colLineNameMap.RepeatAutoStart() + 1; + for (auto* list : colLineNameMap.ExpandedLineNames()[repeatAutoEnd]) { for (auto& name : list->AsSpan()) { colNamesFollowingRepeat.AppendElement(name.AsAtom()); } } - auto names = - colFunctions.mTemplate.GetRepeatAutoValue()->line_names.AsSpan(); + auto names = colLineNameMap.TrackAutoRepeatLineNames(); for (auto& name : names[0].AsSpan()) { colBeforeRepeatAuto.AppendElement(name.AsAtom()); } @@ -7560,25 +7648,26 @@ void nsGridContainerFrame::Reflow(nsPresContext* aPresContext, for (row = 0; row <= gridReflowInput.mRows.mSizes.Length(); row++) { // Offset row by the explicit grid offset, to get the original names. nsTArray> explicitNames = - gridReflowInput.mRows.GetExplicitLineNamesAtIndex( - rowFunctions, row - rowFunctions.mExplicitGridOffset); + rowLineNameMap.GetExplicitLineNamesAtIndex( + row - rowFunctions.mExplicitGridOffset); rowLineNames.AppendElement(explicitNames); } // Get the explicit names that follow a repeat auto declaration. nsTArray> rowNamesFollowingRepeat; nsTArray> rowBeforeRepeatAuto; nsTArray> rowAfterRepeatAuto; - if (rowFunctions.mHasRepeatAuto) { + // Note: the following is only used for a non-subgridded axis. + if (rowLineNameMap.HasRepeatAuto()) { + MOZ_ASSERT(!rowFunctions.mTemplate.IsSubgrid()); // The line name list after the repeatAutoIndex holds the line names // for the first explicit line after the repeat auto declaration. - uint32_t repeatAutoEnd = rowFunctions.mRepeatAutoStart + 1; - for (auto* list : rowFunctions.mExpandedLineNames[repeatAutoEnd]) { + uint32_t repeatAutoEnd = rowLineNameMap.RepeatAutoStart() + 1; + for (auto* list : rowLineNameMap.ExpandedLineNames()[repeatAutoEnd]) { for (auto& name : list->AsSpan()) { rowNamesFollowingRepeat.AppendElement(name.AsAtom()); } } - auto names = - rowFunctions.mTemplate.GetRepeatAutoValue()->line_names.AsSpan(); + auto names = rowLineNameMap.TrackAutoRepeatLineNames(); for (auto& name : names[0].AsSpan()) { rowBeforeRepeatAuto.AppendElement(name.AsAtom()); } diff --git a/servo/components/style/values/generics/grid.rs b/servo/components/style/values/generics/grid.rs index 29f634d10fec..807136d98c4d 100644 --- a/servo/components/style/values/generics/grid.rs +++ b/servo/components/style/values/generics/grid.rs @@ -646,11 +646,8 @@ impl Parse for LineNameList { if let Ok((mut names_list, count)) = repeat_parse_result { match count { - // FIXME(emilio): we probably shouldn't expand repeat() at - // parse time for subgrid. - // - // Also this doesn't have the merging semantics that - // non-subgrid has... But maybe that's ok? + // FIXME(emilio): we shouldn't expand repeat() at + // parse time for subgrid. (bug 1583429) RepeatCount::Number(num) => line_names.extend( names_list .iter() @@ -660,6 +657,8 @@ impl Parse for LineNameList { ), RepeatCount::AutoFill if fill_idx.is_none() => { // `repeat(autof-fill, ..)` should have just one line name. + // FIXME(bug 1341507) the above comment is wrong per: + // https://drafts.csswg.org/css-grid-2/#typedef-name-repeat if names_list.len() != 1 { return Err( input.new_custom_error(StyleParseErrorKind::UnspecifiedError) diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html new file mode 100644 index 000000000000..bbf5d374589b --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001-ref.html @@ -0,0 +1,362 @@ + + + + + Reference: repeat(auto-fill, line-names) + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001.html new file mode 100644 index 000000000000..643cde377e66 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-001.html @@ -0,0 +1,394 @@ + + + + + CSS Grid Test: repeat(auto-fill, line-names) + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-002.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-002.html new file mode 100644 index 000000000000..38d0bea0d08e --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-002.html @@ -0,0 +1,397 @@ + + + + + CSS Grid Test: repeat(auto-fill, line-names) in parent subgrid + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-003.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-003.html new file mode 100644 index 000000000000..b58799bd86bd --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-003.html @@ -0,0 +1,403 @@ + + + + + CSS Grid Test: repeat(auto-fill, line-names) in orthogonal parent subgrid + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html new file mode 100644 index 000000000000..07ba960200b1 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004-ref.html @@ -0,0 +1,362 @@ + + + + + Reference: repeat(auto-fill, line-names) in RTL/LTR subgrids + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004.html new file mode 100644 index 000000000000..beacff588a2c --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-004.html @@ -0,0 +1,397 @@ + + + + + CSS Grid Test: repeat(auto-fill, line-names) in RTL/LTR subgrids + + + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005-ref.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005-ref.html new file mode 100644 index 000000000000..95976e8216d8 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005-ref.html @@ -0,0 +1,165 @@ + + + + + Reference: repeat(auto-fill / INTEGER, line-names) + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005.html new file mode 100644 index 000000000000..0cf16d47a27e --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-005.html @@ -0,0 +1,167 @@ + + + + + CSS Grid Test: repeat(auto-fill / INTEGER, line-names) + + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-006.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-006.html new file mode 100644 index 000000000000..4a16d8e4a9b9 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-006.html @@ -0,0 +1,169 @@ + + + + + CSS Grid Test: repeat(auto-fill / INTEGER, line-names) + + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007-ref.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007-ref.html new file mode 100644 index 000000000000..9bc2eeff1c7d --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007-ref.html @@ -0,0 +1,167 @@ + + + + + Reference: repeat(auto-fill / INTEGER, line-names) + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + + diff --git a/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007.html b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007.html new file mode 100644 index 000000000000..949d8296fef4 --- /dev/null +++ b/testing/web-platform/tests/css/css-grid/subgrid/repeat-auto-fill-007.html @@ -0,0 +1,169 @@ + + + + + CSS Grid Test: repeat(auto-fill / INTEGER, line-names) + + + + + + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ + +