<!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>[199981] 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/199981">199981</a></dd>
<dt>Author</dt> <dd>rego@igalia.com</dd>
<dt>Date</dt> <dd>2016-04-25 02:54:48 -0700 (Mon, 25 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Fix grid-template-columns|rows computed style with content alignment
https://bugs.webkit.org/show_bug.cgi?id=156793

Reviewed by Darin Adler.

Source/WebCore:

Computed style of grid-template-columns and grid-template-rows properties
was including the distribution offset because of content alignment.
We should subtract that offset, like we do for the case of gaps,
when we're calculating the computed style.

Test: fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html

* css/CSSComputedStyleDeclaration.cpp:
(WebCore::valueForGridTrackList):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::offsetBetweenTracks):
(WebCore::RenderGrid::populateGridPositions): Deleted FIXME.
* rendering/RenderGrid.h:

LayoutTests:

* fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: Added.
* fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSComputedStyleDeclarationcpp">trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridh">trunk/Source/WebCore/rendering/RenderGrid.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridtemplatecolumnsrowscomputedstylegapscontentalignmentexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridtemplatecolumnsrowscomputedstylegapscontentalignmenthtml">trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (199980 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-04-25 09:46:31 UTC (rev 199980)
+++ trunk/LayoutTests/ChangeLog        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -1,3 +1,13 @@
</span><ins>+2016-04-25  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        [css-grid] Fix grid-template-columns|rows computed style with content alignment
+        https://bugs.webkit.org/show_bug.cgi?id=156793
+
+        Reviewed by Darin Adler.
+
+        * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt: Added.
+        * fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html: Added.
+
</ins><span class="cx"> 2016-04-25  Frederic Wang  &lt;fwang@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Refactor RenderMathMLMenclose.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridtemplatecolumnsrowscomputedstylegapscontentalignmentexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt (0 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt                                (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment-expected.txt        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+Test that computed style for grid-template-columns and grid-template-rows works as expected with content alignment and gaps.
+
+On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
+
+
+PASS window.getComputedStyle(gridContentStart, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentStart, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridContentCenter, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentCenter, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridContentEnd, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentEnd, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridContentSpaceBetween, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentSpaceBetween, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridContentSpaceAround, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentSpaceAround, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridContentSpaceEvenly, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentSpaceEvenly, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridContentStretch, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridContentStretch, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentStart, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentStart, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentCenter, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentCenter, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentEnd, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentEnd, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentSpaceBetween, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentSpaceBetween, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentSpaceAround, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentSpaceAround, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentSpaceEvenly, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentSpaceEvenly, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS window.getComputedStyle(gridGapsContentStretch, '').getPropertyValue('-webkit-grid-template-columns') is &quot;300px 200px 100px&quot;
+PASS window.getComputedStyle(gridGapsContentStretch, '').getPropertyValue('-webkit-grid-template-rows') is &quot;150px 100px 50px&quot;
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridtemplatecolumnsrowscomputedstylegapscontentalignmenthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html (0 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+&lt;!DOCTYPE HTML&gt;
+&lt;link href=&quot;resources/grid.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;link href=&quot;resources/grid-alignment.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;style&gt;
+.grid {
+    -webkit-grid-template-columns: 300px 200px 100px;
+    -webkit-grid-template-rows: 150px 100px 50px;
+    width: 800px;
+    height: 500px;
+}
+
+.gaps {
+    -webkit-grid-gap: 10px 20px;
+}
+&lt;/style&gt;
+
+&lt;div class=&quot;grid contentStart&quot; id=&quot;gridContentStart&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid contentCenter&quot; id=&quot;gridContentCenter&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid contentEnd&quot; id=&quot;gridContentEnd&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid contentSpaceBetween&quot; id=&quot;gridContentSpaceBetween&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid contentSpaceAround&quot; id=&quot;gridContentSpaceAround&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid contentSpaceEvenly&quot; id=&quot;gridContentSpaceEvenly&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid contentStretch&quot; id=&quot;gridContentStretch&quot;&gt;&lt;/div&gt;
+
+&lt;div class=&quot;grid gaps contentStart&quot; id=&quot;gridGapsContentStart&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid gaps contentCenter&quot; id=&quot;gridGapsContentCenter&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid gaps contentEnd&quot; id=&quot;gridGapsContentEnd&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid gaps contentSpaceBetween&quot; id=&quot;gridGapsContentSpaceBetween&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid gaps contentSpaceAround&quot; id=&quot;gridGapsContentSpaceAround&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid gaps contentSpaceEvenly&quot; id=&quot;gridGapsContentSpaceEvenly&quot;&gt;&lt;/div&gt;
+&lt;div class=&quot;grid gaps contentStretch&quot; id=&quot;gridGapsContentStretch&quot;&gt;&lt;/div&gt;
+
+&lt;script src=&quot;../../resources/js-test.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;resources/grid-definitions-parsing-utils.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+    description(&quot;Test that computed style for grid-template-columns and grid-template-rows works as expected with content alignment and gaps.&quot;);
+
+    testGridTemplatesValues(document.getElementById(&quot;gridContentStart&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridContentCenter&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridContentEnd&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridContentSpaceBetween&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridContentSpaceAround&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridContentSpaceEvenly&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridContentStretch&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentStart&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentCenter&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentEnd&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentSpaceBetween&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentSpaceAround&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentSpaceEvenly&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+    testGridTemplatesValues(document.getElementById(&quot;gridGapsContentStretch&quot;), &quot;300px 200px 100px&quot;, &quot;150px 100px 50px&quot;);
+&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (199980 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-04-25 09:46:31 UTC (rev 199980)
+++ trunk/Source/WebCore/ChangeLog        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -1,3 +1,24 @@
</span><ins>+2016-04-25  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        [css-grid] Fix grid-template-columns|rows computed style with content alignment
+        https://bugs.webkit.org/show_bug.cgi?id=156793
+
+        Reviewed by Darin Adler.
+
+        Computed style of grid-template-columns and grid-template-rows properties
+        was including the distribution offset because of content alignment.
+        We should subtract that offset, like we do for the case of gaps,
+        when we're calculating the computed style.
+
+        Test: fast/css-grid-layout/grid-template-columns-rows-computed-style-gaps-content-alignment.html
+
+        * css/CSSComputedStyleDeclaration.cpp:
+        (WebCore::valueForGridTrackList):
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::offsetBetweenTracks):
+        (WebCore::RenderGrid::populateGridPositions): Deleted FIXME.
+        * rendering/RenderGrid.h:
+
</ins><span class="cx"> 2016-04-25  Frederic Wang  &lt;fwang@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Refactor RenderMathMLMenclose.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSComputedStyleDeclarationcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp (199980 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-04-25 09:46:31 UTC (rev 199980)
+++ trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -1070,18 +1070,20 @@
</span><span class="cx">     auto list = CSSValueList::createSpaceSeparated();
</span><span class="cx">     unsigned insertionIndex;
</span><span class="cx">     if (isRenderGrid) {
</span><del>-        const Vector&lt;LayoutUnit&gt;&amp; trackPositions = direction == ForColumns ? downcast&lt;RenderGrid&gt;(*renderer).columnPositions() : downcast&lt;RenderGrid&gt;(*renderer).rowPositions();
</del><ins>+        auto&amp; grid = downcast&lt;RenderGrid&gt;(*renderer);
+        const auto&amp; trackPositions = direction == ForColumns ? grid.columnPositions() : grid.rowPositions();
</ins><span class="cx">         // There are at least #tracks + 1 grid lines (trackPositions). Apart from that, the grid container can generate implicit grid tracks,
</span><span class="cx">         // so we'll have more trackPositions than trackSizes as the latter only contain the explicit grid.
</span><span class="cx">         ASSERT(trackPositions.size() - 1 &gt;= trackSizes.size());
</span><span class="cx"> 
</span><span class="cx">         unsigned i = 0;
</span><del>-        LayoutUnit gutterSize = downcast&lt;RenderGrid&gt;(*renderer).guttersSize(direction, 2);
</del><ins>+        LayoutUnit gutterSize = grid.guttersSize(direction, 2);
+        LayoutUnit offsetBetweenTracks = grid.offsetBetweenTracks(direction);
</ins><span class="cx">         for (; i &lt; trackPositions.size() - 2; ++i) {
</span><span class="cx">             addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, list.get());
</span><del>-            list.get().append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i] - gutterSize, style));
</del><ins>+            list.get().append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i] - gutterSize - offsetBetweenTracks, style));
</ins><span class="cx">         }
</span><del>-        // Last track line does not have any gutter.
</del><ins>+        // Last track line does not have any gutter or distribution offset.
</ins><span class="cx">         addValuesForNamedGridLinesAtIndex(orderedNamedGridLines, i, list.get());
</span><span class="cx">         list.get().append(zoomAdjustedPixelValue(trackPositions[i + 1] - trackPositions[i], style));
</span><span class="cx">         insertionIndex = trackPositions.size() - 1;
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (199980 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-04-25 09:46:31 UTC (rev 199980)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -428,6 +428,11 @@
</span><span class="cx">     return valueForLength(trackGap, 0) * (span - 1);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+LayoutUnit RenderGrid::offsetBetweenTracks(GridTrackSizingDirection direction) const
+{
+    return direction == ForColumns ? m_offsetBetweenColumns : m_offsetBetweenRows;
+}
+
</ins><span class="cx"> void RenderGrid::computeIntrinsicLogicalWidths(LayoutUnit&amp; minLogicalWidth, LayoutUnit&amp; maxLogicalWidth) const
</span><span class="cx"> {
</span><span class="cx">     bool wasPopulated = gridWasPopulated();
</span><span class="lines">@@ -1646,8 +1651,6 @@
</span><span class="cx">     // Since we add alignment offsets and track gutters, grid lines are not always adjacent. Hence we will have to
</span><span class="cx">     // assume from now on that we just store positions of the initial grid lines of each track,
</span><span class="cx">     // except the last one, which is the only one considered as a final grid line of a track.
</span><del>-    // FIXME: This will affect the computed style value of grid tracks size, since we are
-    // using these positions to compute them.
</del><span class="cx"> 
</span><span class="cx">     // The grid container's frame elements (border, padding and &lt;content-position&gt; offset) are sensible to the
</span><span class="cx">     // inline-axis flow direction. However, column lines positions are 'direction' unaware. This simplification
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.h (199980 => 199981)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.h        2016-04-25 09:46:31 UTC (rev 199980)
+++ trunk/Source/WebCore/rendering/RenderGrid.h        2016-04-25 09:54:48 UTC (rev 199981)
</span><span class="lines">@@ -61,6 +61,7 @@
</span><span class="cx">     const Vector&lt;LayoutUnit&gt;&amp; rowPositions() const { return m_rowPositions; }
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit guttersSize(GridTrackSizingDirection, size_t span) const;
</span><ins>+    LayoutUnit offsetBetweenTracks(GridTrackSizingDirection) const;
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     const char* renderName() const override;
</span></span></pre>
</div>
</div>

</body>
</html>