<!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>[185908] 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/185908">185908</a></dd>
<dt>Author</dt> <dd>svillar@igalia.com</dd>
<dt>Date</dt> <dd>2015-06-24 06:36:00 -0700 (Wed, 24 Jun 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>intrinsic size keywords don't work for heights
https://bugs.webkit.org/show_bug.cgi?id=113610

Reviewed by Darin Adler.

Source/WebCore:

Based on Blink's <a href="http://trac.webkit.org/projects/webkit/changeset/148314">r148314</a> &amp; <a href="http://trac.webkit.org/projects/webkit/changeset/150355">r150355</a> by &lt;cbiesinger@chromium.org&gt;.

Adds intrinsic values support to heigh &amp; min/max-height. This involves the
following changes:
- RenderBox needs to pass the content height through to computeLogicalHeight and
related functions, which needs it to resolve max-content, et. al.
- Make the callers pass the content height to this function. Some callers pass
logicalHeight() (adjusted for border/padding) which works because if
logicalHeight is not the content height, then it is the height we ended up using,
so the constrain* functions will just constrain to that value again.
- Parsing code needs to be adjusted to support intrinsic values for heights.

Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
       fast/css-intrinsic-dimensions/height-css-tables.html
       fast/css-intrinsic-dimensions/height-flexbox.html
       fast/css-intrinsic-dimensions/height-positioned-replaced.html
       fast/css-intrinsic-dimensions/height-positioned.html
       fast/css-intrinsic-dimensions/height-replaced.html
       fast/css-intrinsic-dimensions/height-tables-collapsed.html
       fast/css-intrinsic-dimensions/height-tables.html
       fast/css-intrinsic-dimensions/height.html

* css/CSSParser.cpp:
(WebCore::CSSParser::isValidSize): Refactored from validateWidth and
validateHeight.
(WebCore::CSSParser::parseValue):
(WebCore::CSSParser::validateWidth): Deleted.
(WebCore::CSSParser::validateHeight): Deleted.
* css/CSSParser.h:
* platform/Length.h:
(WebCore::Length::isFillAvailable):
(WebCore::Length::isFitContent):
* rendering/RenderBox.cpp:
(WebCore::RenderBox::constrainLogicalHeightByMinMax):
(WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
(WebCore::RenderBox::computeLogicalHeight):
(WebCore::RenderBox::computeLogicalHeightUsing):
(WebCore::RenderBox::computeContentLogicalHeight):
(WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
(WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
(WebCore::RenderBox::computePercentageLogicalHeight):
(WebCore::RenderBox::computeReplacedLogicalHeightUsing):
(WebCore::RenderBox::availableLogicalHeight):
(WebCore::RenderBox::availableLogicalHeightUsing):
(WebCore::RenderBox::computePositionedLogicalHeight):
(WebCore::RenderBox::computePositionedLogicalHeightUsing):
* rendering/RenderBox.h:
* rendering/RenderFlexibleBox.cpp:
(WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
(WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
* rendering/RenderFlowThread.cpp:
(WebCore::RenderFlowThread::addForcedRegionBreak):
* rendering/RenderGrid.cpp:
(WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
(WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
* rendering/RenderMultiColumnSet.cpp:
(WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
* rendering/RenderReplaced.cpp:
(WebCore::RenderReplaced::hasReplacedLogicalHeight):
* rendering/RenderTable.cpp:
(WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
(WebCore::RenderTable::layout):

LayoutTests:

Based on Blink's <a href="http://trac.webkit.org/projects/webkit/changeset/148314">r148314</a> by &lt;cbiesinger@chromium.org&gt;.

* fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html: Added.
* fast/css-intrinsic-dimensions/height-css-tables-collapsed.html: Added.
* fast/css-intrinsic-dimensions/height-css-tables-expected.html: Added.
* fast/css-intrinsic-dimensions/height-css-tables.html: Added.
* fast/css-intrinsic-dimensions/height-expected.html: Added.
* fast/css-intrinsic-dimensions/height-flexbox-expected.html: Added.
* fast/css-intrinsic-dimensions/height-flexbox.html: Added.
* fast/css-intrinsic-dimensions/height-positioned-expected.html: Added.
* fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html: Added.
* fast/css-intrinsic-dimensions/height-positioned-replaced.html: Added.
* fast/css-intrinsic-dimensions/height-positioned.html: Added.
* fast/css-intrinsic-dimensions/height-property-value-expected.txt:
* fast/css-intrinsic-dimensions/height-property-value.html:
* fast/css-intrinsic-dimensions/height-property-value.html.orig: Copied from LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.
* fast/css-intrinsic-dimensions/height-replaced-expected.html: Added.
* fast/css-intrinsic-dimensions/height-replaced.html: Added.
* fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html: Added.
* fast/css-intrinsic-dimensions/height-tables-collapsed.html: Added.
* fast/css-intrinsic-dimensions/height-tables-expected.html: Added.
* fast/css-intrinsic-dimensions/height-tables.html: Added.
* fast/css-intrinsic-dimensions/height.html: Added.
* fast/css-intrinsic-dimensions/resources/height-keyword-classes.css: Added.
(.min-content):
(.max-content):
(.fill-available):
(.fit-content):
(.max-height-min-content):
(.max-height-max-content):
(.max-height-fill-available):
(.max-height-fit-content):
(.min-height-min-content):
(.min-height-max-content):
(.min-height-fill-available):
(.min-height-fit-content):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvalueexpectedtxt">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvaluehtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html</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="#trunkSourceWebCoreplatformLengthh">trunk/Source/WebCore/platform/Length.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxcpp">trunk/Source/WebCore/rendering/RenderBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderBoxh">trunk/Source/WebCore/rendering/RenderBox.h</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlexibleBoxcpp">trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderFlowThreadcpp">trunk/Source/WebCore/rendering/RenderFlowThread.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderGridcpp">trunk/Source/WebCore/rendering/RenderGrid.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderMultiColumnSetcpp">trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderReplacedcpp">trunk/Source/WebCore/rendering/RenderReplaced.cpp</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightcsstablescollapsedexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightcsstablescollapsedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightcsstablesexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightcsstableshtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightflexboxexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightflexboxhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedreplacedexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedreplacedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvaluehtmlorig">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.orig</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightreplacedexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheightreplacedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheighttablescollapsedexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheighttablescollapsedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheighttablesexpectedhtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-expected.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheighttableshtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsheighthtml">trunk/LayoutTests/fast/css-intrinsic-dimensions/height.html</a></li>
<li><a href="#trunkLayoutTestsfastcssintrinsicdimensionsresourcesheightkeywordclassescss">trunk/LayoutTests/fast/css-intrinsic-dimensions/resources/height-keyword-classes.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/LayoutTests/ChangeLog        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -1,3 +1,47 @@
</span><ins>+2015-06-11  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        intrinsic size keywords don't work for heights
+        https://bugs.webkit.org/show_bug.cgi?id=113610
+
+        Reviewed by Darin Adler.
+
+        Based on Blink's r148314 by &lt;cbiesinger@chromium.org&gt;.
+
+        * fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-css-tables-collapsed.html: Added.
+        * fast/css-intrinsic-dimensions/height-css-tables-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-css-tables.html: Added.
+        * fast/css-intrinsic-dimensions/height-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-flexbox-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-flexbox.html: Added.
+        * fast/css-intrinsic-dimensions/height-positioned-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-positioned-replaced.html: Added.
+        * fast/css-intrinsic-dimensions/height-positioned.html: Added.
+        * fast/css-intrinsic-dimensions/height-property-value-expected.txt:
+        * fast/css-intrinsic-dimensions/height-property-value.html:
+        * fast/css-intrinsic-dimensions/height-property-value.html.orig: Copied from LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.
+        * fast/css-intrinsic-dimensions/height-replaced-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-replaced.html: Added.
+        * fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-tables-collapsed.html: Added.
+        * fast/css-intrinsic-dimensions/height-tables-expected.html: Added.
+        * fast/css-intrinsic-dimensions/height-tables.html: Added.
+        * fast/css-intrinsic-dimensions/height.html: Added.
+        * fast/css-intrinsic-dimensions/resources/height-keyword-classes.css: Added.
+        (.min-content):
+        (.max-content):
+        (.fill-available):
+        (.fit-content):
+        (.max-height-min-content):
+        (.max-height-max-content):
+        (.max-height-fill-available):
+        (.max-height-fit-content):
+        (.min-height-min-content):
+        (.min-height-max-content):
+        (.min-height-fill-available):
+        (.min-height-fit-content):
+
</ins><span class="cx"> 2015-06-23  Myles C. Maxfield  &lt;mmaxfield@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [OS X] Rebaseline fast/text/font-weight{,-zh}.html for El Capitan
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightcsstablescollapsedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  .table { border: 2px solid red; display: table; border-collapse: collapse; border-spacing: 2px; }
+  .td { border: 2px solid green; display: table-cell; }
+&lt;/style&gt;
+
+&lt;div class=&quot;table&quot;&gt;
+  &lt;div class=&quot;td&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;table&gt;
+  &lt;div class=&quot;td&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;table&quot; style=&quot;height: 100%; box-sizing: border-box;&quot;&gt;
+    &lt;div class=&quot;td&quot;&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;div class=&quot;table container&quot; style=&quot;display: block; float: left; height: 98px; border: 2px solid green;&quot;&gt;
+  &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightcsstablescollapsedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  @import &quot;resources/height-keyword-classes.css&quot;;
+
+  .small { height: 1px; }
+  .big { height: 300px; }
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  .table { border: 2px solid red; display: table; border-collapse: collapse; border-spacing: 2px; }
+  .td { border: 2px solid green; display: table-cell; }
+&lt;/style&gt;
+
+&lt;div class=&quot;table big max-height-min-content&quot;&gt;
+  &lt;div class=&quot;td&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;table&gt;
+  &lt;div class=&quot;td small min-height-min-content&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;table small min-height-fill-available&quot;&gt;
+    &lt;div class=&quot;td&quot;&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;div class=&quot;table container&quot;&gt;
+  &lt;div class=&quot;td small min-height-fill-available&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightcsstablesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  .table { border: 2px solid red; display: table; border-spacing: 2px; }
+  .td { border: 2px solid green; display: table-cell; }
+&lt;/style&gt;
+
+&lt;div class=&quot;table&quot;&gt;
+  &lt;div class=&quot;td&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;table&gt;
+  &lt;div class=&quot;td&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;table&quot; style=&quot;height: 100%; box-sizing: border-box;&quot;&gt;
+    &lt;div class=&quot;td&quot;&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;div class=&quot;table container&quot; style=&quot;display: block; float: left; height: 98px;&quot;&gt;
+  &lt;div class=&quot;td&quot; style=&quot;height: 90px;&quot; style=&quot;display: block;&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightcsstableshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  @import &quot;resources/height-keyword-classes.css&quot;;
+
+  .small { height: 1px; }
+  .big { height: 300px; }
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  .table { border: 2px solid red; display: table; border-spacing: 2px; }
+  .td { border: 2px solid green; display: table-cell; }
+&lt;/style&gt;
+
+&lt;div class=&quot;table big max-height-min-content&quot;&gt;
+  &lt;div class=&quot;td&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;table&gt;
+  &lt;div class=&quot;td small min-height-min-content&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;table small min-height-fill-available&quot;&gt;
+    &lt;div class=&quot;td&quot;&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+
+&lt;div class=&quot;table container&quot;&gt;
+  &lt;div class=&quot;td small min-height-fill-available&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-css-tables.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,80 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+    body * {
+        border: 2px solid red;
+        padding: 5px;
+        clear: both;
+    }
+
+    .container {
+        height: 300px;
+        border-color: blue;
+
+        display: inline-block;
+        width: 100px;
+    }
+
+    .fill-available {
+      height: 100%;
+      box-sizing: border-box;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div&gt;
+    height: min-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div&gt;
+    height: max-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div&gt;
+    height: fit-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;fill-available&quot;&gt;
+    height: fill-available&lt;br&gt; on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div&gt;
+    min-height: min-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div&gt;
+    min-height: max-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div&gt;
+    min-height: fit-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;fill-available&quot;&gt;
+    min-height: fill-available&lt;br&gt; on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div&gt;
+    max-height: min-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div&gt;
+    max-height: max-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div&gt;
+    max-height: fit-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;fill-available&quot;&gt;
+    max-height: fill-available&lt;br&gt; on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightflexboxexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,27 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+  .container {
+    border: 2px solid blue;
+  }
+
+  .item {
+    border: 2px solid red;
+  }
+&lt;/style&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;item&quot;&gt;
+    Line 1&lt;br&gt;
+    Line 2
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;item&quot;&gt;
+    Line 1
+  &lt;/div&gt;
+  &lt;div class=&quot;item&quot;&gt;
+    Line 1&lt;br&gt;
+    Line 2
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightflexboxhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+  @import &quot;resources/height-keyword-classes.css&quot;;
+
+  .container {
+    display: -webkit-flex;
+    display: flex;
+    -webkit-flex-direction: column;
+    flex-direction: column;
+
+    border: 2px solid blue;
+  }
+
+  .item {
+    height: 1px;
+    border: 2px solid red;
+    -webkit-flex: 1;
+    flex: 1;
+  }
+&lt;/style&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;item min-height-min-content&quot;&gt;
+    Line 1&lt;br&gt;
+    Line 2
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;item min-height-min-content&quot;&gt;
+    Line 1
+  &lt;/div&gt;
+  &lt;div class=&quot;item min-height-min-content&quot;&gt;
+    Line 1&lt;br&gt;
+    Line 2
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-flexbox.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,120 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+--&gt;
+&lt;style&gt;
+    body * {
+      border: 2px solid red;
+      padding: 5px;
+      clear: both;
+    }
+
+    .container {
+      height: 400px;
+      border-color: blue;
+
+      display: inline-block;
+      width: 100px;
+    }
+
+    .position-container {
+      border-color: green;
+      position: relative;
+      height: 100px;
+    }
+
+    .position-container &gt; * {
+      position: absolute;
+    }
+
+    .f-a-container {
+      height: 100%;
+      box-sizing: border-box;
+    }
+
+    .fill-available {
+      height: 386px;
+      box-sizing: border-box;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      height: min-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      height: max-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      height: fit-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;div class=&quot;fill-available&quot;&gt;
+      height: fill-available&lt;br&gt; on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      min-height: min-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      min-height: max-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      min-height: fit-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;div class=&quot;fill-available&quot;&gt;
+      min-height: fill-available&lt;br&gt; on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      max-height: min-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      max-height: max-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div&gt;
+      max-height: fit-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;div class=&quot;fill-available&quot;&gt;
+      max-height: fill-available&lt;br&gt; on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedreplacedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,111 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+iframes have an intrinsic size of 300x150
+--&gt;
+&lt;style&gt;
+    body * {
+      border: 2px solid red;
+      padding: 5px;
+      clear: both;
+    }
+
+    .container {
+      height: 600px;
+      border-color: blue;
+
+      display: inline-block;
+      width: 100px;
+    }
+
+    .position-container {
+      border-color: green;
+      position: relative;
+      height: 180px;
+    }
+
+    .position-container &gt; * {
+      position: absolute;
+      border: 5px solid pink;
+      width: 50px;
+    }
+
+    .f-a-container {
+      height: 100%;
+      box-sizing: border-box;
+    }
+
+    .fill-available {
+      height: 586px;
+      width: 70px;
+      box-sizing: border-box;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;iframe class=&quot;fill-available&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;iframe class=&quot;fill-available&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;iframe class=&quot;fill-available&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedreplacedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,119 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+iframes have an intrinsic size of 300x150
+--&gt;
+&lt;style&gt;
+    @import &quot;resources/height-keyword-classes.css&quot;;
+
+    body * {
+      border: 2px solid red;
+      padding: 5px;
+      clear: both;
+    }
+
+    .container {
+      height: 600px;
+      border-color: blue;
+
+      display: inline-block;
+      width: 100px;
+    }
+
+    .position-container {
+      border-color: green;
+      position: relative;
+      height: 180px;
+    }
+
+    .position-container &gt; * {
+      position: absolute;
+      border: 5px solid pink;
+      width: 50px;
+    }
+
+    .f-a-container {
+      height: 100%;
+      box-sizing: border-box;
+    }
+
+    .small {
+      height: 1px;
+    }
+
+    .big {
+      height: 300px;
+    }
+
+    .really-big {
+      height: 1000px;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;min-content&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;max-content&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;fit-content&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;iframe class=&quot;fill-available&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;small min-height-min-content&quot;&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;small min-height-max-content&quot;&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;small min-height-fit-content&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;iframe class=&quot;small min-height-fill-available&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;big max-height-min-content&quot;&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;big max-height-max-content&quot;&gt;
+    &lt;/iframe&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;iframe class=&quot;big max-height-fit-content&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;iframe class=&quot;really-big max-height-fill-available&quot;&gt;
+    &lt;/iframe&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned-replaced.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpositionedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,129 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+--&gt;
+&lt;style&gt;
+    @import &quot;resources/height-keyword-classes.css&quot;;
+
+    body * {
+      border: 2px solid red;
+      padding: 5px;
+      clear: both;
+    }
+
+    .container {
+      height: 400px;
+      border-color: blue;
+
+      display: inline-block;
+      width: 100px;
+    }
+
+    .position-container {
+      border-color: green;
+      position: relative;
+      height: 100px;
+    }
+
+    .position-container &gt; * {
+      position: absolute;
+    }
+
+    .f-a-container {
+      height: 100%;
+      box-sizing: border-box;
+    }
+
+    .small {
+      height: 1px;
+    }
+
+    .big {
+      height: 200px;
+    }
+
+    .really-big {
+      height: 1000px;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;min-content&quot;&gt;
+      height: min-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;max-content&quot;&gt;
+      height: max-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;fit-content&quot;&gt;
+      height: fit-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;div class=&quot;fill-available&quot;&gt;
+      height: fill-available&lt;br&gt; on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;small min-height-min-content&quot;&gt;
+      min-height: min-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;small min-height-max-content&quot;&gt;
+      min-height: max-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;small min-height-fit-content&quot;&gt;
+      min-height: fit-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;div class=&quot;small min-height-fill-available&quot;&gt;
+      min-height: fill-available&lt;br&gt; on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;big max-height-min-content&quot;&gt;
+      max-height: min-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;big max-height-max-content&quot;&gt;
+      max-height: max-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+
+  &lt;/div&gt;
+  &lt;div class=&quot;position-container&quot;&gt;
+    &lt;div class=&quot;big max-height-fit-content&quot;&gt;
+      max-height: fit-content&lt;br&gt;on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;position-container f-a-container&quot;&gt;
+    &lt;div class=&quot;really-big max-height-fill-available&quot;&gt;
+      max-height: fill-available&lt;br&gt; on this box.
+    &lt;/div&gt;
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-positioned.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvalueexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value-expected.txt (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value-expected.txt        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value-expected.txt        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -1,35 +1,20 @@
</span><del>-Tests that the height keywords are not exposed yet.
</del><ins>+Tests that the height keywords are parsed.
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span><span class="cx"> 
</span><del>-PASS divs[i].style.height is &quot;&quot;
-PASS divs[i].style.minHeight is &quot;&quot;
-PASS divs[i].style.maxHeight is &quot;&quot;
-PASS divs[i].style.height is &quot;&quot;
-PASS divs[i].style.minHeight is &quot;&quot;
-PASS divs[i].style.maxHeight is &quot;&quot;
-PASS divs[i].style.height is &quot;&quot;
-PASS divs[i].style.minHeight is &quot;&quot;
-PASS divs[i].style.maxHeight is &quot;&quot;
-PASS divs[i].style.height is &quot;&quot;
-PASS divs[i].style.minHeight is &quot;&quot;
-PASS divs[i].style.maxHeight is &quot;&quot;
-PASS divs[i].style.height is &quot;&quot;
-PASS divs[i].style.minHeight is &quot;&quot;
-PASS divs[i].style.maxHeight is &quot;&quot;
-PASS div.style.height is &quot;&quot;
-PASS div.style.minHeight is &quot;&quot;
-PASS div.style.maxHeight is &quot;&quot;
-PASS div.style.height is &quot;&quot;
-PASS div.style.minHeight is &quot;&quot;
-PASS div.style.maxHeight is &quot;&quot;
-PASS div.style.height is &quot;&quot;
-PASS div.style.minHeight is &quot;&quot;
-PASS div.style.maxHeight is &quot;&quot;
-PASS div.style.height is &quot;&quot;
-PASS div.style.minHeight is &quot;&quot;
-PASS div.style.maxHeight is &quot;&quot;
</del><ins>+PASS div.style.height is &quot;-webkit-min-content&quot;
+PASS div.style.minHeight is &quot;-webkit-min-content&quot;
+PASS div.style.maxHeight is &quot;-webkit-min-content&quot;
+PASS div.style.height is &quot;-webkit-max-content&quot;
+PASS div.style.minHeight is &quot;-webkit-max-content&quot;
+PASS div.style.maxHeight is &quot;-webkit-max-content&quot;
+PASS div.style.height is &quot;-webkit-fill-available&quot;
+PASS div.style.minHeight is &quot;-webkit-fill-available&quot;
+PASS div.style.maxHeight is &quot;-webkit-fill-available&quot;
+PASS div.style.height is &quot;-webkit-fit-content&quot;
+PASS div.style.minHeight is &quot;-webkit-fit-content&quot;
+PASS div.style.maxHeight is &quot;-webkit-fit-content&quot;
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvaluehtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -4,22 +4,22 @@
</span><span class="cx"> --&gt;
</span><span class="cx"> &lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
</span><span class="cx"> 
</span><del>-&lt;div style=&quot;height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;&quot;&gt;&lt;/div&gt;
-&lt;div style=&quot;height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;&quot;&gt;&lt;/div&gt;
-&lt;div style=&quot;height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;&quot;&gt;&lt;/div&gt;
-&lt;div style=&quot;height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;&quot;&gt;&lt;/div&gt;
</del><ins>+&lt;div style=&quot;height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;&quot; expected-data=&quot;min-content&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;&quot; expected-data=&quot;max-content&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;&quot; expected-data=&quot;fill-available&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;&quot; expected-data=&quot;fit-content&quot;&gt;&lt;/div&gt;
</ins><span class="cx"> 
</span><span class="cx"> &lt;script&gt;
</span><del>-    description('Tests that the height keywords are not exposed yet.');
</del><ins>+    description('Tests that the height keywords are parsed.');
+    var PREFIX = '-webkit-';
</ins><span class="cx"> 
</span><del>-    var divs = document.querySelectorAll('div');
</del><ins>+    var divs = document.querySelectorAll('div.expected-data');
</ins><span class="cx">     for (var i = 0; i &lt; divs.length; ++i) {
</span><del>-        shouldBeEmptyString('divs[i].style.height');
-        shouldBeEmptyString('divs[i].style.minHeight');
-        shouldBeEmptyString('divs[i].style.maxHeight');
</del><ins>+        shouldBe('divs[i].style.height', 'PREFIX + divs[i].getAttribute(&quot;expected-data&quot;)');
+        shouldBe('divs[i].style.minHeight', 'PREFIX + divs[i].getAttribute(&quot;expected-data&quot;)');
+        shouldBe('divs[i].style.maxHeight', 'PREFIX + divs[i].getAttribute(&quot;expected-data&quot;)');
</ins><span class="cx">     }
</span><span class="cx"> 
</span><del>-    var PREFIX = '-webkit-';
</del><span class="cx">     var KEYWORDS = ['min-content', 'max-content', 'fill-available',  'fit-content'];
</span><span class="cx">     var div;
</span><span class="cx"> 
</span><span class="lines">@@ -28,9 +28,9 @@
</span><span class="cx">         div.style.height = PREFIX + keyword;
</span><span class="cx">         div.style.minHeight = PREFIX + keyword;
</span><span class="cx">         div.style.maxHeight = PREFIX + keyword;
</span><del>-        shouldBeEmptyString('div.style.height');
-        shouldBeEmptyString('div.style.minHeight');
-        shouldBeEmptyString('div.style.maxHeight');
</del><ins>+        shouldBe('div.style.height', '&quot;' + PREFIX + keyword + '&quot;');
+        shouldBe('div.style.minHeight', '&quot;' + PREFIX + keyword + '&quot;');
+        shouldBe('div.style.maxHeight', '&quot;' + PREFIX + keyword + '&quot;');
</ins><span class="cx">     });
</span><span class="cx"> &lt;/script&gt;
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvaluehtmlorigfromrev185907trunkLayoutTestsfastcssintrinsicdimensionsheightpropertyvaluehtml"></a>
<div class="copfile"><h4>Copied: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.orig (from rev 185907, trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html) (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.orig                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-property-value.html.orig        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,37 @@
</span><ins>+&lt;!doctype html&gt;
+&lt;!--
+    Tests that the height keywords are not respected by the parser yet.
+--&gt;
+&lt;script src=&quot;../../resources/js-test-pre.js&quot;&gt;&lt;/script&gt;
+
+&lt;div style=&quot;height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;&quot;&gt;&lt;/div&gt;
+&lt;div style=&quot;height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;&quot;&gt;&lt;/div&gt;
+
+&lt;script&gt;
+    description('Tests that the height keywords are not exposed yet.');
+
+    var divs = document.querySelectorAll('div');
+    for (var i = 0; i &lt; divs.length; ++i) {
+        shouldBeEmptyString('divs[i].style.height');
+        shouldBeEmptyString('divs[i].style.minHeight');
+        shouldBeEmptyString('divs[i].style.maxHeight');
+    }
+
+    var PREFIX = '-webkit-';
+    var KEYWORDS = ['min-content', 'max-content', 'fill-available',  'fit-content'];
+    var div;
+
+    KEYWORDS.forEach(function(keyword) {
+        div = document.createElement('div');
+        div.style.height = PREFIX + keyword;
+        div.style.minHeight = PREFIX + keyword;
+        div.style.maxHeight = PREFIX + keyword;
+        shouldBeEmptyString('div.style.height');
+        shouldBeEmptyString('div.style.minHeight');
+        shouldBeEmptyString('div.style.maxHeight');
+    });
+&lt;/script&gt;
+
+&lt;script src=&quot;../../resources/js-test-post.js&quot;&gt;&lt;/script&gt;
</ins></span></pre></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightreplacedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,85 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;style&gt;
+    body * {
+        border: 2px solid red;
+        padding: 5px;
+        clear: both;
+    }
+
+    .container {
+        height: 500px;
+        border-color: blue;
+
+        display: inline-block;
+        width: 100px;
+    }
+
+    iframe {
+      width: 50px;
+    }
+
+    .fill-available {
+      height: 100%;
+      width: 64px;
+      box-sizing: border-box;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe&gt;
+    height: min-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+
+  &lt;iframe&gt;
+    height: max-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+
+  &lt;iframe&gt;
+    height: fit-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;fill-available&quot;&gt;
+    height: fill-available&lt;br&gt; on this box.
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe&gt;
+    min-height: min-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+
+  &lt;iframe&gt;
+    min-height: max-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+
+  &lt;iframe&gt;
+    min-height: fit-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;fill-available&quot;&gt;
+    min-height: fill-available&lt;br&gt; on this box.
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe&gt;
+    max-height: min-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+
+  &lt;iframe&gt;
+    max-height: max-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+
+  &lt;iframe&gt;
+    max-height: fit-content&lt;br&gt;on this box.
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;fill-available&quot;&gt;
+    max-height: fill-available&lt;br&gt; on this box.
+  &lt;/iframe&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheightreplacedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,84 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+--&gt;
+&lt;style&gt;
+    @import &quot;resources/height-keyword-classes.css&quot;;
+
+    body * {
+        border: 2px solid red;
+        padding: 5px;
+        clear: both;
+    }
+
+    .container {
+        height: 500px;
+        border-color: blue;
+
+        display: inline-block;
+        width: 100px;
+    }
+
+    iframe {
+      width: 50px;
+    }
+
+    .small {
+      height: 1px;
+    }
+
+    .big {
+      height: 300px;
+    }
+
+    .really-big {
+      height: 1000px;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;min-content&quot;&gt;
+  &lt;/iframe&gt;
+
+  &lt;iframe class=&quot;max-content&quot;&gt;
+  &lt;/iframe&gt;
+
+  &lt;iframe class=&quot;fit-content&quot;&gt;
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;fill-available&quot;&gt;
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;small min-height-min-content&quot;&gt;
+  &lt;/iframe&gt;
+
+  &lt;iframe class=&quot;small min-height-max-content&quot;&gt;
+  &lt;/iframe&gt;
+
+  &lt;iframe class=&quot;small min-height-fit-content&quot;&gt;
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;small min-height-fill-available&quot;&gt;
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;big max-height-min-content&quot;&gt;
+  &lt;/iframe&gt;
+
+  &lt;iframe class=&quot;big max-height-max-content&quot;&gt;
+  &lt;/iframe&gt;
+
+  &lt;iframe class=&quot;big max-height-fit-content&quot;&gt;
+  &lt;/iframe&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;iframe class=&quot;really-big max-height-fill-available&quot;&gt;
+  &lt;/iframe&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-replaced.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheighttablescollapsedexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  table { border: 2px solid red; border-collapse: collapse; }
+  td { border: 2px solid green; }
+&lt;/style&gt;
+
+&lt;table&gt;
+  &lt;td&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;table&gt;
+  &lt;td&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;table style=&quot;height: 100%; box-sizing: border-box;&quot;&gt;
+    &lt;td&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/td&gt;
+  &lt;/table&gt;
+&lt;/div&gt;
+
+
+&lt;table class=&quot;container&quot;&gt;
+  &lt;td style=&quot;height: 79px;&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheighttablescollapsedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  @import &quot;resources/height-keyword-classes.css&quot;;
+
+  .small { height: 1px; }
+  .big { height: 300px; }
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  table { border: 2px solid red; border-collapse: collapse; }
+  td { border: 2px solid green; }
+&lt;/style&gt;
+
+&lt;table class=&quot;big max-height-min-content&quot;&gt;
+  &lt;td&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;table&gt;
+  &lt;td class=&quot;small min-height-min-content&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;table class=&quot;small min-height-fill-available&quot;&gt;
+    &lt;td&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/td&gt;
+  &lt;/table&gt;
+&lt;/div&gt;
+
+
+&lt;table class=&quot;container&quot;&gt;
+  &lt;td class=&quot;small min-height-fill-available&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-collapsed.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheighttablesexpectedhtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-expected.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-expected.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-expected.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,36 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  table { border: 2px solid red; }
+  td { border: 2px solid green; }
+&lt;/style&gt;
+
+&lt;table&gt;
+  &lt;td&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;table&gt;
+  &lt;td&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;table style=&quot;height: 100%; box-sizing: border-box;&quot;&gt;
+    &lt;td&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/td&gt;
+  &lt;/table&gt;
+&lt;/div&gt;
+
+
+&lt;table class=&quot;container&quot;&gt;
+  &lt;td style=&quot;height: 79px;&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables-expected.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheighttableshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,40 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+
+&lt;style&gt;
+  @import &quot;resources/height-keyword-classes.css&quot;;
+
+  .small { height: 1px; }
+  .big { height: 300px; }
+  .item { height: 50px; width: 50px; border: 1px solid blue; }
+
+  .container { height: 100px; border: 5px solid pink; }
+  table { border: 2px solid red; }
+  td { border: 2px solid green; }
+&lt;/style&gt;
+
+&lt;table class=&quot;big max-height-min-content&quot;&gt;
+  &lt;td&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;table&gt;
+  &lt;td class=&quot;small min-height-min-content&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;table class=&quot;small min-height-fill-available&quot;&gt;
+    &lt;td&gt;
+      &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+    &lt;/td&gt;
+  &lt;/table&gt;
+&lt;/div&gt;
+
+
+&lt;table class=&quot;container&quot;&gt;
+  &lt;td class=&quot;small min-height-fill-available&quot;&gt;
+    &lt;div class=&quot;item&quot;&gt;&lt;/div&gt;
+  &lt;/td&gt;
+&lt;/table&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height-tables.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsheighthtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/height.html (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/height.html                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/height.html        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,92 @@
</span><ins>+&lt;!DOCTYPE html&gt;
+&lt;!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+--&gt;
+&lt;style&gt;
+    @import &quot;resources/height-keyword-classes.css&quot;;
+
+    body * {
+        border: 2px solid red;
+        padding: 5px;
+        clear: both;
+    }
+
+    .container {
+        height: 300px;
+        border-color: blue;
+
+        display: inline-block;
+        width: 100px;
+    }
+
+    .small {
+      height: 1px;
+    }
+
+    .big {
+      height: 100px;
+    }
+
+    .really-big {
+      height: 1000px;
+    }
+&lt;/style&gt;
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;min-content&quot;&gt;
+    height: min-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div class=&quot;max-content&quot;&gt;
+    height: max-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div class=&quot;fit-content&quot;&gt;
+    height: fit-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;fill-available&quot;&gt;
+    height: fill-available&lt;br&gt; on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;small min-height-min-content&quot;&gt;
+    min-height: min-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div class=&quot;small min-height-max-content&quot;&gt;
+    min-height: max-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div class=&quot;small min-height-fit-content&quot;&gt;
+    min-height: fit-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;small min-height-fill-available&quot;&gt;
+    min-height: fill-available&lt;br&gt; on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;big max-height-min-content&quot;&gt;
+    max-height: min-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div class=&quot;big max-height-max-content&quot;&gt;
+    max-height: max-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+
+  &lt;div class=&quot;big max-height-fit-content&quot;&gt;
+    max-height: fit-content&lt;br&gt;on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
+
+&lt;div class=&quot;container&quot;&gt;
+  &lt;div class=&quot;really-big max-height-fill-available&quot;&gt;
+    max-height: fill-available&lt;br&gt; on this box.
+  &lt;/div&gt;
+&lt;/div&gt;
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/height.html
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkLayoutTestsfastcssintrinsicdimensionsresourcesheightkeywordclassescss"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/fast/css-intrinsic-dimensions/resources/height-keyword-classes.css (0 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/css-intrinsic-dimensions/resources/height-keyword-classes.css                                (rev 0)
+++ trunk/LayoutTests/fast/css-intrinsic-dimensions/resources/height-keyword-classes.css        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -0,0 +1,77 @@
</span><ins>+/* In the current spec for heights, min-content, max-content and fit-content are
+ * equivalent.
+ * fill-available is different and similar to widths.
+ */
+
+.min-content {
+    height: -webkit-min-content;
+    height: -moz-min-content;
+    height: min-content;
+}
+
+.max-content {
+    height: -webkit-max-content;
+    height: -moz-max-content;
+    height: max-content;
+}
+
+.fill-available {
+    height: -webkit-fill-available;
+    /* Firefox is missing the fill- prefix because they followed an older spec */
+    height: -moz-available;
+    height: fill-available;
+}
+
+.fit-content {
+    height: -webkit-fit-content;
+    height: -moz-fit-content;
+    height: fit-content;
+}
+
+.max-height-min-content {
+    max-height: -webkit-min-content;
+    max-height: -moz-min-content;
+    max-height: min-content;
+}
+
+.max-height-max-content {
+    max-height: -webkit-max-content;
+    max-height: -moz-max-content;
+    max-height: max-content;
+}
+
+.max-height-fill-available {
+    max-height: -webkit-fill-available;
+    max-height: -moz-available;
+    max-height: fill-available;
+}
+
+.max-height-fit-content {
+    max-height: -webkit-fit-content;
+    max-height: -moz-fit-content;
+    max-height: fit-content;
+}
+
+.min-height-min-content {
+    min-height: -webkit-min-content;
+    min-height: -moz-min-content;
+    min-height: min-content;
+}
+
+.min-height-max-content {
+    min-height: -webkit-max-content;
+    min-height: -moz-max-content;
+    min-height: max-content;
+}
+
+.min-height-fill-available {
+    min-height: -webkit-fill-available;
+    min-height: -moz-available;
+    min-height: fill-available;
+}
+
+.min-height-fit-content {
+    min-height: -webkit-fit-content;
+    min-height: -moz-fit-content;
+    min-height: fit-content;
+}
</ins><span class="cx">Property changes on: trunk/LayoutTests/fast/css-intrinsic-dimensions/resources/height-keyword-classes.css
</span><span class="cx">___________________________________________________________________
</span></span></pre></div>
<a id="svnmimetype"></a>
<div class="addfile"><h4>Added: svn:mime-type</h4></div>
<a id="svneolstyle"></a>
<div class="addfile"><h4>Added: svn:eol-style</h4></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/ChangeLog        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -1,3 +1,73 @@
</span><ins>+2015-06-11  Sergio Villar Senin  &lt;svillar@igalia.com&gt;
+
+        intrinsic size keywords don't work for heights
+        https://bugs.webkit.org/show_bug.cgi?id=113610
+
+        Reviewed by Darin Adler.
+
+        Based on Blink's r148314 &amp; r150355 by &lt;cbiesinger@chromium.org&gt;.
+
+        Adds intrinsic values support to heigh &amp; min/max-height. This involves the
+        following changes:
+        - RenderBox needs to pass the content height through to computeLogicalHeight and
+        related functions, which needs it to resolve max-content, et. al.
+        - Make the callers pass the content height to this function. Some callers pass
+        logicalHeight() (adjusted for border/padding) which works because if
+        logicalHeight is not the content height, then it is the height we ended up using,
+        so the constrain* functions will just constrain to that value again.
+        - Parsing code needs to be adjusted to support intrinsic values for heights.
+
+        Tests: fast/css-intrinsic-dimensions/height-css-tables-collapsed.html
+               fast/css-intrinsic-dimensions/height-css-tables.html
+               fast/css-intrinsic-dimensions/height-flexbox.html
+               fast/css-intrinsic-dimensions/height-positioned-replaced.html
+               fast/css-intrinsic-dimensions/height-positioned.html
+               fast/css-intrinsic-dimensions/height-replaced.html
+               fast/css-intrinsic-dimensions/height-tables-collapsed.html
+               fast/css-intrinsic-dimensions/height-tables.html
+               fast/css-intrinsic-dimensions/height.html
+
+        * css/CSSParser.cpp:
+        (WebCore::CSSParser::isValidSize): Refactored from validateWidth and
+        validateHeight.
+        (WebCore::CSSParser::parseValue):
+        (WebCore::CSSParser::validateWidth): Deleted.
+        (WebCore::CSSParser::validateHeight): Deleted.
+        * css/CSSParser.h:
+        * platform/Length.h:
+        (WebCore::Length::isFillAvailable):
+        (WebCore::Length::isFitContent):
+        * rendering/RenderBox.cpp:
+        (WebCore::RenderBox::constrainLogicalHeightByMinMax):
+        (WebCore::RenderBox::constrainContentBoxLogicalHeightByMinMax):
+        (WebCore::RenderBox::computeLogicalHeight):
+        (WebCore::RenderBox::computeLogicalHeightUsing):
+        (WebCore::RenderBox::computeContentLogicalHeight):
+        (WebCore::RenderBox::computeIntrinsicLogicalContentHeightUsing):
+        (WebCore::RenderBox::computeContentAndScrollbarLogicalHeightUsing):
+        (WebCore::RenderBox::computePercentageLogicalHeight):
+        (WebCore::RenderBox::computeReplacedLogicalHeightUsing):
+        (WebCore::RenderBox::availableLogicalHeight):
+        (WebCore::RenderBox::availableLogicalHeightUsing):
+        (WebCore::RenderBox::computePositionedLogicalHeight):
+        (WebCore::RenderBox::computePositionedLogicalHeightUsing):
+        * rendering/RenderBox.h:
+        * rendering/RenderFlexibleBox.cpp:
+        (WebCore::RenderFlexibleBox::computeMainAxisExtentForChild):
+        (WebCore::RenderFlexibleBox::applyStretchAlignmentToChild):
+        * rendering/RenderFlowThread.cpp:
+        (WebCore::RenderFlowThread::addForcedRegionBreak):
+        * rendering/RenderGrid.cpp:
+        (WebCore::RenderGrid::computeUsedBreadthOfSpecifiedLength):
+        (WebCore::RenderGrid::applyStretchAlignmentToChildIfNeeded):
+        * rendering/RenderMultiColumnSet.cpp:
+        (WebCore::RenderMultiColumnSet::calculateMaxColumnHeight):
+        * rendering/RenderReplaced.cpp:
+        (WebCore::RenderReplaced::hasReplacedLogicalHeight):
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::convertStyleLogicalHeightToComputedHeight):
+        (WebCore::RenderTable::layout):
+
</ins><span class="cx"> 2015-06-24  Commit Queue  &lt;commit-queue@webkit.org&gt;
</span><span class="cx"> 
</span><span class="cx">         Unreviewed, rolling out r185906.
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/css/CSSParser.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -1815,7 +1815,7 @@
</span><span class="cx">     return value.unit == CSSParserValue::Operator &amp;&amp; value.iValue == '/';
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-bool CSSParser::validateWidth(ValueWithCalculation&amp; valueWithCalculation)
</del><ins>+bool CSSParser::isValidSize(ValueWithCalculation&amp; valueWithCalculation)
</ins><span class="cx"> {
</span><span class="cx">     int id = valueWithCalculation.value().id;
</span><span class="cx">     if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic || id == CSSValueWebkitMinContent || id == CSSValueWebkitMaxContent || id == CSSValueWebkitFillAvailable || id == CSSValueWebkitFitContent)
</span><span class="lines">@@ -1823,15 +1823,6 @@
</span><span class="cx">     return !id &amp;&amp; validateUnit(valueWithCalculation, FLength | FPercent | FNonNeg);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-// FIXME: Combine this with validWidth when we support fit-content, et al, for heights.
-bool CSSParser::validateHeight(ValueWithCalculation&amp; valueWithCalculation)
-{
-    int id = valueWithCalculation.value().id;
-    if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic)
-        return true;
-    return !id &amp;&amp; validateUnit(valueWithCalculation, FLength | FPercent | FNonNeg);
-}
-
</del><span class="cx"> inline PassRefPtr&lt;CSSPrimitiveValue&gt; CSSParser::parseValidPrimitive(CSSValueID identifier, ValueWithCalculation&amp; valueWithCalculation)
</span><span class="cx"> {
</span><span class="cx">     if (identifier)
</span><span class="lines">@@ -2256,32 +2247,23 @@
</span><span class="cx"> 
</span><span class="cx">     case CSSPropertyMaxWidth:
</span><span class="cx">     case CSSPropertyWebkitMaxLogicalWidth:
</span><del>-        validPrimitive = (id == CSSValueNone || validateWidth(valueWithCalculation));
-        break;
-
-    case CSSPropertyMinWidth:
-    case CSSPropertyWebkitMinLogicalWidth:
-        validPrimitive = validateWidth(valueWithCalculation);
-        break;
-
-    case CSSPropertyWidth:
-    case CSSPropertyWebkitLogicalWidth:
-        validPrimitive = (id == CSSValueAuto || validateWidth(valueWithCalculation));
-        break;
-
</del><span class="cx">     case CSSPropertyMaxHeight:
</span><span class="cx">     case CSSPropertyWebkitMaxLogicalHeight:
</span><del>-        validPrimitive = (id == CSSValueNone || validateHeight(valueWithCalculation));
</del><ins>+        validPrimitive = (id == CSSValueNone || isValidSize(valueWithCalculation));
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><ins>+    case CSSPropertyMinWidth:
+    case CSSPropertyWebkitMinLogicalWidth:
</ins><span class="cx">     case CSSPropertyMinHeight:
</span><span class="cx">     case CSSPropertyWebkitMinLogicalHeight:
</span><del>-        validPrimitive = validateHeight(valueWithCalculation);
</del><ins>+        validPrimitive = isValidSize(valueWithCalculation);
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><ins>+    case CSSPropertyWidth:
+    case CSSPropertyWebkitLogicalWidth:
</ins><span class="cx">     case CSSPropertyHeight:
</span><span class="cx">     case CSSPropertyWebkitLogicalHeight:
</span><del>-        validPrimitive = (id == CSSValueAuto || validateHeight(valueWithCalculation));
</del><ins>+        validPrimitive = (id == CSSValueAuto || isValidSize(valueWithCalculation));
</ins><span class="cx">         break;
</span><span class="cx"> 
</span><span class="cx">     case CSSPropertyFontSize:
</span></span></pre></div>
<a id="trunkSourceWebCorecssCSSParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/css/CSSParser.h (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/css/CSSParser.h        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/css/CSSParser.h        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -550,8 +550,7 @@
</span><span class="cx">     void setupParser(const char* prefix, unsigned prefixLength, StringView, const char* suffix, unsigned suffixLength);
</span><span class="cx">     bool inShorthand() const { return m_inParseShorthand; }
</span><span class="cx"> 
</span><del>-    bool validateWidth(ValueWithCalculation&amp;);
-    bool validateHeight(ValueWithCalculation&amp;);
</del><ins>+    bool isValidSize(ValueWithCalculation&amp;);
</ins><span class="cx"> 
</span><span class="cx">     void deleteFontFaceOnlyValues();
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCoreplatformLengthh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/platform/Length.h (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/platform/Length.h        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/platform/Length.h        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -87,6 +87,8 @@
</span><span class="cx">     bool isPercent() const;
</span><span class="cx">     bool isRelative() const;
</span><span class="cx">     bool isUndefined() const;
</span><ins>+    bool isFillAvailable() const;
+    bool isFitContent() const;
</ins><span class="cx"> 
</span><span class="cx">     bool hasQuirk() const;
</span><span class="cx"> 
</span><span class="lines">@@ -400,6 +402,16 @@
</span><span class="cx">     return isSpecified() || isIntrinsic();
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+inline bool Length::isFillAvailable() const
+{
+    return type() == FillAvailable;
+}
+
+inline bool Length::isFitContent() const
+{
+    return type() == FitContent;
+}
+
</ins><span class="cx"> // FIXME: Does this need to be in the header? Is it valuable to inline? Does it get inlined?
</span><span class="cx"> inline Length Length::blend(const Length&amp; from, double progress) const
</span><span class="cx"> {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderBox.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -656,26 +656,26 @@
</span><span class="cx">     return std::max(logicalWidth, computeLogicalWidthInRegionUsing(MinSize, styleToUse.logicalMinWidth(), availableWidth, cb, region));
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight) const
</del><ins>+LayoutUnit RenderBox::constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, LayoutUnit intrinsicContentHeight) const
</ins><span class="cx"> {
</span><span class="cx">     const RenderStyle&amp; styleToUse = style();
</span><span class="cx">     if (!styleToUse.logicalMaxHeight().isUndefined()) {
</span><del>-        LayoutUnit maxH = computeLogicalHeightUsing(styleToUse.logicalMaxHeight());
</del><ins>+        LayoutUnit maxH = computeLogicalHeightUsing(styleToUse.logicalMaxHeight(), intrinsicContentHeight);
</ins><span class="cx">         if (maxH != -1)
</span><span class="cx">             logicalHeight = std::min(logicalHeight, maxH);
</span><span class="cx">     }
</span><del>-    return std::max(logicalHeight, computeLogicalHeightUsing(styleToUse.logicalMinHeight()));
</del><ins>+    return std::max(logicalHeight, computeLogicalHeightUsing(styleToUse.logicalMinHeight(), intrinsicContentHeight));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight) const
</del><ins>+LayoutUnit RenderBox::constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight, LayoutUnit intrinsicContentHeight) const
</ins><span class="cx"> {
</span><span class="cx">     const RenderStyle&amp; styleToUse = style();
</span><span class="cx">     if (!styleToUse.logicalMaxHeight().isUndefined()) {
</span><del>-        LayoutUnit maxH = computeContentLogicalHeight(styleToUse.logicalMaxHeight());
</del><ins>+        LayoutUnit maxH = computeContentLogicalHeight(styleToUse.logicalMaxHeight(), intrinsicContentHeight);
</ins><span class="cx">         if (maxH != -1)
</span><span class="cx">             logicalHeight = std::min(logicalHeight, maxH);
</span><span class="cx">     }
</span><del>-    return std::max(logicalHeight, computeContentLogicalHeight(styleToUse.logicalMinHeight()));
</del><ins>+    return std::max(logicalHeight, computeContentLogicalHeight(styleToUse.logicalMinHeight(), intrinsicContentHeight));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> RoundedRect::Radii RenderBox::borderRadii() const
</span><span class="lines">@@ -2756,19 +2756,21 @@
</span><span class="cx"> 
</span><span class="cx">         LayoutUnit heightResult;
</span><span class="cx">         if (checkMinMaxHeight) {
</span><del>-            heightResult = computeLogicalHeightUsing(style().logicalHeight());
</del><ins>+            LayoutUnit intrinsicHeight = computedValues.m_extent - borderAndPaddingLogicalHeight();
+            heightResult = computeLogicalHeightUsing(style().logicalHeight(), intrinsicHeight);
</ins><span class="cx">             if (heightResult == -1)
</span><span class="cx">                 heightResult = computedValues.m_extent;
</span><del>-            heightResult = constrainLogicalHeightByMinMax(heightResult);
</del><ins>+            heightResult = constrainLogicalHeightByMinMax(heightResult, intrinsicHeight);
</ins><span class="cx">         } else {
</span><span class="cx">             // The only times we don't check min/max height are when a fixed length has
</span><span class="cx">             // been given as an override.  Just use that.  The value has already been adjusted
</span><span class="cx">             // for box-sizing.
</span><ins>+            ASSERT(h.isFixed());
</ins><span class="cx">             heightResult = h.value() + borderAndPaddingLogicalHeight();
</span><span class="cx">         }
</span><span class="cx"> 
</span><span class="cx">         computedValues.m_extent = heightResult;
</span><del>-        
</del><ins>+
</ins><span class="cx">         if (hasPerpendicularContainingBlock) {
</span><span class="cx">             bool shouldFlipBeforeAfter = shouldFlipBeforeAfterMargins(cb-&gt;style(), &amp;style());
</span><span class="cx">             computeInlineDirectionMargins(cb, containingBlockLogicalWidthForContent(), heightResult,
</span><span class="lines">@@ -2796,24 +2798,40 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::computeLogicalHeightUsing(const Length&amp; height) const
</del><ins>+LayoutUnit RenderBox::computeLogicalHeightUsing(const Length&amp; height, LayoutUnit intrinsicContentHeight) const
</ins><span class="cx"> {
</span><del>-    LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(height);
</del><ins>+    LayoutUnit logicalHeight = computeContentAndScrollbarLogicalHeightUsing(height, intrinsicContentHeight);
</ins><span class="cx">     if (logicalHeight != -1)
</span><span class="cx">         logicalHeight = adjustBorderBoxLogicalHeightForBoxSizing(logicalHeight);
</span><span class="cx">     return logicalHeight;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::computeContentLogicalHeight(const Length&amp; height) const
</del><ins>+LayoutUnit RenderBox::computeContentLogicalHeight(const Length&amp; height, LayoutUnit intrinsicContentHeight) const
</ins><span class="cx"> {
</span><del>-    LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(height);
</del><ins>+    LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(height, intrinsicContentHeight);
</ins><span class="cx">     if (heightIncludingScrollbar == -1)
</span><span class="cx">         return -1;
</span><span class="cx">     return std::max&lt;LayoutUnit&gt;(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(const Length&amp; height) const
</del><ins>+LayoutUnit RenderBox::computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) const
</ins><span class="cx"> {
</span><ins>+    // FIXME: The CSS sizing spec is considering changing what min-content/max-content should resolve to.
+    // If that happens, this code will have to change.
+    if (logicalHeightLength.isMinContent() || logicalHeightLength.isMaxContent() || logicalHeightLength.isFitContent())
+        return intrinsicContentHeight;
+    if (logicalHeightLength.isFillAvailable())
+        return containingBlock()-&gt;availableLogicalHeight(ExcludeMarginBorderPadding) - borderAndPadding;
+    ASSERT_NOT_REACHED();
+    return 0;
+}
+
+LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(const Length&amp; height, LayoutUnit intrinsicContentHeight) const
+{
+    // FIXME: The CSS sizing spec is considering changing what min-content/max-content should resolve to.
+    // If that happens, this code will have to change.
+    if (height.isIntrinsic())
+        return computeIntrinsicLogicalContentHeightUsing(height, intrinsicContentHeight, borderAndPaddingLogicalHeight());
</ins><span class="cx">     if (height.isFixed())
</span><span class="cx">         return height.value();
</span><span class="cx">     if (height.isPercentOrCalculated())
</span><span class="lines">@@ -2890,7 +2908,7 @@
</span><span class="cx">         }
</span><span class="cx">     } else if (cbstyle.logicalHeight().isFixed()) {
</span><span class="cx">         LayoutUnit contentBoxHeight = cb-&gt;adjustContentBoxLogicalHeightForBoxSizing(cbstyle.logicalHeight().value());
</span><del>-        availableHeight = std::max&lt;LayoutUnit&gt;(0, cb-&gt;constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb-&gt;scrollbarLogicalHeight()));
</del><ins>+        availableHeight = std::max&lt;LayoutUnit&gt;(0, cb-&gt;constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb-&gt;scrollbarLogicalHeight(), -1));
</ins><span class="cx">     } else if (cbstyle.logicalHeight().isPercentOrCalculated() &amp;&amp; !isOutOfFlowPositionedWithSpecifiedHeight) {
</span><span class="cx">         // We need to recur and compute the percentage height for our containing block.
</span><span class="cx">         LayoutUnit heightWithScrollbar = cb-&gt;computePercentageLogicalHeight(cbstyle.logicalHeight());
</span><span class="lines">@@ -2900,7 +2918,7 @@
</span><span class="cx">             // handle the min/max of the current block, its caller does. So the
</span><span class="cx">             // return value from the recursive call will not have been adjusted
</span><span class="cx">             // yet.
</span><del>-            LayoutUnit contentBoxHeight = cb-&gt;constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb-&gt;scrollbarLogicalHeight());
</del><ins>+            LayoutUnit contentBoxHeight = cb-&gt;constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb-&gt;scrollbarLogicalHeight(), -1);
</ins><span class="cx">             availableHeight = std::max&lt;LayoutUnit&gt;(0, contentBoxHeight);
</span><span class="cx">         }
</span><span class="cx">     } else if (isOutOfFlowPositionedWithSpecifiedHeight) {
</span><span class="lines">@@ -3045,6 +3063,11 @@
</span><span class="cx">             }
</span><span class="cx">             return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeight, availableHeight));
</span><span class="cx">         }
</span><ins>+        case MinContent:
+        case MaxContent:
+        case FitContent:
+        case FillAvailable:
+            return adjustContentBoxLogicalHeightForBoxSizing(computeIntrinsicLogicalContentHeightUsing(logicalHeight, intrinsicLogicalHeight(), borderAndPaddingLogicalHeight()));
</ins><span class="cx">         default:
</span><span class="cx">             return intrinsicLogicalHeight();
</span><span class="cx">     }
</span><span class="lines">@@ -3052,7 +3075,7 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderBox::availableLogicalHeight(AvailableLogicalHeightType heightType) const
</span><span class="cx"> {
</span><del>-    return constrainLogicalHeightByMinMax(availableLogicalHeightUsing(style().logicalHeight(), heightType));
</del><ins>+    return constrainLogicalHeightByMinMax(availableLogicalHeightUsing(style().logicalHeight(), heightType), -1);
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderBox::availableLogicalHeightUsing(const Length&amp; h, AvailableLogicalHeightType heightType) const
</span><span class="lines">@@ -3072,7 +3095,7 @@
</span><span class="cx">         return adjustContentBoxLogicalHeightForBoxSizing(valueForLength(h, availableHeight));
</span><span class="cx">     }
</span><span class="cx"> 
</span><del>-    LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(h);
</del><ins>+    LayoutUnit heightIncludingScrollbar = computeContentAndScrollbarLogicalHeightUsing(h, -1);
</ins><span class="cx">     if (heightIncludingScrollbar != -1)
</span><span class="cx">         return std::max&lt;LayoutUnit&gt;(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
</span><span class="cx"> 
</span><span class="lines">@@ -3689,7 +3712,7 @@
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // Calculate constraint equation values for 'min-height' case.
</span><del>-    if (!styleToUse.logicalMinHeight().isZero()) {
</del><ins>+    if (!styleToUse.logicalMinHeight().isZero() || styleToUse.logicalMinHeight().isIntrinsic()) {
</ins><span class="cx">         LogicalExtentComputedValues minValues;
</span><span class="cx"> 
</span><span class="cx">         computePositionedLogicalHeightUsing(styleToUse.logicalMinHeight(), containerBlock, containerLogicalHeight, bordersPlusPadding, logicalHeight,
</span><span class="lines">@@ -3763,18 +3786,22 @@
</span><span class="cx">     const LayoutUnit containerRelativeLogicalWidth = containingBlockLogicalWidthForPositioned(containerBlock, nullptr, false);
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit logicalTopValue = 0;
</span><del>-    LayoutUnit resolvedLogicalHeight = 0;
</del><span class="cx"> 
</span><span class="cx">     bool logicalHeightIsAuto = logicalHeightLength.isAuto();
</span><span class="cx">     bool logicalTopIsAuto = logicalTop.isAuto();
</span><span class="cx">     bool logicalBottomIsAuto = logicalBottom.isAuto();
</span><span class="cx"> 
</span><span class="cx">     // Height is never unsolved for tables.
</span><ins>+    LayoutUnit resolvedLogicalHeight;
</ins><span class="cx">     if (isTable()) {
</span><span class="cx">         resolvedLogicalHeight = contentLogicalHeight;
</span><span class="cx">         logicalHeightIsAuto = false;
</span><del>-    } else
-        resolvedLogicalHeight = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight));
</del><ins>+    } else {
+        if (logicalHeightLength.isIntrinsic())
+            resolvedLogicalHeight = computeIntrinsicLogicalContentHeightUsing(logicalHeightLength, contentLogicalHeight, bordersPlusPadding);
+        else
+            resolvedLogicalHeight = adjustContentBoxLogicalHeightForBoxSizing(valueForLength(logicalHeightLength, containerLogicalHeight));
+    }
</ins><span class="cx"> 
</span><span class="cx">     if (!logicalTopIsAuto &amp;&amp; !logicalHeightIsAuto &amp;&amp; !logicalBottomIsAuto) {
</span><span class="cx">         /*-----------------------------------------------------------------------*\
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderBoxh"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderBox.h (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderBox.h        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderBox.h        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -87,8 +87,8 @@
</span><span class="cx">     LayoutUnit logicalHeight() const { return style().isHorizontalWritingMode() ? height() : width(); }
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit constrainLogicalWidthInRegionByMinMax(LayoutUnit, LayoutUnit, RenderBlock*, RenderRegion* = nullptr) const;
</span><del>-    LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit) const;
-    LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit) const;
</del><ins>+    LayoutUnit constrainLogicalHeightByMinMax(LayoutUnit logicalHeight, LayoutUnit intrinsicContentHeight) const;
+    LayoutUnit constrainContentBoxLogicalHeightByMinMax(LayoutUnit logicalHeight, LayoutUnit intrinsicContentHeight) const;
</ins><span class="cx"> 
</span><span class="cx">     int pixelSnappedLogicalHeight() const { return style().isHorizontalWritingMode() ? pixelSnappedSize().height() : pixelSnappedSize().width(); }
</span><span class="cx">     int pixelSnappedLogicalWidth() const { return style().isHorizontalWritingMode() ? pixelSnappedSize().width() : pixelSnappedSize().height(); }
</span><span class="lines">@@ -432,9 +432,9 @@
</span><span class="cx">     LayoutUnit shrinkLogicalWidthToAvoidFloats(LayoutUnit childMarginStart, LayoutUnit childMarginEnd, const RenderBlock* cb, RenderRegion*) const;
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit computeLogicalWidthInRegionUsing(SizeType, Length logicalWidth, LayoutUnit availableLogicalWidth, const RenderBlock* containingBlock, RenderRegion*) const;
</span><del>-    LayoutUnit computeLogicalHeightUsing(const Length&amp; height) const;
-    LayoutUnit computeContentLogicalHeight(const Length&amp; height) const;
-    LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length&amp; height) const;
</del><ins>+    LayoutUnit computeLogicalHeightUsing(const Length&amp; height, LayoutUnit intrinsicContentHeight) const;
+    LayoutUnit computeContentLogicalHeight(const Length&amp; height, LayoutUnit intrinsicContentHeight) const;
+    LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length&amp; height, LayoutUnit intrinsicContentHeight) const;
</ins><span class="cx">     LayoutUnit computeReplacedLogicalWidthUsing(Length width) const;
</span><span class="cx">     LayoutUnit computeReplacedLogicalWidthRespectingMinMaxWidth(LayoutUnit logicalWidth, ShouldComputePreferred  = ComputeActual) const;
</span><span class="cx">     LayoutUnit computeReplacedLogicalHeightUsing(Length height) const;
</span><span class="lines">@@ -655,6 +655,7 @@
</span><span class="cx">     void computePositionedLogicalWidth(LogicalExtentComputedValues&amp;, RenderRegion* = nullptr) const;
</span><span class="cx"> 
</span><span class="cx">     LayoutUnit computeIntrinsicLogicalWidthUsing(Length logicalWidthLength, LayoutUnit availableLogicalWidth, LayoutUnit borderAndPadding) const;
</span><ins>+    LayoutUnit computeIntrinsicLogicalContentHeightUsing(Length logicalHeightLength, LayoutUnit intrinsicContentHeight, LayoutUnit borderAndPadding) const;
</ins><span class="cx">     
</span><span class="cx">     virtual bool shouldComputeSizeAsReplaced() const { return isReplaced() &amp;&amp; !isInlineBlockOrInlineTable(); }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlexibleBoxcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderFlexibleBox.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -451,11 +451,12 @@
</span><span class="cx"> {
</span><span class="cx">     // FIXME: This is wrong for orthogonal flows. It should use the flexbox's writing-mode, not the child's in order
</span><span class="cx">     // to figure out the logical height/width.
</span><del>-    // FIXME: This is wrong if the height is set to an intrinsic keyword value. computeContentLogicalHeight will return -1.
-    // Instead, we need to layout the child an get the appropriate height value.
-    // https://bugs.webkit.org/show_bug.cgi?id=113610
-    if (isColumnFlow())
-        return child.computeContentLogicalHeight(size);
</del><ins>+    if (isColumnFlow()) {
+        // We don't have to check for &quot;auto&quot; here - computeContentLogicalHeight will just return -1 for that case anyway.
+        if (size.isIntrinsic())
+            child.layoutIfNeeded();
+        return child.computeContentLogicalHeight(size, child.logicalHeight() - child.borderAndPaddingLogicalHeight());
+    }
</ins><span class="cx">     // FIXME: Figure out how this should work for regions and pass in the appropriate values.
</span><span class="cx">     RenderRegion* region = nullptr;
</span><span class="cx">     return child.computeLogicalWidthInRegionUsing(sizeType, size, contentLogicalWidth(), this, region) - child.borderAndPaddingLogicalWidth();
</span><span class="lines">@@ -1336,7 +1337,8 @@
</span><span class="cx">         // FIXME: If the child has orthogonal flow, then it already has an override height set, so use it.
</span><span class="cx">         if (!hasOrthogonalFlow(child)) {
</span><span class="cx">             LayoutUnit stretchedLogicalHeight = child.logicalHeight() + availableAlignmentSpaceForChild(lineCrossAxisExtent, child);
</span><del>-            LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight);
</del><ins>+            ASSERT(!child.needsLayout());
+            LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight, child.logicalHeight() - child.borderAndPaddingLogicalHeight());
</ins><span class="cx"> 
</span><span class="cx">             // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905.
</span><span class="cx">             if (desiredLogicalHeight != child.logicalHeight()) {
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderFlowThreadcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderFlowThread.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderFlowThread.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -1094,7 +1094,7 @@
</span><span class="cx">         hasComputedAutoHeight = true;
</span><span class="cx"> 
</span><span class="cx">         // Compute the region height pretending that the offsetBreakInCurrentRegion is the logicalHeight for the auto-height region.
</span><del>-        LayoutUnit regionComputedAutoHeight = namedFlowFragment.constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion);
</del><ins>+        LayoutUnit regionComputedAutoHeight = namedFlowFragment.constrainContentBoxLogicalHeightByMinMax(offsetBreakInCurrentRegion, -1);
</ins><span class="cx"> 
</span><span class="cx">         // The new height of this region needs to be smaller than the initial value, the max height. A forced break is the only way to change the initial
</span><span class="cx">         // height of an auto-height region besides content ending.
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderGridcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderGrid.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderGrid.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderGrid.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -469,7 +469,7 @@
</span><span class="cx"> LayoutUnit RenderGrid::computeUsedBreadthOfSpecifiedLength(GridTrackSizingDirection direction, const Length&amp; trackLength) const
</span><span class="cx"> {
</span><span class="cx">     ASSERT(trackLength.isSpecified());
</span><del>-    return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : std::max(LayoutUnit(), computeContentLogicalHeight(style().logicalHeight())));
</del><ins>+    return valueForLength(trackLength, direction == ForColumns ? logicalWidth() : std::max(LayoutUnit(), computeContentLogicalHeight(style().logicalHeight(), -1)));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> double RenderGrid::computeNormalizedFractionBreadth(Vector&lt;GridTrack&gt;&amp; tracks, const GridSpan&amp; tracksSpan, GridTrackSizingDirection direction, LayoutUnit spaceToFill) const
</span><span class="lines">@@ -1306,7 +1306,7 @@
</span><span class="cx">     // FIXME: grid track sizing and positioning do not support orthogonal modes yet.
</span><span class="cx">     if (!hasOrthogonalWritingMode) {
</span><span class="cx">         LayoutUnit stretchedLogicalHeight = availableAlignmentSpaceForChildBeforeStretching(gridAreaBreadthForChild, child);
</span><del>-        LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight);
</del><ins>+        LayoutUnit desiredLogicalHeight = child.constrainLogicalHeightByMinMax(stretchedLogicalHeight, -1);
</ins><span class="cx"> 
</span><span class="cx">         // FIXME: Can avoid laying out here in some cases. See https://webkit.org/b/87905.
</span><span class="cx">         bool childNeedsRelayout = desiredLogicalHeight != child.logicalHeight();
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderMultiColumnSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderMultiColumnSet.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -415,7 +415,7 @@
</span><span class="cx">     LayoutUnit availableHeight = multiColumnFlowThread()-&gt;columnHeightAvailable();
</span><span class="cx">     LayoutUnit maxColumnHeight = availableHeight ? availableHeight : RenderFlowThread::maxLogicalHeight();
</span><span class="cx">     if (!multicolStyle.logicalMaxHeight().isUndefined()) {
</span><del>-        LayoutUnit logicalMaxHeight = multicolBlock-&gt;computeContentLogicalHeight(multicolStyle.logicalMaxHeight());
</del><ins>+        LayoutUnit logicalMaxHeight = multicolBlock-&gt;computeContentLogicalHeight(multicolStyle.logicalMaxHeight(), -1);
</ins><span class="cx">         if (logicalMaxHeight != -1 &amp;&amp; maxColumnHeight &gt; logicalMaxHeight)
</span><span class="cx">             maxColumnHeight = logicalMaxHeight;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderReplacedcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderReplaced.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderReplaced.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderReplaced.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -282,6 +282,9 @@
</span><span class="cx">         return true;
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    if (style().logicalHeight().isIntrinsic())
+        return true;
+
</ins><span class="cx">     return false;
</span><span class="cx"> }
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (185907 => 185908)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp        2015-06-24 13:09:46 UTC (rev 185907)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp        2015-06-24 13:36:00 UTC (rev 185908)
</span><span class="lines">@@ -357,19 +357,22 @@
</span><span class="cx"> 
</span><span class="cx"> LayoutUnit RenderTable::convertStyleLogicalHeightToComputedHeight(const Length&amp; styleLogicalHeight)
</span><span class="cx"> {
</span><ins>+    LayoutUnit borderAndPaddingBefore = borderBefore() + (collapseBorders() ? LayoutUnit() : paddingBefore());
+    LayoutUnit borderAndPaddingAfter = borderAfter() + (collapseBorders() ? LayoutUnit() : paddingAfter());
+    LayoutUnit borderAndPadding = borderAndPaddingBefore + borderAndPaddingAfter;
</ins><span class="cx">     LayoutUnit computedLogicalHeight = 0;
</span><span class="cx">     if (styleLogicalHeight.isFixed()) {
</span><span class="cx">         // HTML tables size as though CSS height includes border/padding, CSS tables do not.
</span><span class="cx">         LayoutUnit borders = LayoutUnit();
</span><span class="cx">         // FIXME: We cannot apply box-sizing: content-box on &lt;table&gt; which other browsers allow.
</span><span class="cx">         if (is&lt;HTMLTableElement&gt;(element()) || style().boxSizing() == BORDER_BOX) {
</span><del>-            LayoutUnit borderAndPaddingBefore = borderBefore() + (collapseBorders() ? LayoutUnit() : paddingBefore());
-            LayoutUnit borderAndPaddingAfter = borderAfter() + (collapseBorders() ? LayoutUnit() : paddingAfter());
-            borders = borderAndPaddingBefore + borderAndPaddingAfter;
</del><ins>+            borders = borderAndPadding;
</ins><span class="cx">         }
</span><span class="cx">         computedLogicalHeight = styleLogicalHeight.value() - borders;
</span><span class="cx">     } else if (styleLogicalHeight.isPercentOrCalculated())
</span><span class="cx">         computedLogicalHeight = computePercentageLogicalHeight(styleLogicalHeight);
</span><ins>+    else if (styleLogicalHeight.isIntrinsic())
+        computedLogicalHeight = computeIntrinsicLogicalContentHeightUsing(styleLogicalHeight, logicalHeight() - borderAndPadding, borderAndPadding);
</ins><span class="cx">     else
</span><span class="cx">         ASSERT_NOT_REACHED();
</span><span class="cx">     return std::max&lt;LayoutUnit&gt;(0, computedLogicalHeight);
</span><span class="lines">@@ -502,17 +505,17 @@
</span><span class="cx">     LayoutUnit computedLogicalHeight = 0;
</span><span class="cx">     
</span><span class="cx">     Length logicalHeightLength = style().logicalHeight();
</span><del>-    if (logicalHeightLength.isSpecified() &amp;&amp; logicalHeightLength.isPositive())
</del><ins>+    if (logicalHeightLength.isIntrinsic() || (logicalHeightLength.isSpecified() &amp;&amp; logicalHeightLength.isPositive()))
</ins><span class="cx">         computedLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalHeightLength);
</span><span class="cx">     
</span><span class="cx">     Length logicalMaxHeightLength = style().logicalMaxHeight();
</span><del>-    if (logicalMaxHeightLength.isSpecified() &amp;&amp; !logicalMaxHeightLength.isNegative()) {
</del><ins>+    if (logicalMaxHeightLength.isIntrinsic() || (logicalMaxHeightLength.isSpecified() &amp;&amp; !logicalMaxHeightLength.isNegative())) {
</ins><span class="cx">         LayoutUnit computedMaxLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMaxHeightLength);
</span><span class="cx">         computedLogicalHeight = std::min(computedLogicalHeight, computedMaxLogicalHeight);
</span><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     Length logicalMinHeightLength = style().logicalMinHeight();
</span><del>-    if (logicalMinHeightLength.isSpecified() &amp;&amp; !logicalMinHeightLength.isNegative()) {
</del><ins>+    if (logicalMinHeightLength.isIntrinsic() || (logicalMinHeightLength.isSpecified() &amp;&amp; !logicalMinHeightLength.isNegative())) {
</ins><span class="cx">         LayoutUnit computedMinLogicalHeight = convertStyleLogicalHeightToComputedHeight(logicalMinHeightLength);
</span><span class="cx">         computedLogicalHeight = std::max(computedLogicalHeight, computedMinLogicalHeight);
</span><span class="cx">     }
</span></span></pre>
</div>
</div>

</body>
</html>