<!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>[201325] 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/201325">201325</a></dd>
<dt>Author</dt> <dd>rego@igalia.com</dd>
<dt>Date</dt> <dd>2016-05-24 01:55:13 -0700 (Tue, 24 May 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Fix behavior of flexible track breadths
https://bugs.webkit.org/show_bug.cgi?id=157834

Reviewed by Sergio Villar Senin.

This patch is fixing 2 issues that are interrelated:
Source/WebCore:

1) Flex sizes are invalid as min track sizing function.

  The syntax has been recently updated on the spec:
    &lt;track-size&gt; =
      &lt;track-breadth&gt; |
      minmax( &lt;inflexible-breadth&gt; , &lt;track-breadth&gt; )

2) Flex sizes outside minmax() behave as auto minimum.

  Flex sizes outside minmax() were previously behaving like
  minimum and maximum (e.g. 1fr =&gt; minmax(1fr, 1fr)).
  However the spec changed and now this would be invalid,
  so they should behave like auto minimum (e.g. minmax(auto, 1fr)).

* css/CSSParser.cpp:
(WebCore::CSSParser::parseGridTrackSize): Call parseGridBreadth()
for min sizing function using &quot;InflexibleSizeOnly&quot; restriction
when needed.
(WebCore::CSSParser::parseGridBreadth): Add check for
&quot;InflexibleSizeOnly&quot; resctriction.
* css/CSSParser.h: Add new type of restriction &quot;InflexibleSizeOnly&quot;.
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::gridTrackSize): Add new condition to make
|minTrackBreadth| auto if it was a flex size.

LayoutTests:

1) Flex sizes are invalid as min track sizing function.
2) Flex sizes outside minmax() behave as auto minimum.

The patch includes new test cases checking specifically these 2 issues.
In addition several tests results have been updated to reflect
the new behavior. Also, some cases that are now invalid and
were not testing anything new have been removed.

* fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt:
* fast/css-grid-layout/flex-and-content-sized-resolution-columns.html:
* fast/css-grid-layout/flex-content-resolution-columns-expected.txt:
* fast/css-grid-layout/flex-content-resolution-columns.html:
* fast/css-grid-layout/flex-content-resolution-rows-expected.txt:
* fast/css-grid-layout/flex-content-resolution-rows.html:
* fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt:
* fast/css-grid-layout/grid-gutters-and-flex-content.html:
* fast/css-grid-layout/grid-preferred-logical-widths.html:
* fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutflexandcontentsizedresolutioncolumnsexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutflexandcontentsizedresolutioncolumnshtml">trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutflexcontentresolutioncolumnsexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutflexcontentresolutioncolumnshtml">trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutflexcontentresolutionrowsexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutflexcontentresolutionrowshtml">trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridcolumnsrowsgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridguttersandflexcontentexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridguttersandflexcontenthtml">trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridpreferredlogicalwidthshtml">trunk/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutnongridcolumnsrowsgetsetexpectedtxt">trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutresourcesgridcolumnsrowsgetsetjs">trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutresourcesnongridcolumnsrowsgetsetjs">trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorecssCSSParsercpp">trunk/Source/WebCore/css/CSSParser.cpp</a></li>
<li><a href="#trunkSourceWebCorecssCSSParserh">trunk/Source/WebCore/css/CSSParser.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/ChangeLog        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2016-05-24  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        [css-grid] Fix behavior of flexible track breadths
+        https://bugs.webkit.org/show_bug.cgi?id=157834
+
+        Reviewed by Sergio Villar Senin.
+
+        This patch is fixing 2 issues that are interrelated:
+        1) Flex sizes are invalid as min track sizing function.
+        2) Flex sizes outside minmax() behave as auto minimum.
+
+        The patch includes new test cases checking specifically these 2 issues.
+        In addition several tests results have been updated to reflect
+        the new behavior. Also, some cases that are now invalid and
+        were not testing anything new have been removed.
+
+        * fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt:
+        * fast/css-grid-layout/flex-and-content-sized-resolution-columns.html:
+        * fast/css-grid-layout/flex-content-resolution-columns-expected.txt:
+        * fast/css-grid-layout/flex-content-resolution-columns.html:
+        * fast/css-grid-layout/flex-content-resolution-rows-expected.txt:
+        * fast/css-grid-layout/flex-content-resolution-rows.html:
+        * fast/css-grid-layout/grid-columns-rows-get-set-expected.txt:
+        * fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt:
+        * fast/css-grid-layout/grid-gutters-and-flex-content.html:
+        * fast/css-grid-layout/grid-preferred-logical-widths.html:
+        * fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt:
+        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js:
+        * fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js:
+
</ins><span class="cx"> 2016-05-24  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         [Fetch API] Implement Fetch redirect mode
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutflexandcontentsizedresolutioncolumnsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns-expected.txt        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -2,7 +2,7 @@
</span><span class="cx"> PASS window.getComputedStyle(gridFixedAndMinContentAndFlexMultipleOverlap, '').getPropertyValue('grid-template-columns') is &quot;20px 10px 70px&quot;
</span><span class="cx"> PASS window.getComputedStyle(gridMinMaxFixedFlexAndMaxContentAndAuto, '').getPropertyValue('grid-template-columns') is &quot;60px 20px 20px&quot;
</span><span class="cx"> PASS window.getComputedStyle(gridMinMaxFixedFlexAndMaxContentAndAutoNoFlexSpanningItems, '').getPropertyValue('grid-template-columns') is &quot;100px 0px 0px&quot;
</span><del>-PASS window.getComputedStyle(gridMinMaxFlexFixedAndMinContentAndFixed, '').getPropertyValue('grid-template-columns') is &quot;35px 5px 25px&quot;
</del><ins>+PASS window.getComputedStyle(gridMinMaxAutoFixedAndMinContentAndFixed, '').getPropertyValue('grid-template-columns') is &quot;35px 20px 25px&quot;
</ins><span class="cx"> PASS window.getComputedStyle(gridMinContentAndMinMaxFixedMinContentAndFlex, '').getPropertyValue('grid-template-columns') is &quot;20px 20px 60px&quot;
</span><span class="cx"> PASS window.getComputedStyle(gridMaxContentAndMinMaxFixedMaxContentAndFlex, '').getPropertyValue('grid-template-columns') is &quot;70px 20px 10px&quot;
</span><span class="cx"> PASS successfullyParsed is true
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutflexandcontentsizedresolutioncolumnshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/flex-and-content-sized-resolution-columns.html        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -15,8 +15,8 @@
</span><span class="cx">      grid-template-columns: minmax(20px, 1fr) -webkit-max-content auto;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-.gridMinMaxFlexFixedAndMinContentAndFixed {
-     grid-template-columns: minmax(0.5fr, 35px) -webkit-min-content 25px;
</del><ins>+.gridMinMaxAutoFixedAndMinContentAndFixed {
+     grid-template-columns: minmax(auto, 35px) -webkit-min-content 25px;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .gridMinContentAndMinMaxFixedMinContentAndFlex {
</span><span class="lines">@@ -63,7 +63,7 @@
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div style=&quot;position: relative; width: 100px;&quot;&gt;
</span><del>-    &lt;div id=&quot;gridMinMaxFlexFixedAndMinContentAndFixed&quot; class=&quot;grid gridMinMaxFlexFixedAndMinContentAndFixed&quot;&gt;
</del><ins>+    &lt;div id=&quot;gridMinMaxAutoFixedAndMinContentAndFixed&quot; class=&quot;grid gridMinMaxAutoFixedAndMinContentAndFixed&quot;&gt;
</ins><span class="cx">         &lt;div style=&quot;grid-column: 1 / span 2;&quot;&gt;XXXX XXXX&lt;/div&gt;
</span><span class="cx">         &lt;div style=&quot;grid-column: 2 / span 2; grid-row: 2;&quot;&gt;XXX XXX&lt;/div&gt;
</span><span class="cx">         &lt;div style=&quot;grid-column: 1 / -1; grid-row: 3;&quot;&gt;XXXXX XXXXX&lt;/div&gt;
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> checkColumns(&quot;gridFixedAndMinContentAndFlexMultipleOverlap&quot;, &quot;20px 10px 70px&quot;);
</span><span class="cx"> checkColumns(&quot;gridMinMaxFixedFlexAndMaxContentAndAuto&quot;, &quot;60px 20px 20px&quot;);
</span><span class="cx"> checkColumns(&quot;gridMinMaxFixedFlexAndMaxContentAndAutoNoFlexSpanningItems&quot;, &quot;100px 0px 0px&quot;);
</span><del>-checkColumns(&quot;gridMinMaxFlexFixedAndMinContentAndFixed&quot;, &quot;35px 5px 25px&quot;);
</del><ins>+checkColumns(&quot;gridMinMaxAutoFixedAndMinContentAndFixed&quot;, &quot;35px 20px 25px&quot;);
</ins><span class="cx"> checkColumns(&quot;gridMinContentAndMinMaxFixedMinContentAndFlex&quot;, &quot;20px 20px 60px&quot;);
</span><span class="cx"> checkColumns(&quot;gridMaxContentAndMinMaxFixedMaxContentAndFlex&quot;, &quot;70px 20px 10px&quot;);
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutflexcontentresolutioncolumnsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns-expected.txt (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns-expected.txt        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns-expected.txt        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -1,11 +1,17 @@
</span><span class="cx"> Test that resolving auto tracks on grid items works properly.
</span><span class="cx"> 
</span><span class="cx"> PASS
</span><ins>+XX
+XXX
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+XXX
+XXXX
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+XXX
+XXXX
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="lines">@@ -18,3 +24,6 @@
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+PASS
+PASS
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutflexcontentresolutioncolumnshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns.html (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns.html        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-columns.html        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -2,12 +2,12 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;link href=&quot;resources/grid.css&quot; rel=&quot;stylesheet&quot;&gt;
</span><span class="cx"> &lt;style&gt;
</span><del>-.gridMinFlexContent {
-    grid-template-columns: minmax(1fr, 50px);
</del><ins>+.gridFlexContent {
+    grid-template-columns: 1fr 1fr;
</ins><span class="cx">     grid-template-rows: 50px;
</span><span class="cx"> }
</span><span class="cx"> .gridZeroFlexContent {
</span><del>-    grid-template-columns: minmax(1fr, 0px);
</del><ins>+    grid-template-columns: minmax(auto, 0px);
</ins><span class="cx">     grid-template-rows: 50px;
</span><span class="cx"> }
</span><span class="cx"> .gridMaxFlexContent {
</span><span class="lines">@@ -54,11 +54,18 @@
</span><span class="cx"> &lt;p&gt;Test that resolving auto tracks on grid items works properly.&lt;/p&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div style=&quot;width: 0px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot;&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
</ins><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</span><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div style=&quot;width: 0px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;20&quot; data-expected-height=&quot;50&quot;&gt;XX&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowSecondColumn&quot; data-offset-x=&quot;20&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;30&quot; data-expected-height=&quot;50&quot;&gt;XXX&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
</ins><span class="cx"> &lt;div style=&quot;width: 100px&quot;&gt;
</span><span class="cx">     &lt;div class=&quot;grid gridZeroFlexContent&quot;&gt;
</span><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;0&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</span><span class="lines">@@ -67,17 +74,31 @@
</span><span class="cx"> 
</span><span class="cx"> &lt;!-- Allow the extra logical space distribution to occur. --&gt;
</span><span class="cx"> &lt;div style=&quot;width: 40px; height: 10px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot;&gt;
-        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;40&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;20&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div style=&quot;width: 40px; height: 10px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;30&quot; data-expected-height=&quot;50&quot;&gt;XXX&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowSecondColumn&quot; data-offset-x=&quot;30&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;40&quot; data-expected-height=&quot;50&quot;&gt;XXXX&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
</ins><span class="cx"> &lt;div style=&quot;width: 100px; height: 10px;&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot;&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
</ins><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</span><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div style=&quot;width: 100px; height: 10px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;XXX&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowSecondColumn&quot; data-offset-x=&quot;50&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;XXXX&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
</ins><span class="cx"> &lt;div class=&quot;constrainedContainer&quot;&gt;
</span><span class="cx">     &lt;div class=&quot;grid gridMaxFlexContent&quot;&gt;
</span><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;30&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutflexcontentresolutionrowsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows-expected.txt (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows-expected.txt        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows-expected.txt        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -2,16 +2,54 @@
</span><span class="cx"> 
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+X
+X
+X
+X
+X
</ins><span class="cx"> PASS
</span><ins>+X
+X
+X
+X
+X
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+X
+X
+X
+X
+X
+X
+X
</ins><span class="cx"> PASS
</span><ins>+X
+X
+X
+X
+X
+X
+X
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+X
+X
+X
+X
+X
+X
+X
</ins><span class="cx"> PASS
</span><ins>+X
+X
+X
+X
+X
+X
+X
</ins><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="lines">@@ -29,3 +67,10 @@
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><ins>+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
+PASS
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutflexcontentresolutionrowshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows.html (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows.html        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/flex-content-resolution-rows.html        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -2,13 +2,13 @@
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;link href=&quot;resources/grid.css&quot; rel=&quot;stylesheet&quot;&gt;
</span><span class="cx"> &lt;style&gt;
</span><del>-.gridMinFlexContent {
</del><ins>+.gridFlexContent {
</ins><span class="cx">     grid-template-columns: 50px;
</span><del>-    grid-template-rows: minmax(1fr, 50px);
</del><ins>+    grid-template-rows: 1fr 1fr;
</ins><span class="cx"> }
</span><span class="cx"> .gridZeroFlexContent {
</span><span class="cx">     grid-template-columns: 50px;
</span><del>-    grid-template-rows: minmax(1fr, 0px);
</del><ins>+    grid-template-rows: minmax(auto, 0px);
</ins><span class="cx"> }
</span><span class="cx"> .gridMaxFlexContent {
</span><span class="cx">     grid-template-columns: 50px;
</span><span class="lines">@@ -50,43 +50,91 @@
</span><span class="cx"> &lt;p&gt;Test that resolving auto tracks on grid items works properly.&lt;/p&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div style=&quot;height: 0px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot; style=&quot;height: 100%&quot;&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
</ins><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;0&quot;&gt;&lt;/div&gt;
</span><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div style=&quot;height: 0px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridZeroFlexContent&quot;&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot; style=&quot;height: 100%;&quot;&gt;
</ins><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;0&quot;&gt;&lt;/div&gt;
</span><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div style=&quot;height: 0px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;30&quot;&gt;X&lt;br&gt;X&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea secondRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;30&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;30&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div style=&quot;height: 0px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot; style=&quot;height: 100%;&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;20&quot;&gt;X&lt;br&gt;X&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea secondRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;20&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;30&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
</ins><span class="cx"> &lt;div style=&quot;height: 0px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot;&gt;
-        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid gridZeroFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;0&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;!-- Allow the extra logical space distribution to occur. --&gt;
</span><span class="cx"> &lt;div style=&quot;width: 10px; height: 40px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot; style=&quot;height: 100%&quot;&gt;
-        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;40&quot;&gt;&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;0&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div style=&quot;width: 10px; height: 40px&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot;&gt;
-        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot; style=&quot;height: 100%;&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;20&quot;&gt;&lt;/div&gt;
</ins><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div style=&quot;width: 10px; height: 40px; position: relative&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;40&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea secondRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;40&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;40&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div style=&quot;width: 10px; height: 40px; position: relative&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot; style=&quot;height: 100%;&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;30&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea secondRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;30&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;40&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
</ins><span class="cx"> &lt;div style=&quot;width: 10px; height: 100px;&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinFlexContent&quot;&gt;
</del><ins>+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;0&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div style=&quot;width: 10px; height: 100px;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot; style=&quot;height: 100%;&quot;&gt;
</ins><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;&lt;/div&gt;
</span><span class="cx">     &lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><ins>+&lt;div style=&quot;width: 10px; height: 100px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;40&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea secondRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;40&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;40&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx"> 
</span><ins>+&lt;div style=&quot;width: 10px; height: 100px; position: relative;&quot;&gt;
+    &lt;div class=&quot;grid gridFlexContent&quot; style=&quot;height: 100%;&quot;&gt;
+        &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;0&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+        &lt;div class=&quot;sizedToGridArea secondRowFirstColumn&quot; data-offset-x=&quot;0&quot; data-offset-y=&quot;50&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;50&quot;&gt;X&lt;br&gt;X&lt;br&gt;X&lt;br&gt;X&lt;/div&gt;
+    &lt;/div&gt;
+&lt;/div&gt;
+
+
</ins><span class="cx"> &lt;div class=&quot;constrainedContainer&quot;&gt;
</span><span class="cx">     &lt;div class=&quot;grid gridMaxFlexContent&quot;&gt;
</span><span class="cx">         &lt;div class=&quot;sizedToGridArea firstRowFirstColumn&quot; data-expected-width=&quot;50&quot; data-expected-height=&quot;30&quot;&gt;&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridcolumnsrowsgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -162,6 +162,10 @@
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</ins><span class="cx"> 
</span><span class="cx"> Test setting grid-template-columns and grid-template-rows back to 'none' through JS
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;18px&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridguttersandflexcontentexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content-expected.txt        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -7,11 +7,6 @@
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><span class="cx"> PASS
</span><del>-XXXX XXXX
-XXX XXX
-XXXXX XXXXX
-XX XX XX XX
-PASS
</del><span class="cx"> XXXXX
</span><span class="cx"> XXX XXX XXX
</span><span class="cx"> XXXX XXXX
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridguttersandflexcontenthtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-gutters-and-flex-content.html        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -13,7 +13,6 @@
</span><span class="cx"> .gridRowsTwoMaxFlexContent { grid-template: minmax(10px, 1fr) minmax(10px, 2fr) / 50px; }
</span><span class="cx"> .gridRowsTwoDoubleMaxFlexContent { grid-template: minmax(10px, 0.5fr) minmax(10px, 2fr) / 50px; }
</span><span class="cx"> 
</span><del>-.gridMinMaxFlexFixedAndMinContentAndFixed { grid-template-columns: minmax(0.5fr, 35px) -webkit-min-content 25px; }
</del><span class="cx"> .gridMinContentAndMinMaxFixedMinContentAndFlex { grid-template-columns: -webkit-min-content minmax(20px, -webkit-min-content) 2fr; }
</span><span class="cx"> .gridMaxContentAndMinMaxFixedMaxContentAndFlex { grid-template-columns: -webkit-max-content minmax(20px, -webkit-max-content) 1fr; }
</span><span class="cx"> 
</span><span class="lines">@@ -76,15 +75,6 @@
</span><span class="cx"> &lt;!-- Check that gutters do not interfere with flex content resolution with content sized tracks --&gt;
</span><span class="cx"> 
</span><span class="cx"> &lt;div style=&quot;position: relative; width: 100px;&quot;&gt;
</span><del>-    &lt;div class=&quot;grid gridMinMaxFlexFixedAndMinContentAndFixed gridRowColumnGaps&quot; data-expected-width=&quot;100&quot; data-expected-height=&quot;199&quot;&gt;
-        &lt;div style=&quot;grid-column: 1 / span 2;&quot; data-expected-width=&quot;54&quot; data-expected-height=&quot;20&quot;&gt;XXXX XXXX&lt;/div&gt;
-        &lt;div style=&quot;grid-column: 2 / span 2; grid-row: 2;&quot; data-expected-width=&quot;44&quot; data-expected-height=&quot;20&quot;&gt;XXX XXX&lt;/div&gt;
-        &lt;div style=&quot;grid-column: 1 / -1; grid-row: 3;&quot; data-expected-width=&quot;98&quot; data-expected-height=&quot;20&quot;&gt;XXXXX XXXXX&lt;/div&gt;
-        &lt;div style=&quot;grid-column: 2 / span 2; grid-row: 4;&quot; data-expected-width=&quot;44&quot; data-expected-height=&quot;40&quot;&gt;XX XX XX XX&lt;/div&gt;
-    &lt;/div&gt;
-&lt;/div&gt;
-
-&lt;div style=&quot;position: relative; width: 100px;&quot;&gt;
</del><span class="cx">     &lt;div class=&quot;grid gridMinContentAndMinMaxFixedMinContentAndFlex gridRowColumnGaps&quot; data-expected-width=&quot;100&quot; data-expected-height=&quot;149&quot;&gt;
</span><span class="cx">         &lt;div style=&quot;grid-column: 2 / span 2;&quot; data-expected-width=&quot;80&quot;&gt;XXXXX&lt;/div&gt;
</span><span class="cx">         &lt;div style=&quot;grid-column: 1 / -1; grid-row: 2;&quot; data-expected-width=&quot;100&quot;&gt;XXX XXX XXX&lt;/div&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridpreferredlogicalwidthshtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-preferred-logical-widths.html        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -35,7 +35,7 @@
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> .gridFixedFraction {
</span><del>-    grid-template-columns: minmax(10px, 1fr) minmax(2fr, 20px);
</del><ins>+    grid-template-columns: minmax(10px, 1fr) minmax(20px, 2fr);
</ins><span class="cx">     grid-template-rows: 10px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -101,7 +101,7 @@
</span><span class="cx">     &lt;div class=&quot;firstRowSecondColumn&quot;&gt;XX XX XX&lt;/div&gt;
</span><span class="cx"> &lt;/div&gt;
</span><span class="cx"> 
</span><del>-&lt;div class=&quot;grid gridFixedFraction min-content&quot; data-expected-height=&quot;10&quot; data-expected-width=&quot;10&quot;&gt;&lt;/div&gt;
</del><ins>+&lt;div class=&quot;grid gridFixedFraction min-content&quot; data-expected-height=&quot;10&quot; data-expected-width=&quot;30&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;div class=&quot;grid gridFixedFraction max-content&quot; data-expected-height=&quot;10&quot; data-expected-width=&quot;30&quot;&gt;&lt;/div&gt;
</span><span class="cx"> &lt;!-- Now with margin on one of the grid items. --&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutnongridcolumnsrowsgetsetexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -132,6 +132,10 @@
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;none&quot;
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is &quot;none&quot;
</ins><span class="cx"> 
</span><span class="cx"> Test setting grid-template-columns and grid-template-rows back to 'none' through JS
</span><span class="cx"> PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is &quot;18px&quot;
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutresourcesgridcolumnsrowsgetsetjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -77,6 +77,9 @@
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;minmax(minmax(10px, 20px), 20px)&quot;, &quot;minmax(10px, 20px, 30px)&quot;);
</span><span class="cx"> // No breadth value and no comma.
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;minmax()&quot;, &quot;minmax(30px 30% 30em)&quot;);
</span><ins>+// Flexible lengths are invalid on the min slot of minmax().
+testGridTemplatesSetBadJSValues(&quot;minmax(0fr, 100px)&quot;, &quot;minmax(.0fr, 200px)&quot;);
+testGridTemplatesSetBadJSValues(&quot;minmax(1fr, 100px)&quot;, &quot;minmax(2.5fr, 200px)&quot;);
</ins><span class="cx"> 
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2fr&quot;, &quot;3ffr&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2.05fr&quot;, &quot;+-3fr&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutresourcesnongridcolumnsrowsgetsetjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -65,6 +65,10 @@
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;minmax(minmax(10px, 20px), 20px)&quot;, &quot;minmax(10px, 20px, 30px)&quot;);
</span><span class="cx"> // No breadth value and no comma.
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;minmax()&quot;, &quot;minmax(30px 30% 30em)&quot;);
</span><ins>+// Flexible lengths are invalid on the min slot of minmax().
+testGridTemplatesSetBadJSValues(&quot;minmax(0fr, 100px)&quot;, &quot;minmax(.0fr, 200px)&quot;);
+testGridTemplatesSetBadJSValues(&quot;minmax(1fr, 100px)&quot;, &quot;minmax(2.5fr, 200px)&quot;);
+
</ins><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2fr&quot;, &quot;3ffr&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;-2.05fr&quot;, &quot;+-3fr&quot;);
</span><span class="cx"> testGridTemplatesSetBadJSValues(&quot;0fr&quot;, &quot;1r&quot;);
</span></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/Source/WebCore/ChangeLog        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -1,3 +1,37 @@
</span><ins>+2016-05-24  Manuel Rego Casasnovas  &lt;rego@igalia.com&gt;
+
+        [css-grid] Fix behavior of flexible track breadths
+        https://bugs.webkit.org/show_bug.cgi?id=157834
+
+        Reviewed by Sergio Villar Senin.
+
+        This patch is fixing 2 issues that are interrelated:
+
+        1) Flex sizes are invalid as min track sizing function.
+
+          The syntax has been recently updated on the spec:
+            &lt;track-size&gt; =
+              &lt;track-breadth&gt; |
+              minmax( &lt;inflexible-breadth&gt; , &lt;track-breadth&gt; )
+
+        2) Flex sizes outside minmax() behave as auto minimum.
+
+          Flex sizes outside minmax() were previously behaving like
+          minimum and maximum (e.g. 1fr =&gt; minmax(1fr, 1fr)).
+          However the spec changed and now this would be invalid,
+          so they should behave like auto minimum (e.g. minmax(auto, 1fr)).
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::parseGridTrackSize): Call parseGridBreadth()
+        for min sizing function using &quot;InflexibleSizeOnly&quot; restriction
+        when needed.
+        (WebCore::CSSParser::parseGridBreadth): Add check for
+        &quot;InflexibleSizeOnly&quot; resctriction.
+        * css/CSSParser.h: Add new type of restriction &quot;InflexibleSizeOnly&quot;.
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::gridTrackSize): Add new condition to make
+        |minTrackBreadth| auto if it was a flex size.
+
</ins><span class="cx"> 2016-05-24  Youenn Fablet  &lt;youenn.fablet@crf.canon.fr&gt;
</span><span class="cx"> 
</span><span class="cx">         [Fetch API] Implement Fetch redirect mode
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -5977,7 +5977,8 @@
</span><span class="cx">         if (!arguments || arguments-&gt;size() != 3 || !isComma(arguments-&gt;valueAt(1)))
</span><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><del>-        RefPtr&lt;CSSPrimitiveValue&gt; minTrackBreadth = parseGridBreadth(*arguments-&gt;valueAt(0), restriction);
</del><ins>+        TrackSizeRestriction minTrackBreadthRestriction = restriction == AllowAll ? InflexibleSizeOnly : restriction;
+        RefPtr&lt;CSSPrimitiveValue&gt; minTrackBreadth = parseGridBreadth(*arguments-&gt;valueAt(0), minTrackBreadthRestriction);
</ins><span class="cx">         if (!minTrackBreadth)
</span><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="lines">@@ -6005,7 +6006,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     if (value.unit == CSSPrimitiveValue::CSS_FR) {
</span><del>-        if (restriction == FixedSizeOnly)
</del><ins>+        if (restriction == FixedSizeOnly || restriction == InflexibleSizeOnly)
</ins><span class="cx">             return nullptr;
</span><span class="cx"> 
</span><span class="cx">         double flexValue = value.fValue;
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/Source/WebCore/css/CSSParser.h        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -240,7 +240,7 @@
</span><span class="cx">     bool parseSingleGridAreaLonghand(RefPtr&lt;CSSValue&gt;&amp;);
</span><span class="cx">     RefPtr&lt;CSSValue&gt; parseGridTrackList();
</span><span class="cx">     bool parseGridTrackRepeatFunction(CSSValueList&amp;, bool&amp; isAutoRepeat);
</span><del>-    enum TrackSizeRestriction { FixedSizeOnly, AllowAll };
</del><ins>+    enum TrackSizeRestriction { FixedSizeOnly, InflexibleSizeOnly, AllowAll };
</ins><span class="cx">     RefPtr&lt;CSSValue&gt; parseGridTrackSize(CSSParserValueList&amp; inputList, TrackSizeRestriction = AllowAll);
</span><span class="cx">     RefPtr&lt;CSSPrimitiveValue&gt; parseGridBreadth(CSSParserValue&amp;, TrackSizeRestriction = AllowAll);
</span><span class="cx">     bool parseGridTemplateAreasRow(NamedGridAreaMap&amp;, const unsigned, unsigned&amp;);
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (201324 => 201325)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-05-24 07:35:09 UTC (rev 201324)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-05-24 08:55:13 UTC (rev 201325)
</span><span class="lines">@@ -747,6 +747,11 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // Flex sizes are invalid as a min sizing function. However we still can have a flexible |minTrackBreadth|
+    // if the track size is just a flex size (e.g. &quot;1fr&quot;), the spec says that in this case it implies an automatic minimum.
+    if (minTrackBreadth.isFlex())
+        minTrackBreadth = Length(Auto);
+
</ins><span class="cx">     return GridTrackSize(minTrackBreadth, maxTrackBreadth);
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre>
</div>
</div>

</body>
</html>