[css-grid] fit-content() tracks shouldn't stretch
authorrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2017 07:28:07 +0000 (07:28 +0000)
committerrego@igalia.com <rego@igalia.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Sep 2017 07:28:07 +0000 (07:28 +0000)
https://bugs.webkit.org/show_bug.cgi?id=177300

Reviewed by Sergio Villar Senin.

LayoutTests/imported/w3c:

Imported a new test in WPT covering several cases for this issue.

* web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001-expected.txt: Added.
* web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html: Added.
* web-platform-tests/css/css-grid-1/alignment/w3c-import.log:

Source/WebCore:

The spec is pretty clear regarding this
(https://drafts.csswg.org/css-grid/#algo-stretch):
  "This step sizes expands tracks that have an auto max track sizing
   function by dividing any remaining positive, definite free space
   equally amongst them."

The fit-content() tracks don't have an auto max track sizing function,
so they shouldn't be considered in this step of the algorithm.

The patch modifies GridTrackSizingAlgorithm::initializeTrackSizes()
so it doesn't consider fit-content() tracks as auto sized ones
(which are the ones later stretched in the last step of the algorithm).

Test: imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html

* rendering/GridTrackSizingAlgorithm.cpp:
(WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
(WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
(WebCore::GridTrackSizingAlgorithm::setup):
(WebCore::GridTrackSizingAlgorithm::reset):
* rendering/GridTrackSizingAlgorithm.h:

LayoutTests:

Added new case to an existent test and also modified
the expected result in another one.

* fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks-expected.txt:
* fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html:
* fast/css-grid-layout/grid-intrinsic-maximums-expected.html:

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

LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks-expected.txt
LayoutTests/fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html
LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/w3c-import.log
Source/WebCore/ChangeLog
Source/WebCore/rendering/GridTrackSizingAlgorithm.cpp
Source/WebCore/rendering/GridTrackSizingAlgorithm.h

index 270794e..8d330b5 100644 (file)
@@ -1,3 +1,17 @@
+2017-09-25  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [css-grid] fit-content() tracks shouldn't stretch
+        https://bugs.webkit.org/show_bug.cgi?id=177300
+
+        Reviewed by Sergio Villar Senin.
+
+        Added new case to an existent test and also modified
+        the expected result in another one.
+
+        * fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks-expected.txt:
+        * fast/css-grid-layout/grid-content-alignment-stretch-only-valid-for-auto-sized-tracks.html:
+        * fast/css-grid-layout/grid-intrinsic-maximums-expected.html:
+
 2017-09-24  Joanmarie Diggs  <jdiggs@igalia.com>
 
         [ATK] Object attributes are missing for ARIA live region roles
index 2394940..458e4b1 100644 (file)
@@ -21,3 +21,10 @@ PASS
 cols: 'minmax(auto, max-content)' | rows: 'minmax(auto, max-content)' | definite-sized container | definite-sized items
 
 PASS
+cols: 'fit-content(40px)' | rows: 'fit-content(20px)' | definite-sized container | content-sized items
+
+X XX XX X
+X XX XX X
+X XX XX X
+X XX XX X
+PASS
index b27e028..8f41ed1 100644 (file)
@@ -42,6 +42,7 @@ body {
 .minMaxWithMaxContentTracks { grid: minmax(20px, max-content) minmax(20px, max-content) / minmax(20px, max-content) minmax(20px, max-content); }
 .minMaxWithMinContentTracks { grid: minmax(20px, min-content) minmax(20px, min-content) / minmax(20px, min-content) minmax(20px, min-content); }
 .minMaxWithMinAutoTracks { grid: minmax(auto, max-content) minmax(auto, max-content) / minmax(auto, max-content) minmax(auto, max-content); }
+.fitContentTracks { grid: fit-content(20px) fit-content(20px) / fit-content(40px) fit-content(40px); font: 10px/1 Ahem; }
 
 </style>
 </head>
@@ -119,5 +120,15 @@ body {
     </div>
 </div>
 
+<div style="position: relative">
+    <p>cols: 'fit-content(40px)' | rows: 'fit-content(20px)' | definite-sized container | content-sized items</p>
+    <div class="grid contentStretch itemsStart definiteSize fitContentTracks" data-expected-width="200" data-expected-height="300">
+        <div class="firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="40" data-expected-height="20">X XX XX X</div>
+        <div class="firstRowSecondColumn" data-offset-x="40" data-offset-y="0" data-expected-width="40" data-expected-height="20">X XX XX X</div>
+        <div class="secondRowFirstColumn" data-offset-x="0" data-offset-y="20" data-expected-width="40" data-expected-height="20">X XX XX X</div>
+        <div class="secondRowSecondColumn" data-offset-x="40" data-offset-y="20" data-expected-width="40" data-expected-height="20">X XX XX X</div>
+    </div>
+</div>
+
 </body>
 </html>
index bd883b2..d07d72b 100644 (file)
 
 <div class="float">
 
-<div class="grid" style="grid-template: 20px / calc(60px - 15px/2) 5px calc(25px + 35px/2);">
+<div class="grid" style="grid-template: 20px / calc(10px + (90px - 15px)/2) 5px calc((90px - 15px)/2 + 10px);">
     <div class="item" style="min-width: 15px;">XXXX XXXX</div>
     <div class="abs col1"></div>
     <div class="abs col2"></div>
     <div class="abs col3"></div>
 </div>
 
-<div class="grid" style="grid-template: 20px / calc(60px + 25px/2) 5px calc(25px - 5px/2);">
+<div class="grid" style="grid-template: 20px / calc(50px + (90px - 55px)/2) 5px calc((90px - 55px)/2 + 10px);">
     <div class="item" style="min-width: 55px;">XXXX XXXX</div>
     <div class="abs col1"></div>
     <div class="abs col2"></div>
     <div class="abs col3"></div>
 </div>
 
-<div class="grid" style="grid-template: 20px / 90px 5px 5px;">
+<div class="grid" style="grid-template: 20px / 85px 5px 10px;">
     <div class="item min-width-max-content">XXXX XXXX</div>
     <div class="abs col1"></div>
     <div class="abs col2"></div>
index 082327e..707a954 100644 (file)
@@ -1,3 +1,16 @@
+2017-09-25  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [css-grid] fit-content() tracks shouldn't stretch
+        https://bugs.webkit.org/show_bug.cgi?id=177300
+
+        Reviewed by Sergio Villar Senin.
+
+        Imported a new test in WPT covering several cases for this issue.
+
+        * web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001-expected.txt: Added.
+        * web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html: Added.
+        * web-platform-tests/css/css-grid-1/alignment/w3c-import.log:
+
 2017-09-22  Chris Dumez  <cdumez@apple.com>
 
         Use high resolution timestamp for event time
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001-expected.txt
new file mode 100644 (file)
index 0000000..cfcaee3
--- /dev/null
@@ -0,0 +1,115 @@
+
+PASS .grid 1 
+PASS .grid 2 
+PASS .grid 3 
+PASS .grid 4 
+PASS .grid 5 
+PASS .grid 6 
+PASS .grid 7 
+PASS .grid 8 
+PASS .grid 9 
+PASS .grid 10 
+PASS .grid 11 
+PASS .grid 12 
+PASS .grid 13 
+PASS .grid 14 
+PASS .grid 15 
+PASS .grid 16 
+PASS .grid 17 
+PASS .grid 18 
+PASS .grid 19 
+PASS .grid 20 
+PASS .grid 21 
+PASS .grid 22 
+PASS .grid 23 
+PASS .grid 24 
+PASS .grid 25 
+PASS .grid 26 
+PASS .grid 27 
+PASS .grid 28 
+PASS .grid 29 
+PASS .grid 30 
+PASS .grid 31 
+PASS .grid 32 
+PASS .grid 33 
+PASS .grid 34 
+PASS .grid 35 
+PASS .grid 36 
+1) place-content: normal
+
+1.2) Unconstrained grid container
+
+X
+XXXX XXX XX X
+X
+XXXX XXX XX X
+XXXXXXXXX X
+XX
+X
+X
+X
+X
+1.2) Constrained grid container
+
+X
+XXXX XXX XX X
+X
+XXXX XXX XX X
+XXXXXXXXX X
+XX
+X
+X
+X
+X
+2) place-content: stretch
+
+2.2) Unconstrained grid container
+
+X
+XXXX XXX XX X
+X
+XXXX XXX XX X
+XXXXXXXXX X
+XX
+X
+X
+X
+X
+2.2) Constrained grid container
+
+X
+XXXX XXX XX X
+X
+XXXX XXX XX X
+XXXXXXXXX X
+XX
+X
+X
+X
+X
+3) place-content: start
+
+3.1) Unconstrained grid container
+
+X
+XXXX XXX XX X
+X
+XXXX XXX XX X
+XXXXXXXXX X
+XX
+X
+X
+X
+X
+3.2) Constrained grid container
+
+X
+XXXX XXX XX X
+X
+XXXX XXX XX X
+XXXXXXXXX X
+XX
+X
+X
+X
+X
diff --git a/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html b/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html
new file mode 100644 (file)
index 0000000..367386c
--- /dev/null
@@ -0,0 +1,208 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>CSS Grid Layout Test: fit-content() tracks don't stretch</title>
+<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#track-sizing" title="7.2. Explicit Track Sizing: the grid-template-rows and grid-template-columns properties">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#grid-align" title="10.5. Aligning the Grid: the justify-content and align-content properties">
+<link rel="help" href="https://drafts.csswg.org/css-grid-1/#algo-stretch" title="11.8. Stretch auto Tracks">
+<meta name="flags" content="ahem dom">
+<meta name="assert" content="This test checks that 'fit-content()' tracks behave the same with 'normal', 'stretch' or 'start' values for content distribution properties.">
+
+<style>
+.grid {
+  display: grid;
+  width: 400px;
+  height: 200px;
+  font: 25px/1 Ahem;
+}
+
+.constrainedGrid {
+  width: 20px;
+  height: 10px;
+}
+
+.fitContent200x100 {
+  grid-template-columns: fit-content(200px);
+  grid-template-rows: fit-content(100px);
+}
+
+.placeContentStretch {
+  place-content: stretch;
+}
+
+.placeContentStart {
+  place-content: start;
+}
+</style>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="../support/check-layout-th.js"></script>
+
+<body onLoad="checkLayout('.grid');">
+
+<div id="log"></div>
+
+<h1>1) place-content: normal</h1>
+
+<h2>1.2) Unconstrained grid container</h2>
+
+<div class="grid" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="400" data-expected-height="200">X</div>
+</div>
+
+<div class="grid" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="400" data-expected-height="200">XXXX XXX XX X</div>
+</div>
+
+<div class="grid fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="200" data-expected-height="50">XXXX XXX XX X</div>
+</div>
+
+<div class="grid fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="225" data-expected-height="50">XXXXXXXXX X</div>
+</div>
+
+<div class="grid fitContent200x100" data-expected-width="400" data-expected-height="200">
+    <div data-expected-width="50" data-expected-height="125">XX<br>X<br>X<br>X<br>X</div>
+</div>
+
+<h2>1.2) Constrained grid container</h2>
+
+<div class="grid constrainedGrid" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid constrainedGrid" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="100" data-expected-height="75">XXXX XXX XX X</div>
+</div>
+
+<div class="grid constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="100" data-expected-height="75">XXXX XXX XX X</div>
+</div>
+
+<div class="grid constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="225" data-expected-height="50">XXXXXXXXX X</div>
+</div>
+
+<div class="grid constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+    <div data-expected-width="50" data-expected-height="125">XX<br>X<br>X<br>X<br>X</div>
+</div>
+
+<h1>2) place-content: stretch</h1>
+
+<h2>2.2) Unconstrained grid container</h2>
+
+<div class="grid placeContentStretch" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="400" data-expected-height="200">X</div>
+</div>
+
+<div class="grid placeContentStretch" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="400" data-expected-height="200">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStretch fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStretch fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="200" data-expected-height="50">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStretch fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="225" data-expected-height="50">XXXXXXXXX X</div>
+</div>
+
+<div class="grid placeContentStretch fitContent200x100" data-expected-width="400" data-expected-height="200">
+    <div data-expected-width="50" data-expected-height="125">XX<br>X<br>X<br>X<br>X</div>
+</div>
+
+<h2>2.2) Constrained grid container</h2>
+
+<div class="grid placeContentStretch constrainedGrid" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStretch constrainedGrid" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="100" data-expected-height="75">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStretch constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStretch constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="100" data-expected-height="75">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStretch constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="225" data-expected-height="50">XXXXXXXXX X</div>
+</div>
+
+<div class="grid placeContentStretch constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+    <div data-expected-width="50" data-expected-height="125">XX<br>X<br>X<br>X<br>X</div>
+</div>
+
+<h1>3) place-content: start</h1>
+
+<h2>3.1) Unconstrained grid container</h2>
+
+<div class="grid placeContentStart" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStart" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="325" data-expected-height="25">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStart fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStart fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="200" data-expected-height="50">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStart fitContent200x100" data-expected-width="400" data-expected-height="200">
+  <div data-expected-width="225" data-expected-height="50">XXXXXXXXX X</div>
+</div>
+
+<div class="grid placeContentStart fitContent200x100" data-expected-width="400" data-expected-height="200">
+    <div data-expected-width="50" data-expected-height="125">XX<br>X<br>X<br>X<br>X</div>
+</div>
+
+<h2>3.2) Constrained grid container</h2>
+
+<div class="grid placeContentStart constrainedGrid" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStart constrainedGrid" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="100" data-expected-height="75">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStart constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="25" data-expected-height="25">X</div>
+</div>
+
+<div class="grid placeContentStart constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="100" data-expected-height="75">XXXX XXX XX X</div>
+</div>
+
+<div class="grid placeContentStart constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+  <div data-expected-width="225" data-expected-height="50">XXXXXXXXX X</div>
+</div>
+
+<div class="grid placeContentStart constrainedGrid fitContent200x100" data-expected-width="20" data-expected-height="10">
+    <div data-expected-width="50" data-expected-height="125">XX<br>X<br>X<br>X<br>X</div>
+</div>
+
+</body>
index b8fa71e..74e7fcc 100644 (file)
@@ -148,6 +148,7 @@ List of files:
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-content-distribution-with-collapsed-tracks-023.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-content-distribution-with-collapsed-tracks-024-expected.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-content-distribution-with-collapsed-tracks-024.html
+/LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-001.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-002.html
 /LayoutTests/imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-self-alignment-stretch-003.html
index e929a8a..6a60f71 100644 (file)
@@ -1,3 +1,32 @@
+2017-09-25  Manuel Rego Casasnovas  <rego@igalia.com>
+
+        [css-grid] fit-content() tracks shouldn't stretch
+        https://bugs.webkit.org/show_bug.cgi?id=177300
+
+        Reviewed by Sergio Villar Senin.
+
+        The spec is pretty clear regarding this
+        (https://drafts.csswg.org/css-grid/#algo-stretch):
+          "This step sizes expands tracks that have an auto max track sizing
+           function by dividing any remaining positive, definite free space
+           equally amongst them."
+
+        The fit-content() tracks don't have an auto max track sizing function,
+        so they shouldn't be considered in this step of the algorithm.
+
+        The patch modifies GridTrackSizingAlgorithm::initializeTrackSizes()
+        so it doesn't consider fit-content() tracks as auto sized ones
+        (which are the ones later stretched in the last step of the algorithm).
+
+        Test: imported/w3c/web-platform-tests/css/css-grid-1/alignment/grid-fit-content-tracks-dont-stretch-001.html
+
+        * rendering/GridTrackSizingAlgorithm.cpp:
+        (WebCore::GridTrackSizingAlgorithm::initializeTrackSizes):
+        (WebCore::GridTrackSizingAlgorithm::stretchAutoTracks):
+        (WebCore::GridTrackSizingAlgorithm::setup):
+        (WebCore::GridTrackSizingAlgorithm::reset):
+        * rendering/GridTrackSizingAlgorithm.h:
+
 2017-09-24  Antti Koivisto  <antti@apple.com>
 
         Remove CSS regions related fields from RenderStyle
index 3a3eb95..4e37aa3 100644 (file)
@@ -970,7 +970,7 @@ void GridTrackSizingAlgorithm::initializeTrackSizes()
 {
     ASSERT(m_contentSizedTracksIndex.isEmpty());
     ASSERT(m_flexibleSizedTracksIndex.isEmpty());
-    ASSERT(m_autoSizedTracksIndex.isEmpty());
+    ASSERT(m_autoSizedTracksForStretchIndex.isEmpty());
 
     Vector<GridTrack>& allTracks = tracks(m_direction);
     const bool hasDefiniteFreeSpace = !!availableSpace();
@@ -993,8 +993,8 @@ void GridTrackSizingAlgorithm::initializeTrackSizes()
             m_contentSizedTracksIndex.append(i);
         if (trackSize.maxTrackBreadth().isFlex())
             m_flexibleSizedTracksIndex.append(i);
-        if (trackSize.hasAutoMaxTrackBreadth())
-            m_autoSizedTracksIndex.append(i);
+        if (trackSize.hasAutoMaxTrackBreadth() && !trackSize.isFitContent())
+            m_autoSizedTracksForStretchIndex.append(i);
     }
 }
 
@@ -1071,7 +1071,7 @@ void GridTrackSizingAlgorithm::stretchFlexibleTracks(std::optional<LayoutUnit> f
 
 void GridTrackSizingAlgorithm::stretchAutoTracks()
 {
-    if (m_autoSizedTracksIndex.isEmpty())
+    if (m_autoSizedTracksForStretchIndex.isEmpty())
         return;
 
     auto currentFreeSpace = freeSpace(m_direction);
@@ -1082,9 +1082,9 @@ void GridTrackSizingAlgorithm::stretchAutoTracks()
         return;
 
     Vector<GridTrack>& allTracks = tracks(m_direction);
-    unsigned numberOfAutoSizedTracks = m_autoSizedTracksIndex.size();
+    unsigned numberOfAutoSizedTracks = m_autoSizedTracksForStretchIndex.size();
     LayoutUnit sizeToIncrease = currentFreeSpace.value() / numberOfAutoSizedTracks;
-    for (const auto& trackIndex : m_autoSizedTracksIndex) {
+    for (const auto& trackIndex : m_autoSizedTracksForStretchIndex) {
         auto& track = allTracks[trackIndex];
         track.setBaseSize(track.baseSize() + sizeToIncrease);
     }
@@ -1145,7 +1145,7 @@ void GridTrackSizingAlgorithm::setup(GridTrackSizingDirection direction, unsigne
 
     m_contentSizedTracksIndex.shrink(0);
     m_flexibleSizedTracksIndex.shrink(0);
-    m_autoSizedTracksIndex.shrink(0);
+    m_autoSizedTracksForStretchIndex.shrink(0);
 
     setFreeSpace(direction, freeSpace);
     tracks(direction).resize(numTracks);
@@ -1193,7 +1193,7 @@ void GridTrackSizingAlgorithm::reset()
     m_rows.shrink(0);
     m_contentSizedTracksIndex.shrink(0);
     m_flexibleSizedTracksIndex.shrink(0);
-    m_autoSizedTracksIndex.shrink(0);
+    m_autoSizedTracksForStretchIndex.shrink(0);
     setAvailableSpace(ForRows, std::nullopt);
     setAvailableSpace(ForColumns, std::nullopt);
 }
index 5bfc10d..e3e384d 100644 (file)
@@ -172,7 +172,7 @@ private:
     Vector<GridTrack> m_rows;
     Vector<unsigned> m_contentSizedTracksIndex;
     Vector<unsigned> m_flexibleSizedTracksIndex;
-    Vector<unsigned> m_autoSizedTracksIndex;
+    Vector<unsigned> m_autoSizedTracksForStretchIndex;
 
     GridTrackSizingDirection m_direction;
     SizingOperation m_sizingOperation;