[css-grid] Let abspos items reference implicit grid lines
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2019 17:32:24 +0000 (17:32 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 10 Jan 2019 17:32:24 +0000 (17:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=193313

Patch by Oriol Brufau <obrufau@igalia.com> on 2019-01-10
Reviewed by Manuel Rego Casasnovas.

LayoutTests/imported/w3c:

Import test changes from WPT.

* web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html:
* web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html:

Source/WebCore:

While they can't create new implicit grid lines, abspos items
can reference existing ones as clarified in
https://github.com/w3c/csswg-drafts/commit/511bb63

This patch makes WebKit match Blink, Firefox and Edge.

Tests: web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html
       web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid const):
Remove argument from spanSizeForAutoPlacedItem call.
(WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):
Don't treat implicit grid lines as 'auto'.
* rendering/RenderGrid.h:
Remove unused gridPositionIsAutoForOutOfFlow.
* rendering/style/GridPositionsResolver.cpp:
(WebCore::adjustGridPositionsFromStyle):
Don't treat implicit grid lines as 'auto'.
Remove unused gridContainerStyle parameter.
(WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
Remove argument from adjustGridPositionsFromStyle call.
Remove unused gridContainerStyle parameter.
(WebCore::resolveGridPositionFromStyle):
Remove unnecessary assert that uses isValidNamedLineOrArea.
(WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
Remove argument from adjustGridPositionsFromStyle call.
* rendering/style/GridPositionsResolver.h:
Remove unused isValidNamedLineOrArea.
Remove unused parameter from spanSizeForAutoPlacedItem.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239831 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html
LayoutTests/imported/w3c/web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html
Source/WebCore/ChangeLog
Source/WebCore/rendering/RenderGrid.cpp
Source/WebCore/rendering/RenderGrid.h
Source/WebCore/rendering/style/GridPositionsResolver.cpp
Source/WebCore/rendering/style/GridPositionsResolver.h

index 8a81f1f..0fd799d 100644 (file)
@@ -1,3 +1,15 @@
+2019-01-10  Oriol Brufau  <obrufau@igalia.com>
+
+        [css-grid] Let abspos items reference implicit grid lines
+        https://bugs.webkit.org/show_bug.cgi?id=193313
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        Import test changes from WPT.
+
+        * web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html:
+        * web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html:
+
 2019-01-10  cathie chen  <cathiechen@igalia.com>
 
         Import css-lists testcases from WPT.
index 4941d77..643a688 100644 (file)
 
 <div class="grid">
   <div class="absolute" style="grid-column: foo / 1; grid-row: foo / 1;"
-    data-offset-x="0" data-offset-y="0" data-expected-width="15" data-expected-height="15">
+    data-offset-x="15" data-offset-y="15" data-expected-width="515" data-expected-height="315">
   </div>
   <div class="absolute" style="grid-column: 1 / 2; grid-row: foo / 1;"
-    data-offset-x="15" data-offset-y="0" data-expected-width="100" data-expected-height="15">
+    data-offset-x="15" data-offset-y="15" data-expected-width="100" data-expected-height="315">
   </div>
   <div class="absolute" style="grid-column: foo / 1; grid-row: 1 / 2;"
-    data-offset-x="0" data-offset-y="15" data-expected-width="15" data-expected-height="50">
+    data-offset-x="15" data-offset-y="15" data-expected-width="515" data-expected-height="50">
   </div>
   <div class="absolute" style="grid-column: 3 / foo; grid-row: 3 / foo;"
     data-offset-x="315" data-offset-y="215" data-expected-width="215" data-expected-height="115">
 
 <div class="grid directionRTL">
   <div class="absolute" style="grid-column: foo / 1; grid-row: foo / 1;"
-    data-offset-x="515" data-offset-y="0" data-expected-width="15" data-expected-height="15">
+    data-offset-x="0" data-offset-y="15" data-expected-width="515" data-expected-height="315">
   </div>
   <div class="absolute" style="grid-column: 1 / 2; grid-row: foo / 1;"
-    data-offset-x="415" data-offset-y="0" data-expected-width="100" data-expected-height="15">
+    data-offset-x="415" data-offset-y="15" data-expected-width="100" data-expected-height="315">
   </div>
   <div class="absolute" style="grid-column: foo / 1; grid-row: 1 / 2;"
-    data-offset-x="515" data-offset-y="15" data-expected-width="15" data-expected-height="50">
+    data-offset-x="0" data-offset-y="15" data-expected-width="515" data-expected-height="50">
   </div>
   <div class="absolute" style="grid-column: 3 / foo; grid-row: 3 / foo;"
     data-offset-x="0" data-offset-y="215" data-expected-width="215" data-expected-height="115">
index 24d9d76..6e61f7c 100644 (file)
@@ -3,7 +3,7 @@
 <title>CSS Grid Layout Test: Grid positioned items unknown named grid line</title>
 <link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
 <link rel="help" href="https://drafts.csswg.org/css-grid-1/#abspos" title="9. Absolute Positioning">
-<meta name="assert" content="This test checks that grid placement properties of absolutely positioned items using unknown named grid lines are treated as 'auto'.">
+<meta name="assert" content="This test checks that grid placement properties of absolutely positioned items can reference implicit grid lines.">
 <link rel="stylesheet" href="support/grid.css">
 <style>
 
@@ -58,7 +58,7 @@
     data-offset-x="15" data-offset-y="15" data-expected-width="515" data-expected-height="315">
   </div>
   <div class="absolute sizedToGridArea startUnknownLine"
-    data-offset-x="0" data-offset-y="0" data-expected-width="315" data-expected-height="215">
+    data-offset-x="315" data-offset-y="215" data-expected-width="215" data-expected-height="115">
   </div>
 </div>
 
@@ -70,7 +70,7 @@
     data-offset-x="0" data-offset-y="15" data-expected-width="515" data-expected-height="315">
   </div>
   <div class="absolute sizedToGridArea startUnknownLine"
-    data-offset-x="215" data-offset-y="0" data-expected-width="315" data-expected-height="215">
+    data-offset-x="0" data-offset-y="215" data-expected-width="215" data-expected-height="115">
   </div>
 </div>
 
index 8cf3a3a..4b9c17a 100644 (file)
@@ -1,3 +1,47 @@
+2019-01-10  Oriol Brufau  <obrufau@igalia.com>
+
+        [css-grid] Let abspos items reference implicit grid lines
+        https://bugs.webkit.org/show_bug.cgi?id=193313
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        While they can't create new implicit grid lines, abspos items
+        can reference existing ones as clarified in
+        https://github.com/w3c/csswg-drafts/commit/511bb63
+
+        This patch makes WebKit match Blink, Firefox and Edge.
+
+        Tests: web-platform-tests/css/css-grid/abspos/grid-positioned-items-padding-001.html
+               web-platform-tests/css/css-grid/abspos/grid-positioned-items-unknown-named-grid-line-001.html
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::populateExplicitGridAndOrderIterator const):
+        Remove argument from spanSizeForAutoPlacedItem call.
+        (WebCore::RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOutsideGrid const):
+        Remove argument from spanSizeForAutoPlacedItem call.
+        (WebCore::RenderGrid::placeSpecifiedMajorAxisItemsOnGrid const):
+        Remove argument from spanSizeForAutoPlacedItem call.
+        (WebCore::RenderGrid::placeAutoMajorAxisItemOnGrid const):
+        Remove argument from spanSizeForAutoPlacedItem call.
+        (WebCore::RenderGrid::gridAreaBreadthForOutOfFlowChild):
+        Don't treat implicit grid lines as 'auto'.
+        * rendering/RenderGrid.h:
+        Remove unused gridPositionIsAutoForOutOfFlow.
+        * rendering/style/GridPositionsResolver.cpp:
+        (WebCore::adjustGridPositionsFromStyle):
+        Don't treat implicit grid lines as 'auto'.
+        Remove unused gridContainerStyle parameter.
+        (WebCore::GridPositionsResolver::spanSizeForAutoPlacedItem):
+        Remove argument from adjustGridPositionsFromStyle call.
+        Remove unused gridContainerStyle parameter.
+        (WebCore::resolveGridPositionFromStyle):
+        Remove unnecessary assert that uses isValidNamedLineOrArea.
+        (WebCore::GridPositionsResolver::resolveGridPositionsFromStyle):
+        Remove argument from adjustGridPositionsFromStyle call.
+        * rendering/style/GridPositionsResolver.h:
+        Remove unused isValidNamedLineOrArea.
+        Remove unused parameter from spanSizeForAutoPlacedItem.
+
 2019-01-09  Matt Rajca  <mrajca@apple.com>
 
         Put per-document autoplay behavior behind runtime website policies quirk instead of a compile time flag
index 35a610b..357b324 100644 (file)
@@ -693,7 +693,7 @@ void RenderGrid::populateExplicitGridAndOrderIterator(Grid& grid) const
             maximumRowIndex = std::max<int>(maximumRowIndex, rowPositions.untranslatedEndLine());
         } else {
             // Grow the grid for items with a definite row span, getting the largest such span.
-            unsigned spanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(style(), *child, ForRows);
+            unsigned spanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(*child, ForRows);
             maximumRowIndex = std::max(maximumRowIndex, spanSize);
         }
 
@@ -703,7 +703,7 @@ void RenderGrid::populateExplicitGridAndOrderIterator(Grid& grid) const
             maximumColumnIndex = std::max<int>(maximumColumnIndex, columnPositions.untranslatedEndLine());
         } else {
             // Grow the grid for items with a definite column span, getting the largest such span.
-            unsigned spanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(style(), *child, ForColumns);
+            unsigned spanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(*child, ForColumns);
             maximumColumnIndex = std::max(maximumColumnIndex, spanSize);
         }
 
@@ -718,7 +718,7 @@ std::unique_ptr<GridArea> RenderGrid::createEmptyGridAreaAtSpecifiedPositionsOut
 {
     GridTrackSizingDirection crossDirection = specifiedDirection == ForColumns ? ForRows : ForColumns;
     const unsigned endOfCrossDirection = grid.numTracks(crossDirection);
-    unsigned crossDirectionSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(style(), gridItem, crossDirection);
+    unsigned crossDirectionSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(gridItem, crossDirection);
     GridSpan crossDirectionPositions = GridSpan::translatedDefiniteGridSpan(endOfCrossDirection, endOfCrossDirection + crossDirectionSpanSize);
     return std::make_unique<GridArea>(specifiedDirection == ForColumns ? crossDirectionPositions : specifiedPositions, specifiedDirection == ForColumns ? specifiedPositions : crossDirectionPositions);
 }
@@ -737,7 +737,7 @@ void RenderGrid::placeSpecifiedMajorAxisItemsOnGrid(Grid& grid, const Vector<Ren
         GridSpan majorAxisPositions = grid.gridItemSpan(*autoGridItem, autoPlacementMajorAxisDirection());
         ASSERT(majorAxisPositions.isTranslatedDefinite());
         ASSERT(grid.gridItemSpan(*autoGridItem, autoPlacementMinorAxisDirection()).isIndefinite());
-        unsigned minorAxisSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(style(), *autoGridItem, autoPlacementMinorAxisDirection());
+        unsigned minorAxisSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(*autoGridItem, autoPlacementMinorAxisDirection());
         unsigned majorAxisInitialPosition = majorAxisPositions.startLine();
 
         GridIterator iterator(grid, autoPlacementMajorAxisDirection(), majorAxisPositions.startLine(), isGridAutoFlowDense ? 0 : minorAxisCursors.get(majorAxisInitialPosition));
@@ -770,7 +770,7 @@ void RenderGrid::placeAutoMajorAxisItemsOnGrid(Grid& grid, const Vector<RenderBo
 void RenderGrid::placeAutoMajorAxisItemOnGrid(Grid& grid, RenderBox& gridItem, AutoPlacementCursor& autoPlacementCursor) const
 {
     ASSERT(grid.gridItemSpan(gridItem, autoPlacementMajorAxisDirection()).isIndefinite());
-    unsigned majorAxisSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(style(), gridItem, autoPlacementMajorAxisDirection());
+    unsigned majorAxisSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(gridItem, autoPlacementMajorAxisDirection());
 
     const unsigned endOfMajorAxis = grid.numTracks(autoPlacementMajorAxisDirection());
     unsigned majorAxisAutoPlacementCursor = autoPlacementMajorAxisDirection() == ForColumns ? autoPlacementCursor.second : autoPlacementCursor.first;
@@ -791,7 +791,7 @@ void RenderGrid::placeAutoMajorAxisItemOnGrid(Grid& grid, RenderBox& gridItem, A
         if (!emptyGridArea)
             emptyGridArea = createEmptyGridAreaAtSpecifiedPositionsOutsideGrid(grid, gridItem, autoPlacementMinorAxisDirection(), minorAxisPositions);
     } else {
-        unsigned minorAxisSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(style(), gridItem, autoPlacementMinorAxisDirection());
+        unsigned minorAxisSpanSize = GridPositionsResolver::spanSizeForAutoPlacedItem(gridItem, autoPlacementMinorAxisDirection());
 
         for (unsigned majorAxisIndex = majorAxisAutoPlacementCursor; majorAxisIndex < endOfMajorAxis; ++majorAxisIndex) {
             GridIterator iterator(grid, autoPlacementMajorAxisDirection(), majorAxisIndex, minorAxisAutoPlacementCursor);
@@ -1470,11 +1470,6 @@ LayoutUnit RenderGrid::rowAxisOffsetForChild(const RenderBox& child) const
     return 0;
 }
 
-bool RenderGrid::gridPositionIsAutoForOutOfFlow(GridPosition position, GridTrackSizingDirection direction) const
-{
-    return position.isAuto() || (position.isNamedGridArea() && !NamedLineCollection::isValidNamedLineOrArea(position.namedGridLine(), style(), GridPositionsResolver::initialPositionSide(direction)));
-}
-
 LayoutUnit RenderGrid::resolveAutoStartGridPosition(GridTrackSizingDirection direction) const
 {
     if (direction == ForRows || style().isLeftToRightDirection())
@@ -1520,8 +1515,8 @@ LayoutUnit RenderGrid::gridAreaBreadthForOutOfFlowChild(const RenderBox& child,
     GridPosition startPosition = direction == ForColumns ? child.style().gridItemColumnStart() : child.style().gridItemRowStart();
     GridPosition endPosition = direction == ForColumns ? child.style().gridItemColumnEnd() : child.style().gridItemRowEnd();
 
-    bool startIsAuto = gridPositionIsAutoForOutOfFlow(startPosition, direction) || startLine < 0 || startLine > lastLine;
-    bool endIsAuto = gridPositionIsAutoForOutOfFlow(endPosition, direction) || endLine < 0 || endLine > lastLine;
+    bool startIsAuto = startPosition.isAuto() || startLine < 0 || startLine > lastLine;
+    bool endIsAuto = endPosition.isAuto() || endLine < 0 || endLine > lastLine;
 
     if (startIsAuto && endIsAuto)
         return isRowAxis ? clientLogicalWidth() : clientLogicalHeight();
index 131a008..de3c234 100644 (file)
@@ -133,7 +133,6 @@ private:
     void layoutGridItems();
     void populateGridPositionsForDirection(GridTrackSizingDirection);
 
-    bool gridPositionIsAutoForOutOfFlow(GridPosition, GridTrackSizingDirection) const;
     LayoutUnit resolveAutoStartGridPosition(GridTrackSizingDirection) const;
     LayoutUnit resolveAutoEndGridPosition(GridTrackSizingDirection) const;
     LayoutUnit gridAreaBreadthForOutOfFlowChild(const RenderBox&, GridTrackSizingDirection);
index 24c9d38..3d99813 100644 (file)
@@ -76,19 +76,6 @@ NamedLineCollection::NamedLineCollection(const RenderStyle& gridContainerStyle,
     m_autoRepeatTrackListLength = isRowAxis ? gridContainerStyle.gridAutoRepeatColumns().size() : gridContainerStyle.gridAutoRepeatRows().size();
 }
 
-bool NamedLineCollection::isValidNamedLineOrArea(const String& namedLine, const RenderStyle& gridContainerStyle, GridPositionSide side)
-{
-    bool isRowAxis = directionFromSide(side) == ForColumns;
-    auto& gridLineNames = isRowAxis ? gridContainerStyle.namedGridColumnLines() : gridContainerStyle.namedGridRowLines();
-    auto& autoRepeatGridLineNames = isRowAxis ? gridContainerStyle.autoRepeatNamedGridColumnLines() : gridContainerStyle.autoRepeatNamedGridRowLines();
-
-    if (gridLineNames.contains(namedLine) || autoRepeatGridLineNames.contains(namedLine))
-        return true;
-
-    String implicitName = implicitNamedGridLineForSide(namedLine, side);
-    return gridLineNames.contains(implicitName) || autoRepeatGridLineNames.contains(implicitName);
-}
-
 bool NamedLineCollection::hasNamedLines() const
 {
     return m_namedLinesIndexes || m_autoRepeatNamedLinesIndexes;
@@ -148,7 +135,7 @@ unsigned NamedLineCollection::firstPosition() const
     return std::min(m_namedLinesIndexes->at(firstLine), m_autoRepeatNamedLinesIndexes->at(firstLine) + m_insertionPoint);
 }
 
-static void adjustGridPositionsFromStyle(const RenderStyle& gridContainerStyle, const RenderBox& gridItem, GridTrackSizingDirection direction, GridPosition& initialPosition, GridPosition& finalPosition)
+static void adjustGridPositionsFromStyle(const RenderBox& gridItem, GridTrackSizingDirection direction, GridPosition& initialPosition, GridPosition& finalPosition)
 {
     bool isForColumns = direction == ForColumns;
     initialPosition = isForColumns ? gridItem.style().gridItemColumnStart() : gridItem.style().gridItemRowStart();
@@ -159,15 +146,6 @@ static void adjustGridPositionsFromStyle(const RenderStyle& gridContainerStyle,
     if (initialPosition.isSpan() && finalPosition.isSpan())
         finalPosition.setAutoPosition();
 
-    if (gridItem.isOutOfFlowPositioned()) {
-        // Early detect the case of non existing named grid lines for positioned items.
-        if (initialPosition.isNamedGridArea() && !NamedLineCollection::isValidNamedLineOrArea(initialPosition.namedGridLine(), gridContainerStyle, GridPositionsResolver::initialPositionSide(direction)))
-            initialPosition.setAutoPosition();
-
-        if (finalPosition.isNamedGridArea() && !NamedLineCollection::isValidNamedLineOrArea(finalPosition.namedGridLine(), gridContainerStyle, GridPositionsResolver::finalPositionSide(direction)))
-            finalPosition.setAutoPosition();
-    }
-
     // If the grid item has an automatic position and a grid span for a named line in a given dimension, instead treat the grid span as one.
     if (initialPosition.isAuto() && finalPosition.isSpan() && !finalPosition.namedGridLine().isNull())
         finalPosition.setSpanPosition(1, String());
@@ -302,10 +280,10 @@ GridPositionSide GridPositionsResolver::finalPositionSide(GridTrackSizingDirecti
     return direction == ForColumns ? ColumnEndSide : RowEndSide;
 }
 
-unsigned GridPositionsResolver::spanSizeForAutoPlacedItem(const RenderStyle& gridContainerStyle, const RenderBox& gridItem, GridTrackSizingDirection direction)
+unsigned GridPositionsResolver::spanSizeForAutoPlacedItem(const RenderBox& gridItem, GridTrackSizingDirection direction)
 {
     GridPosition initialPosition, finalPosition;
-    adjustGridPositionsFromStyle(gridContainerStyle, gridItem, direction, initialPosition, finalPosition);
+    adjustGridPositionsFromStyle(gridItem, direction, initialPosition, finalPosition);
 
     // This method will only be used when both positions need to be resolved against the opposite one.
     ASSERT(initialPosition.shouldBeResolvedAgainstOppositePosition() && finalPosition.shouldBeResolvedAgainstOppositePosition());
@@ -357,7 +335,6 @@ static int resolveGridPositionFromStyle(const RenderStyle& gridContainerStyle, c
         if (explicitLines.hasNamedLines())
             return explicitLines.firstPosition();
 
-        ASSERT(!NamedLineCollection::isValidNamedLineOrArea(namedGridLine, gridContainerStyle, side));
         // If none of the above works specs mandate to assume that all the lines in the implicit grid have this name.
         return lastLine + 1;
     }
@@ -374,7 +351,7 @@ static int resolveGridPositionFromStyle(const RenderStyle& gridContainerStyle, c
 GridSpan GridPositionsResolver::resolveGridPositionsFromStyle(const RenderStyle& gridContainerStyle, const RenderBox& gridItem, GridTrackSizingDirection direction, unsigned autoRepeatTracksCount)
 {
     GridPosition initialPosition, finalPosition;
-    adjustGridPositionsFromStyle(gridContainerStyle, gridItem, direction, initialPosition, finalPosition);
+    adjustGridPositionsFromStyle(gridItem, direction, initialPosition, finalPosition);
 
     GridPositionSide initialSide = initialPositionSide(direction);
     GridPositionSide finalSide = finalPositionSide(direction);
index fb3311a..8ca209b 100644 (file)
@@ -48,8 +48,6 @@ class NamedLineCollection {
 public:
     NamedLineCollection(const RenderStyle&, const String& namedLine, GridTrackSizingDirection, unsigned lastLine, unsigned autoRepeatTracksCount);
 
-    static bool isValidNamedLineOrArea(const String& namedLine, const RenderStyle&, GridPositionSide);
-
     bool hasNamedLines() const;
     unsigned firstPosition() const;
 
@@ -72,7 +70,7 @@ class GridPositionsResolver {
 public:
     static GridPositionSide initialPositionSide(GridTrackSizingDirection);
     static GridPositionSide finalPositionSide(GridTrackSizingDirection);
-    static unsigned spanSizeForAutoPlacedItem(const RenderStyle&, const RenderBox&, GridTrackSizingDirection);
+    static unsigned spanSizeForAutoPlacedItem(const RenderBox&, GridTrackSizingDirection);
     static GridSpan resolveGridPositionsFromStyle(const RenderStyle&, const RenderBox&, GridTrackSizingDirection, unsigned autoRepeatTracksCount);
     static unsigned explicitGridColumnCount(const RenderStyle&, unsigned autoRepeatColumnsCount);
     static unsigned explicitGridRowCount(const RenderStyle&, unsigned autoRepeatRowsCount);