<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[200821] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/200821">200821</a></dd>
<dt>Author</dt> <dd>svillar@igalia.com</dd>
<dt>Date</dt> <dd>2016-05-13 00:41:49 -0700 (Fri, 13 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Show auto-repeat line names in ComputedStyle
https://bugs.webkit.org/show_bug.cgi?id=157622

Reviewed by Darin Adler.

Source/WebCore:

Add the necessary machinery to show the named lines from auto-repeat tracks in
getComputedStyle(). A new class OrderedNamedLinesCollector was added to abstract the
retrieval of line names no matter where they come from (explicit or auto-repeat tracks).

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::OrderedNamedLinesCollector::OrderedNamedLinesCollector):
(WebCore::OrderedNamedLinesCollector::isEmpty): TRUE if we don't have named lines neither on
explicit nor auto-repeat tracks.
(WebCore::OrderedNamedLinesCollector::appendLines): Add the named lines found for a given
index to the CSSGridLineNamesValue.
(WebCore::OrderedNamedLinesCollector::collectLineNamesForIndex): Collects named lines found
for a given index.
(WebCore::addValuesForNamedGridLinesAtIndex): Use the collector to gather named lines.
(WebCore::valueForGridTrackList): Ditto.

LayoutTests:

* fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridelementautorepeatgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (200820 => 200821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-05-13 07:33:28 UTC (rev 200820)
+++ trunk/LayoutTests/ChangeLog        2016-05-13 07:41:49 UTC (rev 200821)
</span><span class="lines">@@ -1,3 +1,12 @@
</span><ins>+2016-05-12  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [css-grid] Show auto-repeat line names in ComputedStyle
+        https://bugs.webkit.org/show_bug.cgi?id=157622
+
+        Reviewed by Darin Adler.
+
+        * fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt:
+
</ins><span class="cx"> 2016-05-12  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Text shadow sometimes clipped unexpectedly
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridelementautorepeatgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt (200820 => 200821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt        2016-05-13 07:33:28 UTC (rev 200820)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-element-auto-repeat-get-set-expected.txt        2016-05-13 07:41:49 UTC (rev 200821)
</span><span class="lines">@@ -4,33 +4,33 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> Test auto-repeat syntax.
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be [foo bar] 200px [foo bar] 200px [foo bar] 200px [foo bar] 200px. Was 200px 200px 200px 200px.
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;[foo bar] 200px [foo bar] 200px [foo bar] 200px [foo bar] 200px&quot;
</ins><span class="cx"> PASS element.style.gridTemplateColumns is &quot;repeat(auto-fill, [foo bar] 200px)&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be 200px [foo bar] 200px [foo bar] 200px [foo bar]. Was 200px 200px 200px.
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;200px [foo bar] 200px [foo bar] 200px [foo bar]&quot;
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;repeat(auto-fill, 20em [foo bar])&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be [foo bar] 400px [foo bar] 400px. Was 400px 400px.
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;[foo bar] 400px [foo bar] 400px&quot;
</ins><span class="cx"> PASS element.style.gridTemplateColumns is &quot;repeat(auto-fill, [foo bar] minmax(300px, 1fr))&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be [foo] 175px [bar foo] 175px [bar foo] 175px [bar]. Was 175px 175px 175px.
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;[foo] 175px [bar foo] 175px [bar foo] 175px [bar]&quot;
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;repeat(auto-fill, [foo] minmax(175px, -webkit-max-content) [bar])&quot;
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;100px 100px 100px 250px 250px&quot;
</span><span class="cx"> PASS element.style.gridTemplateColumns is &quot;repeat(auto-fill, minmax(50px, 100px)) 250px 250px&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be 450px 50px [bar] 50px [bar foo] 10px [foo] 10px. Was 450px 50px [foo] 50px [foo] 10px 10px.
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;450px 50px [bar] 50px [bar foo] 10px [foo] 10px&quot;
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;450px repeat(auto-fill, minmax(5em, -webkit-max-content) [bar]) [foo] 1em [foo] 1em&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be [start] 80px [foo bar] 200px [foo bar] 200px [foo bar] 200px [end]. Was [start] 80px 200px [end] 200px 200px.
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;[start] 80px [foo bar] 200px [foo bar] 200px [foo bar] 200px [end]&quot;
</ins><span class="cx"> PASS element.style.gridTemplateColumns is &quot;[start] 10% repeat(auto-fill, [foo bar] 200px) [end]&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be 75px [prev] 200px [foo bar next] 150px [last end]. Was 75px [prev] 200px [next] 150px [last end].
</del><ins>+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;75px [prev] 200px [foo bar next] 150px [last end]&quot;
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;75px [prev] repeat(auto-fill, 20em [foo bar]) [next] 15em [last end]&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be none. Was 150px 150px 150px 150px 150px.
</del><ins>+FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be none. Was [foo bar] 150px [foo bar] 150px [foo bar] 150px [foo bar] 150px [foo bar] 150px.
</ins><span class="cx"> PASS element.style.gridTemplateColumns is &quot;repeat(auto-fit, [foo bar] 150px)&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be none. Was 240px 240px.
</del><ins>+FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be none. Was 240px [foo bar] 240px [foo bar].
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;repeat(auto-fit, 24em [foo bar])&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be none. Was 400px 400px.
</del><ins>+FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be none. Was [foo bar] 400px [foo bar] 400px.
</ins><span class="cx"> PASS element.style.gridTemplateColumns is &quot;repeat(auto-fit, [foo bar] minmax(270px, 1fr))&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be none. Was 200px 200px 200px.
</del><ins>+FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be none. Was [foo] 200px [bar foo] 200px [bar foo] 200px [bar].
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;repeat(auto-fit, [foo] minmax(20em, -webkit-max-content) [bar])&quot;
</span><span class="cx"> FAIL getComputedStyle(element, '').getPropertyValue('grid-template-columns') should be 20px 20px. Was 300px 300px 20px 20px.
</span><span class="cx"> PASS element.style.gridTemplateColumns is &quot;repeat(auto-fit, minmax(300px, -webkit-min-content)) 20px 20px&quot;
</span><del>-FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be 60px [foo] 10px [foo] 10px. Was 60px 300px [foo] 10px [foo] 10px.
</del><ins>+FAIL getComputedStyle(element, '').getPropertyValue('grid-template-rows') should be 60px [foo] 10px [foo] 10px. Was 60px 300px [bar foo] 10px [foo] 10px.
</ins><span class="cx"> PASS element.style.gridTemplateRows is &quot;10% repeat(auto-fit, minmax(30em, -webkit-max-content) [bar]) [foo] 1em [foo] 1em&quot;
</span><span class="cx"> 
</span><span class="cx"> Test invalid repeat syntax.
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (200820 => 200821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-13 07:33:28 UTC (rev 200820)
+++ trunk/Source/WebCore/ChangeLog        2016-05-13 07:41:49 UTC (rev 200821)
</span><span class="lines">@@ -1,3 +1,25 @@
</span><ins>+2016-05-12  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [css-grid] Show auto-repeat line names in ComputedStyle
+        https://bugs.webkit.org/show_bug.cgi?id=157622
+
+        Reviewed by Darin Adler.
+
+        Add the necessary machinery to show the named lines from auto-repeat tracks in
+        getComputedStyle(). A new class OrderedNamedLinesCollector was added to abstract the
+        retrieval of line names no matter where they come from (explicit or auto-repeat tracks).
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::OrderedNamedLinesCollector::OrderedNamedLinesCollector):
+        (WebCore::OrderedNamedLinesCollector::isEmpty): TRUE if we don't have named lines neither on
+        explicit nor auto-repeat tracks.
+        (WebCore::OrderedNamedLinesCollector::appendLines): Add the named lines found for a given
+        index to the CSSGridLineNamesValue.
+        (WebCore::OrderedNamedLinesCollector::collectLineNamesForIndex): Collects named lines found
+        for a given index.
+        (WebCore::addValuesForNamedGridLinesAtIndex): Use the collector to gather named lines.
+        (WebCore::valueForGridTrackList): Ditto.
+
</ins><span class="cx"> 2016-05-13  Tina Liu  &lt;iting_liu@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Revert r199691.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (200820 => 200821)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-05-13 07:33:28 UTC (rev 200820)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-05-13 07:41:49 UTC (rev 200821)
</span><span class="lines">@@ -1034,26 +1034,90 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-static void addValuesForNamedGridLinesAtIndex(const OrderedNamedGridLinesMap&amp; orderedNamedGridLines, size_t i, CSSValueList&amp; list)
</del><ins>+class OrderedNamedLinesCollector {
+    WTF_MAKE_NONCOPYABLE(OrderedNamedLinesCollector);
+public:
+    OrderedNamedLinesCollector(const RenderStyle&amp; style, bool isRowAxis, unsigned repetitions)
+        : m_orderedNamedGridLines(isRowAxis ? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines())
+        , m_orderedNamedAutoRepeatGridLines(isRowAxis ? style.autoRepeatOrderedNamedGridColumnLines() : style.autoRepeatOrderedNamedGridRowLines())
+        , m_insertionPoint(isRowAxis ? style.gridAutoRepeatColumnsInsertionPoint() : style.gridAutoRepeatRowsInsertionPoint())
+        , m_repetitions(repetitions)
+    {
+    }
+
+    bool isEmpty() const { return m_orderedNamedGridLines.isEmpty() &amp;&amp; m_orderedNamedAutoRepeatGridLines.isEmpty(); }
+    void collectLineNamesForIndex(CSSGridLineNamesValue&amp;, unsigned index) const;
+
+private:
+
+    enum NamedLinesType { NamedLines, AutoRepeatNamedLines };
+    void appendLines(CSSGridLineNamesValue&amp;, unsigned index, NamedLinesType) const;
+
+    const OrderedNamedGridLinesMap&amp; m_orderedNamedGridLines;
+    const OrderedNamedGridLinesMap&amp; m_orderedNamedAutoRepeatGridLines;
+    unsigned m_insertionPoint;
+    unsigned m_repetitions;
+};
+
+void OrderedNamedLinesCollector::appendLines(CSSGridLineNamesValue&amp; lineNamesValue, unsigned index, NamedLinesType type) const
</ins><span class="cx"> {
</span><del>-    const Vector&lt;String&gt;&amp; namedGridLines = orderedNamedGridLines.get(i);
-    if (namedGridLines.isEmpty())
</del><ins>+    auto iter = type == NamedLines ? m_orderedNamedGridLines.find(index) : m_orderedNamedAutoRepeatGridLines.find(index);
+    auto endIter = type == NamedLines ? m_orderedNamedGridLines.end() : m_orderedNamedAutoRepeatGridLines.end();
+    if (iter == endIter)
</ins><span class="cx">         return;
</span><span class="cx"> 
</span><span class="cx">     auto&amp; cssValuePool = CSSValuePool::singleton();
</span><del>-    RefPtr&lt;CSSGridLineNamesValue&gt; lineNames = CSSGridLineNamesValue::create();
-    for (auto&amp; name : namedGridLines)
-        lineNames-&gt;append(cssValuePool.createValue(name, CSSPrimitiveValue::CSS_STRING));
-    list.append(lineNames.releaseNonNull());
</del><ins>+    for (auto lineName : iter-&gt;value)
+        lineNamesValue.append(cssValuePool.createValue(lineName, CSSPrimitiveValue::CSS_STRING));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void OrderedNamedLinesCollector::collectLineNamesForIndex(CSSGridLineNamesValue&amp; lineNamesValue, unsigned i) const
+{
+    ASSERT(!isEmpty());
+    if (m_orderedNamedAutoRepeatGridLines.isEmpty() || i &lt; m_insertionPoint) {
+        appendLines(lineNamesValue, i, NamedLines);
+        return;
+    }
+
+    ASSERT(m_repetitions);
+    if (i &gt; m_insertionPoint + m_repetitions) {
+        appendLines(lineNamesValue, i - (m_repetitions - 1), NamedLines);
+        return;
+    }
+
+    if (i == m_insertionPoint) {
+        appendLines(lineNamesValue, i, NamedLines);
+        appendLines(lineNamesValue, 0, AutoRepeatNamedLines);
+        return;
+    }
+
+    if (i == m_insertionPoint + m_repetitions) {
+        appendLines(lineNamesValue, 1, AutoRepeatNamedLines);
+        appendLines(lineNamesValue, m_insertionPoint + 1, NamedLines);
+        return;
+    }
+
+    appendLines(lineNamesValue, 1, AutoRepeatNamedLines);
+    appendLines(lineNamesValue, 0, AutoRepeatNamedLines);
+}
+
+static void addValuesForNamedGridLinesAtIndex(OrderedNamedLinesCollector&amp; collector, unsigned i, CSSValueList&amp; list)
+{
+    if (collector.isEmpty())
+        return;
+
+    auto lineNames = CSSGridLineNamesValue::create();
+    collector.collectLineNamesForIndex(lineNames.get(), i);
+    if (lineNames-&gt;length())
+        list.append(WTFMove(lineNames));
+}
+
</ins><span class="cx"> static Ref&lt;CSSValue&gt; valueForGridTrackList(GridTrackSizingDirection direction, RenderObject* renderer, const RenderStyle&amp; style)
</span><span class="cx"> {
</span><span class="cx">     bool isRowAxis = direction == ForColumns;
</span><span class="cx">     bool isRenderGrid = is&lt;RenderGrid&gt;(renderer);
</span><span class="cx">     auto&amp; trackSizes = isRowAxis ? style.gridColumns() : style.gridRows();
</span><span class="cx">     auto&amp; autoRepeatTrackSizes = isRowAxis ? style.gridAutoRepeatColumns() : style.gridAutoRepeatRows();
</span><del>-    auto&amp; orderedNamedGridLines = isRowAxis ? style.orderedNamedGridColumnLines() : style.orderedNamedGridRowLines();
</del><span class="cx"> 
</span><span class="cx">     // Handle the 'none' case.
</span><span class="cx">     bool trackListIsEmpty = trackSizes.isEmpty() &amp;&amp; autoRepeatTrackSizes.isEmpty();
</span><span class="lines">@@ -1064,11 +1128,11 @@
</span><span class="cx">         trackListIsEmpty = !downcast&lt;RenderBlock&gt;(*renderer).firstChild();
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    if (trackListIsEmpty) {
-        ASSERT(orderedNamedGridLines.isEmpty());
</del><ins>+    if (trackListIsEmpty)
</ins><span class="cx">         return CSSValuePool::singleton().createIdentifierValue(CSSValueNone);
</span><del>-    }
</del><span class="cx"> 
</span><ins>+    unsigned repetitions = isRenderGrid ? downcast&lt;RenderGrid&gt;(renderer)-&gt;autoRepeatCountForDirection(direction) : 0;
+    OrderedNamedLinesCollector collector(style, isRowAxis, repetitions);
</ins><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><span class="cx">     unsigned insertionIndex;
</span><span class="cx">     if (isRenderGrid) {
</span><span class="lines">@@ -1082,23 +1146,23 @@
</span><span class="cx">         LayoutUnit gutterSize = grid.guttersSize(direction, 2);
</span><span class="cx">         LayoutUnit offsetBetweenTracks = grid.offsetBetweenTracks(direction);
</span><span class="cx">         for (; i &lt; trackPositions.size() - 2; ++i) {
</span><del>-            addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, list.get());
</del><ins>+            addValuesForNamedGridLinesAtIndex(collector, i, list.get());
</ins><span class="cx">             list.get().append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i] - gutterSize - offsetBetweenTracks, style));
</span><span class="cx">         }
</span><span class="cx">         // Last track line does not have any gutter or distribution offset.
</span><del>-        addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, list.get());
</del><ins>+        addValuesForNamedGridLinesAtIndex(collector, i, list.get());
</ins><span class="cx">         list.get().append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i], style));
</span><span class="cx">         insertionIndex = trackPositions.size() - 1;
</span><span class="cx">     } else {
</span><span class="cx">         for (unsigned i = 0; i &lt; trackSizes.size(); ++i) {
</span><del>-            addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, list.get());
</del><ins>+            addValuesForNamedGridLinesAtIndex(collector, i, list.get());
</ins><span class="cx">             list.get().append(specifiedValueForGridTrackSize(trackSizes[i], style));
</span><span class="cx">         }
</span><span class="cx">         insertionIndex = trackSizes.size();
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Those are the trailing &lt;ident&gt;* allowed in the syntax.
</span><del>-    addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, insertionIndex, list.get());
</del><ins>+    addValuesForNamedGridLinesAtIndex(collector, insertionIndex, list.get());
</ins><span class="cx">     return WTFMove(list);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>