<!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:
<track-size> =
<track-breadth> |
minmax( <inflexible-breadth> , <track-breadth> )
2) Flex sizes outside minmax() behave as auto minimum.
Flex sizes outside minmax() were previously behaving like
minimum and maximum (e.g. 1fr => 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 "InflexibleSizeOnly" restriction
when needed.
(WebCore::CSSParser::parseGridBreadth): Add check for
"InflexibleSizeOnly" resctriction.
* css/CSSParser.h: Add new type of restriction "InflexibleSizeOnly".
* 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 <rego@igalia.com>
+
+ [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 <youenn.fablet@crf.canon.fr>
</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 "20px 10px 70px"
</span><span class="cx"> PASS window.getComputedStyle(gridMinMaxFixedFlexAndMaxContentAndAuto, '').getPropertyValue('grid-template-columns') is "60px 20px 20px"
</span><span class="cx"> PASS window.getComputedStyle(gridMinMaxFixedFlexAndMaxContentAndAutoNoFlexSpanningItems, '').getPropertyValue('grid-template-columns') is "100px 0px 0px"
</span><del>-PASS window.getComputedStyle(gridMinMaxFlexFixedAndMinContentAndFixed, '').getPropertyValue('grid-template-columns') is "35px 5px 25px"
</del><ins>+PASS window.getComputedStyle(gridMinMaxAutoFixedAndMinContentAndFixed, '').getPropertyValue('grid-template-columns') is "35px 20px 25px"
</ins><span class="cx"> PASS window.getComputedStyle(gridMinContentAndMinMaxFixedMinContentAndFlex, '').getPropertyValue('grid-template-columns') is "20px 20px 60px"
</span><span class="cx"> PASS window.getComputedStyle(gridMaxContentAndMinMaxFixedMaxContentAndFlex, '').getPropertyValue('grid-template-columns') is "70px 20px 10px"
</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"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="position: relative; width: 100px;">
</span><del>- <div id="gridMinMaxFlexFixedAndMinContentAndFixed" class="grid gridMinMaxFlexFixedAndMinContentAndFixed">
</del><ins>+ <div id="gridMinMaxAutoFixedAndMinContentAndFixed" class="grid gridMinMaxAutoFixedAndMinContentAndFixed">
</ins><span class="cx">         <div style="grid-column: 1 / span 2;">XXXX XXXX</div>
</span><span class="cx">         <div style="grid-column: 2 / span 2; grid-row: 2;">XXX XXX</div>
</span><span class="cx">         <div style="grid-column: 1 / -1; grid-row: 3;">XXXXX XXXXX</div>
</span><span class="lines">@@ -100,7 +100,7 @@
</span><span class="cx"> checkColumns("gridFixedAndMinContentAndFlexMultipleOverlap", "20px 10px 70px");
</span><span class="cx"> checkColumns("gridMinMaxFixedFlexAndMaxContentAndAuto", "60px 20px 20px");
</span><span class="cx"> checkColumns("gridMinMaxFixedFlexAndMaxContentAndAutoNoFlexSpanningItems", "100px 0px 0px");
</span><del>-checkColumns("gridMinMaxFlexFixedAndMinContentAndFixed", "35px 5px 25px");
</del><ins>+checkColumns("gridMinMaxAutoFixedAndMinContentAndFixed", "35px 20px 25px");
</ins><span class="cx"> checkColumns("gridMinContentAndMinMaxFixedMinContentAndFlex", "20px 20px 60px");
</span><span class="cx"> checkColumns("gridMaxContentAndMinMaxFixedMaxContentAndFlex", "70px 20px 10px");
</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"> <html>
</span><span class="cx"> <link href="resources/grid.css" rel="stylesheet">
</span><span class="cx"> <style>
</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"> <p>Test that resolving auto tracks on grid items works properly.</p>
</span><span class="cx">
</span><span class="cx"> <div style="width: 0px">
</span><del>- <div class="grid gridMinFlexContent">
</del><ins>+ <div class="grid gridFlexContent">
</ins><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="0" data-expected-height="50"></div>
</span><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+<div style="width: 0px; position: relative;">
+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="20" data-expected-height="50">XX</div>
+ <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="20" data-offset-y="0" data-expected-width="30" data-expected-height="50">XXX</div>
+ </div>
+</div>
+
</ins><span class="cx"> <div style="width: 100px">
</span><span class="cx"> <div class="grid gridZeroFlexContent">
</span><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="0" data-expected-height="50"></div>
</span><span class="lines">@@ -67,17 +74,31 @@
</span><span class="cx">
</span><span class="cx"> <!-- Allow the extra logical space distribution to occur. -->
</span><span class="cx"> <div style="width: 40px; height: 10px">
</span><del>- <div class="grid gridMinFlexContent">
- <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="40" data-expected-height="50"></div>
</del><ins>+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="20" data-expected-height="50"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+<div style="width: 40px; height: 10px; position: relative;">
+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="30" data-expected-height="50">XXX</div>
+ <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="30" data-offset-y="0" data-expected-width="40" data-expected-height="50">XXXX</div>
+ </div>
+</div>
+
</ins><span class="cx"> <div style="width: 100px; height: 10px;">
</span><del>- <div class="grid gridMinFlexContent">
</del><ins>+ <div class="grid gridFlexContent">
</ins><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="50"></div>
</span><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+<div style="width: 100px; height: 10px; position: relative;">
+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50">XXX</div>
+ <div class="sizedToGridArea firstRowSecondColumn" data-offset-x="50" data-offset-y="0" data-expected-width="50" data-expected-height="50">XXXX</div>
+ </div>
+</div>
+
</ins><span class="cx"> <div class="constrainedContainer">
</span><span class="cx"> <div class="grid gridMaxFlexContent">
</span><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="30" data-expected-height="50"></div>
</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"> <html>
</span><span class="cx"> <link href="resources/grid.css" rel="stylesheet">
</span><span class="cx"> <style>
</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"> <p>Test that resolving auto tracks on grid items works properly.</p>
</span><span class="cx">
</span><span class="cx"> <div style="height: 0px">
</span><del>- <div class="grid gridMinFlexContent" style="height: 100%">
</del><ins>+ <div class="grid gridFlexContent">
</ins><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="0"></div>
</span><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="height: 0px">
</span><del>- <div class="grid gridZeroFlexContent">
</del><ins>+ <div class="grid gridFlexContent" style="height: 100%;">
</ins><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="0"></div>
</span><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+<div style="height: 0px; position: relative;">
+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="30">X<br>X</div>
+ <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="30" data-expected-width="50" data-expected-height="30">X<br>X<br>X</div>
+ </div>
+</div>
+
+<div style="height: 0px; position: relative;">
+ <div class="grid gridFlexContent" style="height: 100%;">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="20">X<br>X</div>
+ <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="20" data-expected-width="50" data-expected-height="30">X<br>X<br>X</div>
+ </div>
+</div>
+
</ins><span class="cx"> <div style="height: 0px">
</span><del>- <div class="grid gridMinFlexContent">
- <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="50"></div>
</del><ins>+ <div class="grid gridZeroFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="0"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <!-- Allow the extra logical space distribution to occur. -->
</span><span class="cx"> <div style="width: 10px; height: 40px">
</span><del>- <div class="grid gridMinFlexContent" style="height: 100%">
- <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="40"></div>
</del><ins>+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="0"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><span class="cx"> <div style="width: 10px; height: 40px">
</span><del>- <div class="grid gridMinFlexContent">
- <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="50"></div>
</del><ins>+ <div class="grid gridFlexContent" style="height: 100%;">
+ <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="20"></div>
</ins><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+<div style="width: 10px; height: 40px; position: relative">
+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="40">X<br>X<br>X</div>
+ <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="40" data-expected-width="50" data-expected-height="40">X<br>X<br>X<br>X</div>
+ </div>
+</div>
+
+<div style="width: 10px; height: 40px; position: relative">
+ <div class="grid gridFlexContent" style="height: 100%;">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="30">X<br>X<br>X</div>
+ <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="30" data-expected-width="50" data-expected-height="40">X<br>X<br>X<br>X</div>
+ </div>
+</div>
+
</ins><span class="cx"> <div style="width: 10px; height: 100px;">
</span><del>- <div class="grid gridMinFlexContent">
</del><ins>+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="0"></div>
+ </div>
+</div>
+
+<div style="width: 10px; height: 100px;">
+ <div class="grid gridFlexContent" style="height: 100%;">
</ins><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="50"></div>
</span><span class="cx"> </div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><ins>+<div style="width: 10px; height: 100px; position: relative;">
+ <div class="grid gridFlexContent">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="40">X<br>X<br>X</div>
+ <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="40" data-expected-width="50" data-expected-height="40">X<br>X<br>X<br>X</div>
+ </div>
+</div>
</ins><span class="cx">
</span><ins>+<div style="width: 10px; height: 100px; position: relative;">
+ <div class="grid gridFlexContent" style="height: 100%;">
+ <div class="sizedToGridArea firstRowFirstColumn" data-offset-x="0" data-offset-y="0" data-expected-width="50" data-expected-height="50">X<br>X<br>X</div>
+ <div class="sizedToGridArea secondRowFirstColumn" data-offset-x="0" data-offset-y="50" data-expected-width="50" data-expected-height="50">X<br>X<br>X<br>X</div>
+ </div>
+</div>
+
+
</ins><span class="cx"> <div class="constrainedContainer">
</span><span class="cx"> <div class="grid gridMaxFlexContent">
</span><span class="cx"> <div class="sizedToGridArea firstRowFirstColumn" data-expected-width="50" data-expected-height="30"></div>
</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 "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</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 "18px"
</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"> <!-- Check that gutters do not interfere with flex content resolution with content sized tracks -->
</span><span class="cx">
</span><span class="cx"> <div style="position: relative; width: 100px;">
</span><del>- <div class="grid gridMinMaxFlexFixedAndMinContentAndFixed gridRowColumnGaps" data-expected-width="100" data-expected-height="199">
-        <div style="grid-column: 1 / span 2;" data-expected-width="54" data-expected-height="20">XXXX XXXX</div>
-        <div style="grid-column: 2 / span 2; grid-row: 2;" data-expected-width="44" data-expected-height="20">XXX XXX</div>
-        <div style="grid-column: 1 / -1; grid-row: 3;" data-expected-width="98" data-expected-height="20">XXXXX XXXXX</div>
-        <div style="grid-column: 2 / span 2; grid-row: 4;" data-expected-width="44" data-expected-height="40">XX XX XX XX</div>
- </div>
-</div>
-
-<div style="position: relative; width: 100px;">
</del><span class="cx"> <div class="grid gridMinContentAndMinMaxFixedMinContentAndFlex gridRowColumnGaps" data-expected-width="100" data-expected-height="149">
</span><span class="cx">         <div style="grid-column: 2 / span 2;" data-expected-width="80">XXXXX</div>
</span><span class="cx">         <div style="grid-column: 1 / -1; grid-row: 2;" data-expected-width="100">XXX XXX XXX</div>
</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"> <div class="firstRowSecondColumn">XX XX XX</div>
</span><span class="cx"> </div>
</span><span class="cx">
</span><del>-<div class="grid gridFixedFraction min-content" data-expected-height="10" data-expected-width="10"></div>
</del><ins>+<div class="grid gridFixedFraction min-content" data-expected-height="10" data-expected-width="30"></div>
</ins><span class="cx">
</span><span class="cx"> <div class="grid gridFixedFraction max-content" data-expected-height="10" data-expected-width="30"></div>
</span><span class="cx"> <!-- Now with margin on one of the grid items. -->
</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 "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
</span><span class="cx"> PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</span><ins>+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
</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 "18px"
</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("minmax(minmax(10px, 20px), 20px)", "minmax(10px, 20px, 30px)");
</span><span class="cx"> // No breadth value and no comma.
</span><span class="cx"> testGridTemplatesSetBadJSValues("minmax()", "minmax(30px 30% 30em)");
</span><ins>+// Flexible lengths are invalid on the min slot of minmax().
+testGridTemplatesSetBadJSValues("minmax(0fr, 100px)", "minmax(.0fr, 200px)");
+testGridTemplatesSetBadJSValues("minmax(1fr, 100px)", "minmax(2.5fr, 200px)");
</ins><span class="cx">
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2fr", "3ffr");
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2.05fr", "+-3fr");
</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("minmax(minmax(10px, 20px), 20px)", "minmax(10px, 20px, 30px)");
</span><span class="cx"> // No breadth value and no comma.
</span><span class="cx"> testGridTemplatesSetBadJSValues("minmax()", "minmax(30px 30% 30em)");
</span><ins>+// Flexible lengths are invalid on the min slot of minmax().
+testGridTemplatesSetBadJSValues("minmax(0fr, 100px)", "minmax(.0fr, 200px)");
+testGridTemplatesSetBadJSValues("minmax(1fr, 100px)", "minmax(2.5fr, 200px)");
+
</ins><span class="cx"> testGridTemplatesSetBadJSValues("-2fr", "3ffr");
</span><span class="cx"> testGridTemplatesSetBadJSValues("-2.05fr", "+-3fr");
</span><span class="cx"> testGridTemplatesSetBadJSValues("0fr", "1r");
</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 <rego@igalia.com>
+
+ [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:
+ <track-size> =
+ <track-breadth> |
+ minmax( <inflexible-breadth> , <track-breadth> )
+
+ 2) Flex sizes outside minmax() behave as auto minimum.
+
+ Flex sizes outside minmax() were previously behaving like
+ minimum and maximum (e.g. 1fr => 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 "InflexibleSizeOnly" restriction
+ when needed.
+ (WebCore::CSSParser::parseGridBreadth): Add check for
+ "InflexibleSizeOnly" resctriction.
+ * css/CSSParser.h: Add new type of restriction "InflexibleSizeOnly".
+ * 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 <youenn.fablet@crf.canon.fr>
</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->size() != 3 || !isComma(arguments->valueAt(1)))
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- RefPtr<CSSPrimitiveValue> minTrackBreadth = parseGridBreadth(*arguments->valueAt(0), restriction);
</del><ins>+ TrackSizeRestriction minTrackBreadthRestriction = restriction == AllowAll ? InflexibleSizeOnly : restriction;
+ RefPtr<CSSPrimitiveValue> minTrackBreadth = parseGridBreadth(*arguments->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<CSSValue>&);
</span><span class="cx"> RefPtr<CSSValue> parseGridTrackList();
</span><span class="cx"> bool parseGridTrackRepeatFunction(CSSValueList&, bool& isAutoRepeat);
</span><del>- enum TrackSizeRestriction { FixedSizeOnly, AllowAll };
</del><ins>+ enum TrackSizeRestriction { FixedSizeOnly, InflexibleSizeOnly, AllowAll };
</ins><span class="cx"> RefPtr<CSSValue> parseGridTrackSize(CSSParserValueList& inputList, TrackSizeRestriction = AllowAll);
</span><span class="cx"> RefPtr<CSSPrimitiveValue> parseGridBreadth(CSSParserValue&, TrackSizeRestriction = AllowAll);
</span><span class="cx"> bool parseGridTemplateAreasRow(NamedGridAreaMap&, const unsigned, unsigned&);
</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. "1fr"), 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>