<!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>[207288] 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/207288">207288</a></dd>
<dt>Author</dt> <dd>svillar@igalia.com</dd>
<dt>Date</dt> <dd>2016-10-13 08:25:14 -0700 (Thu, 13 Oct 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>[css-grid] Fix intrinsic maximums resolution with fit-content and auto
https://bugs.webkit.org/show_bug.cgi?id=163282

Reviewed by Manuel Rego Casasnovas.

Source/WebCore:

The step 2.5 in section 12.5 https://drafts.csswg.org/css-grid/#algo-content of the specs,
details how to sizes tracks with intrinsic max track sizing functions.

Not so long ago there were only two max track sizing functions min-content and max-content
(auto was always resolved to max-content). However there were some recent changes that force
us to consider 2 new values: auto (which is not internally translated to max-content
although it still works the same) and specially the newly added fit-content.

Some of the new test cases are commented due to bug http://wkb.ug/163283.

Test: fast/css-grid-layout/grid-intrinsic-maximums.html

* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase):
* rendering/style/GridTrackSize.h:
(WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes):
(WebCore::GridTrackSize::hasIntrinsicMinTrackBreadth):
(WebCore::GridTrackSize::hasIntrinsicMaxTrackBreadth):
(WebCore::GridTrackSize::hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth):

LayoutTests:

New test cases to verify that all tracks with intrinsic max track sizing functions are used
in step 2.5 of the track sizing algorith. Some of the new test cases are commented due to
http://wkb.ug/163283.

* fast/css-grid-layout/grid-intrinsic-maximums-expected.html: Added.
* fast/css-grid-layout/grid-intrinsic-maximums.html: Added.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingstyleGridTrackSizeh">trunk/Source/WebCore/rendering/style/GridTrackSize.h</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridintrinsicmaximumsexpectedhtml">trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssgridlayoutgridintrinsicmaximumshtml">trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (207287 => 207288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-10-13 15:00:09 UTC (rev 207287)
+++ trunk/LayoutTests/ChangeLog        2016-10-13 15:25:14 UTC (rev 207288)
</span><span class="lines">@@ -1,3 +1,17 @@
</span><ins>+2016-10-11  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [css-grid] Fix intrinsic maximums resolution with fit-content and auto
+        https://bugs.webkit.org/show_bug.cgi?id=163282
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        New test cases to verify that all tracks with intrinsic max track sizing functions are used
+        in step 2.5 of the track sizing algorith. Some of the new test cases are commented due to
+        http://wkb.ug/163283.
+
+        * fast/css-grid-layout/grid-intrinsic-maximums-expected.html: Added.
+        * fast/css-grid-layout/grid-intrinsic-maximums.html: Added.
+
</ins><span class="cx"> 2016-10-13  Carlos Alberto Lopez Perez  &lt;clopez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Rebaseline tests affected by r207280 and report 3 new failures on accesibility tests.
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssgridlayoutgridintrinsicmaximumsexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html (0 => 207288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html        2016-10-13 15:25:14 UTC (rev 207288)
</span><span class="lines">@@ -0,0 +1,168 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;link href=&quot;resources/grid.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;link href=&quot;../css-intrinsic-dimensions/resources/width-keyword-classes.css&quot; rel=&quot;stylesheet&quot;&gt;
+
+&lt;style&gt;
+
+.item {
+    font: 10px/1 Ahem;
+    background: cyan;
+    grid-column: 1 / -1;
+}
+
+.abs {
+    width: 100%;
+    height: 5px;
+    position: absolute;
+}
+
+.grid {
+    border: 2px solid black;
+    display: grid;
+    position: relative;
+    padding-top: 10px;
+    margin-bottom: 10px;
+    width: 100px;
+    justify-items: start;
+}
+
+.float {
+    float: left;
+    width: 200px;
+}
+
+.col1 { grid-column: 1 / 2; background: orange; }
+.col2 { grid-column: 2 / 3; background: indigo; }
+.col3 { grid-column: 3 / 4; background: green; }
+
+&lt;/style&gt;
+
+&lt;div class=&quot;float&quot;&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 10px 5px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 50px 5px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 85px 5px;&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 5px 85px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 5px 85px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 5px 85px;&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/div&gt;
+
+&lt;div class=&quot;float&quot;&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / repeat(2, 5px) 80px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 25px 5px 60px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / calc(85px / 2) 5px calc(85px / 2);&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 90px repeat(2, 5px);&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 70px 5px 25px;&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / calc(105px/2) 5px calc(85px/2);&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;/div&gt;
+
+&lt;div class=&quot;float&quot;&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / calc(60px - 15px/2) 5px calc(25px + 35px/2);&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / calc(60px + 25px/2) 5px calc(25px - 5px/2);&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid&quot; style=&quot;grid-template: 20px / 90px 5px 5px;&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkLayoutTestsfastcssgridlayoutgridintrinsicmaximumshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums.html (0 => 207288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums.html        2016-10-13 15:25:14 UTC (rev 207288)
</span><span class="lines">@@ -0,0 +1,174 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;link href=&quot;resources/grid.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;link href=&quot;resources/grid-alignment.css&quot; rel=&quot;stylesheet&quot;&gt;
+&lt;link href=&quot;../css-intrinsic-dimensions/resources/width-keyword-classes.css&quot; rel=&quot;stylesheet&quot;&gt;
+
+&lt;style&gt;
+
+.item {
+    font: 10px/1 Ahem;
+    background: cyan;
+    grid-column: 1 / -1;
+}
+
+.abs {
+    width: 100%;
+    height: 5px;
+    position: absolute;
+}
+
+.grid {
+    border: 2px solid black;
+    display: grid;
+    position: relative;
+    padding-top: 10px;
+    margin-bottom: 10px;
+    width: 100px;
+    justify-items: start; /* to prevent stretching */
+}
+
+.float {
+    float: left;
+    width: 200px;
+}
+
+.col1 { grid-column: 1 / 2; background: orange; }
+.col2 { grid-column: 2 / 3; background: indigo; }
+.col3 { grid-column: 3 / 4; background: green; }
+
+.gridMinContent { grid-template: 20px / minmax(0px, -webkit-min-content) 5px; }
+.gridMaxContent { grid-template: 20px / 5px minmax(0px, -webkit-max-content); }
+.gridMinMaxContent { grid-template: 20px / minmax(0px, -webkit-min-content) 5% minmax(0px, -webkit-max-content); }
+.gridAutoMinContent { grid-template: 20px / minmax(0px, auto) 5px minmax(0px, -webkit-min-content); }
+.gridFitContentAuto { grid-template: 20px / fit-content(100px) 5px minmax(0px, auto); }
+
+&lt;/style&gt;
+
+&lt;div class=&quot;float&quot;&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid gridMinContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid gridMinContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid gridMinContent&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid gridMaxContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid gridMaxContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid gridMaxContent&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/div&gt;
+
+&lt;div class=&quot;float&quot;&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid gridMinMaxContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid gridMinMaxContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid gridMinMaxContent&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid gridAutoMinContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;div class=&quot;grid gridAutoMinContent&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;!-- Fails due to http://wkb.ug/163283 --&gt;
+&lt;!--
+&lt;div class=&quot;grid gridAutoMinContent&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+--&gt;
+
+&lt;/div&gt;
+
+&lt;div class=&quot;float&quot;&gt;
+
+&lt;div class=&quot;grid gridFitContentAuto&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 15px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid gridFitContentAuto&quot;&gt;
+    &lt;div class=&quot;item&quot; style=&quot;min-width: 55px;&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;grid gridFitContentAuto&quot;&gt;
+    &lt;div class=&quot;item min-width-max-content&quot;&gt;XXXX XXXX&lt;/div&gt;
+    &lt;div class=&quot;abs col1&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col2&quot;&gt;&lt;/div&gt;
+    &lt;div class=&quot;abs col3&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
+
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-grid-layout/grid-intrinsic-maximums.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<ins>+LF
</ins><span class="cx">\ No newline at end of property
</span><a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<ins>+text/html
</ins><span class="cx">\ No newline at end of property
</span><a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (207287 => 207288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2016-10-13 15:00:09 UTC (rev 207287)
+++ trunk/Source/WebCore/ChangeLog        2016-10-13 15:25:14 UTC (rev 207288)
</span><span class="lines">@@ -1,3 +1,30 @@
</span><ins>+2016-10-11  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        [css-grid] Fix intrinsic maximums resolution with fit-content and auto
+        https://bugs.webkit.org/show_bug.cgi?id=163282
+
+        Reviewed by Manuel Rego Casasnovas.
+
+        The step 2.5 in section 12.5 https://drafts.csswg.org/css-grid/#algo-content of the specs,
+        details how to sizes tracks with intrinsic max track sizing functions.
+
+        Not so long ago there were only two max track sizing functions min-content and max-content
+        (auto was always resolved to max-content). However there were some recent changes that force
+        us to consider 2 new values: auto (which is not internally translated to max-content
+        although it still works the same) and specially the newly added fit-content.
+
+        Some of the new test cases are commented due to bug http://wkb.ug/163283.
+
+        Test: fast/css-grid-layout/grid-intrinsic-maximums.html
+
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::shouldProcessTrackForTrackSizeComputationPhase):
+        * rendering/style/GridTrackSize.h:
+        (WebCore::GridTrackSize::cacheMinMaxTrackBreadthTypes):
+        (WebCore::GridTrackSize::hasIntrinsicMinTrackBreadth):
+        (WebCore::GridTrackSize::hasIntrinsicMaxTrackBreadth):
+        (WebCore::GridTrackSize::hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth):
+
</ins><span class="cx"> 2016-10-13  Miguel Gomez  &lt;magomez@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK] Video playback doesn't work properly with accelerated compositing disabled
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (207287 => 207288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-10-13 15:00:09 UTC (rev 207287)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2016-10-13 15:25:14 UTC (rev 207288)
</span><span class="lines">@@ -1212,7 +1212,7 @@
</span><span class="cx">     case ResolveMaxContentMinimums:
</span><span class="cx">         return trackSize.hasMaxContentMinTrackBreadth();
</span><span class="cx">     case ResolveIntrinsicMaximums:
</span><del>-        return trackSize.hasMinOrMaxContentMaxTrackBreadth();
</del><ins>+        return trackSize.hasIntrinsicMaxTrackBreadth();
</ins><span class="cx">     case ResolveMaxContentMaximums:
</span><span class="cx">         return trackSize.hasMaxContentOrAutoMaxTrackBreadth();
</span><span class="cx">     case MaximizeTracks:
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingstyleGridTrackSizeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/style/GridTrackSize.h (207287 => 207288)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/style/GridTrackSize.h        2016-10-13 15:00:09 UTC (rev 207287)
+++ trunk/Source/WebCore/rendering/style/GridTrackSize.h        2016-10-13 15:25:14 UTC (rev 207288)
</span><span class="lines">@@ -104,9 +104,16 @@
</span><span class="cx">         m_maxTrackBreadthIsMaxContent = maxTrackBreadth().isLength() &amp;&amp; maxTrackBreadth().length().isMaxContent();
</span><span class="cx">         m_maxTrackBreadthIsMinContent = maxTrackBreadth().isLength() &amp;&amp; maxTrackBreadth().length().isMinContent();
</span><span class="cx">         m_maxTrackBreadthIsAuto = maxTrackBreadth().isLength() &amp;&amp; maxTrackBreadth().length().isAuto();
</span><ins>+
+        // These values depend on the above ones so keep them here.
+        m_minTrackBreadthIsIntrinsic = m_minTrackBreadthIsMaxContent || m_minTrackBreadthIsMinContent
+            || m_minTrackBreadthIsAuto || isFitContent();
+        m_maxTrackBreadthIsIntrinsic = m_maxTrackBreadthIsMaxContent || m_maxTrackBreadthIsMinContent
+            || m_maxTrackBreadthIsAuto || isFitContent();
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    bool hasIntrinsicMinTrackBreadth() const { return m_minTrackBreadthIsMaxContent || m_minTrackBreadthIsMinContent || m_minTrackBreadthIsAuto; }
</del><ins>+    bool hasIntrinsicMinTrackBreadth() const { return m_minTrackBreadthIsIntrinsic; }
+    bool hasIntrinsicMaxTrackBreadth() const { return m_maxTrackBreadthIsIntrinsic; }
</ins><span class="cx">     bool hasMinOrMaxContentMinTrackBreadth() const { return m_minTrackBreadthIsMaxContent || m_minTrackBreadthIsMinContent; }
</span><span class="cx">     bool hasAutoMinTrackBreadth() const { return m_minTrackBreadthIsAuto; }
</span><span class="cx">     bool hasAutoMaxTrackBreadth() const { return m_maxTrackBreadthIsAuto; }
</span><span class="lines">@@ -117,7 +124,7 @@
</span><span class="cx">     bool hasMaxContentMinTrackBreadth() const { return m_minTrackBreadthIsMaxContent; }
</span><span class="cx">     bool hasMinContentMinTrackBreadth() const { return m_minTrackBreadthIsMinContent; }
</span><span class="cx">     bool hasMaxContentMinTrackBreadthAndMaxContentMaxTrackBreadth() const { return m_minTrackBreadthIsMaxContent &amp;&amp; m_maxTrackBreadthIsMaxContent; }
</span><del>-    bool hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth() const { return (m_minTrackBreadthIsMinContent || m_minTrackBreadthIsAuto) &amp;&amp; (m_maxTrackBreadthIsAuto || hasMinOrMaxContentMaxTrackBreadth()); }
</del><ins>+    bool hasAutoOrMinContentMinTrackBreadthAndIntrinsicMaxTrackBreadth() const { return (m_minTrackBreadthIsMinContent || m_minTrackBreadthIsAuto) &amp;&amp; m_maxTrackBreadthIsIntrinsic; }
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     GridTrackSizeType m_type;
</span><span class="lines">@@ -131,6 +138,8 @@
</span><span class="cx">     bool m_minTrackBreadthIsMinContent : 1;
</span><span class="cx">     bool m_maxTrackBreadthIsMaxContent : 1;
</span><span class="cx">     bool m_maxTrackBreadthIsMinContent : 1;
</span><ins>+    bool m_minTrackBreadthIsIntrinsic : 1;
+    bool m_maxTrackBreadthIsIntrinsic : 1;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace WebCore
</span></span></pre>
</div>
</div>

</body>
</html>