<!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> & <a href="http://trac.webkit.org/projects/webkit/changeset/150355">r150355</a> by <cbiesinger@chromium.org>.
Adds intrinsic values support to heigh & 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 <cbiesinger@chromium.org>.
* 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 <svillar@igalia.com>
+
+ 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 <cbiesinger@chromium.org>.
+
+ * 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 <mmaxfield@apple.com>
</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>+<!DOCTYPE html>
+
+<style>
+ .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; }
+</style>
+
+<div class="table">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+</div>
+
+<table>
+ <div class="td">
+ <div class="item"></div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="table" style="height: 100%; box-sizing: border-box;">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+
+<div class="table container" style="display: block; float: left; height: 98px; border: 2px solid green;">
+ <div class="item"></div>
+</div>
</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>+<!DOCTYPE html>
+
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ .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; }
+</style>
+
+<div class="table big max-height-min-content">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+</div>
+
+<table>
+ <div class="td small min-height-min-content">
+ <div class="item"></div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="table small min-height-fill-available">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+
+<div class="table container">
+ <div class="td small min-height-fill-available">
+ <div class="item"></div>
+ </div>
+</div>
</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>+<!DOCTYPE html>
+
+<style>
+ .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; }
+</style>
+
+<div class="table">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+</div>
+
+<table>
+ <div class="td">
+ <div class="item"></div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="table" style="height: 100%; box-sizing: border-box;">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+
+<div class="table container" style="display: block; float: left; height: 98px;">
+ <div class="td" style="height: 90px;" style="display: block;">
+ <div class="item"></div>
+ </div>
+</div>
</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>+<!DOCTYPE html>
+
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ .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; }
+</style>
+
+<div class="table big max-height-min-content">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+</div>
+
+<table>
+ <div class="td small min-height-min-content">
+ <div class="item"></div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="table small min-height-fill-available">
+ <div class="td">
+ <div class="item"></div>
+ </div>
+ </div>
+</div>
+
+
+<div class="table container">
+ <div class="td small min-height-fill-available">
+ <div class="item"></div>
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<style>
+ 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;
+ }
+</style>
+<div class="container">
+ <div>
+ height: min-content<br>on this box.
+ </div>
+
+ <div>
+ height: max-content<br>on this box.
+ </div>
+
+ <div>
+ height: fit-content<br>on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="fill-available">
+ height: fill-available<br> on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div>
+ min-height: min-content<br>on this box.
+ </div>
+
+ <div>
+ min-height: max-content<br>on this box.
+ </div>
+
+ <div>
+ min-height: fit-content<br>on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="fill-available">
+ min-height: fill-available<br> on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div>
+ max-height: min-content<br>on this box.
+ </div>
+
+ <div>
+ max-height: max-content<br>on this box.
+ </div>
+
+ <div>
+ max-height: fit-content<br>on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="fill-available">
+ max-height: fill-available<br> on this box.
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<style>
+ .container {
+ border: 2px solid blue;
+ }
+
+ .item {
+ border: 2px solid red;
+ }
+</style>
+
+<div class="container">
+ <div class="item">
+ Line 1<br>
+ Line 2
+ </div>
+</div>
+
+<div class="container">
+ <div class="item">
+ Line 1
+ </div>
+ <div class="item">
+ Line 1<br>
+ Line 2
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ .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;
+ }
+</style>
+
+<div class="container">
+ <div class="item min-height-min-content">
+ Line 1<br>
+ Line 2
+ </div>
+</div>
+
+<div class="container">
+ <div class="item min-height-min-content">
+ Line 1
+ </div>
+ <div class="item min-height-min-content">
+ Line 1<br>
+ Line 2
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+-->
+<style>
+ 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 > * {
+ position: absolute;
+ }
+
+ .f-a-container {
+ height: 100%;
+ box-sizing: border-box;
+ }
+
+ .fill-available {
+ height: 386px;
+ box-sizing: border-box;
+ }
+</style>
+<div class="container">
+ <div class="position-container">
+ <div>
+ height: min-content<br>on this box.
+ </div>
+ </div>
+ <div class="position-container">
+ <div>
+ height: max-content<br>on this box.
+ </div>
+ </div>
+ <div class="position-container">
+ <div>
+ height: fit-content<br>on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <div class="fill-available">
+ height: fill-available<br> on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <div>
+ min-height: min-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div>
+ min-height: max-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div>
+ min-height: fit-content<br>on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <div class="fill-available">
+ min-height: fill-available<br> on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <div>
+ max-height: min-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div>
+ max-height: max-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div>
+ max-height: fit-content<br>on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <div class="fill-available">
+ max-height: fill-available<br> on this box.
+ </div>
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<!--
+iframes have an intrinsic size of 300x150
+-->
+<style>
+ 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 > * {
+ 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;
+ }
+</style>
+<div class="container">
+ <div class="position-container">
+ <iframe>
+ </iframe>
+ </div>
+ <div class="position-container">
+ <iframe>
+ </iframe>
+ </div>
+ <div class="position-container">
+ <iframe>
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <iframe class="fill-available">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <iframe>
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe>
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe>
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <iframe class="fill-available">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <iframe>
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe>
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe>
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <iframe class="fill-available">
+ </iframe>
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<!--
+iframes have an intrinsic size of 300x150
+-->
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ 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 > * {
+ 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;
+ }
+</style>
+<div class="container">
+ <div class="position-container">
+ <iframe class="min-content">
+ </iframe>
+ </div>
+ <div class="position-container">
+ <iframe class="max-content">
+ </iframe>
+ </div>
+ <div class="position-container">
+ <iframe class="fit-content">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <iframe class="fill-available">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <iframe class="small min-height-min-content">
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe class="small min-height-max-content">
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe class="small min-height-fit-content">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <iframe class="small min-height-fill-available">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <iframe class="big max-height-min-content">
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe class="big max-height-max-content">
+ </iframe>
+
+ </div>
+ <div class="position-container">
+ <iframe class="big max-height-fit-content">
+ </iframe>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <iframe class="really-big max-height-fill-available">
+ </iframe>
+ </div>
+</div>
</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>+<!DOCTYPE html>
+<!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+-->
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ 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 > * {
+ position: absolute;
+ }
+
+ .f-a-container {
+ height: 100%;
+ box-sizing: border-box;
+ }
+
+ .small {
+ height: 1px;
+ }
+
+ .big {
+ height: 200px;
+ }
+
+ .really-big {
+ height: 1000px;
+ }
+</style>
+<div class="container">
+ <div class="position-container">
+ <div class="min-content">
+ height: min-content<br>on this box.
+ </div>
+ </div>
+ <div class="position-container">
+ <div class="max-content">
+ height: max-content<br>on this box.
+ </div>
+ </div>
+ <div class="position-container">
+ <div class="fit-content">
+ height: fit-content<br>on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <div class="fill-available">
+ height: fill-available<br> on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <div class="small min-height-min-content">
+ min-height: min-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div class="small min-height-max-content">
+ min-height: max-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div class="small min-height-fit-content">
+ min-height: fit-content<br>on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <div class="small min-height-fill-available">
+ min-height: fill-available<br> on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container">
+ <div class="big max-height-min-content">
+ max-height: min-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div class="big max-height-max-content">
+ max-height: max-content<br>on this box.
+ </div>
+
+ </div>
+ <div class="position-container">
+ <div class="big max-height-fit-content">
+ max-height: fit-content<br>on this box.
+ </div>
+ </div>
+</div>
+
+<div class="container">
+ <div class="position-container f-a-container">
+ <div class="really-big max-height-fill-available">
+ max-height: fill-available<br> on this box.
+ </div>
+ </div>
+</div>
</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 "PASS" messages, followed by "TEST COMPLETE".
</span><span class="cx">
</span><span class="cx">
</span><del>-PASS divs[i].style.height is ""
-PASS divs[i].style.minHeight is ""
-PASS divs[i].style.maxHeight is ""
-PASS divs[i].style.height is ""
-PASS divs[i].style.minHeight is ""
-PASS divs[i].style.maxHeight is ""
-PASS divs[i].style.height is ""
-PASS divs[i].style.minHeight is ""
-PASS divs[i].style.maxHeight is ""
-PASS divs[i].style.height is ""
-PASS divs[i].style.minHeight is ""
-PASS divs[i].style.maxHeight is ""
-PASS divs[i].style.height is ""
-PASS divs[i].style.minHeight is ""
-PASS divs[i].style.maxHeight is ""
-PASS div.style.height is ""
-PASS div.style.minHeight is ""
-PASS div.style.maxHeight is ""
-PASS div.style.height is ""
-PASS div.style.minHeight is ""
-PASS div.style.maxHeight is ""
-PASS div.style.height is ""
-PASS div.style.minHeight is ""
-PASS div.style.maxHeight is ""
-PASS div.style.height is ""
-PASS div.style.minHeight is ""
-PASS div.style.maxHeight is ""
</del><ins>+PASS div.style.height is "-webkit-min-content"
+PASS div.style.minHeight is "-webkit-min-content"
+PASS div.style.maxHeight is "-webkit-min-content"
+PASS div.style.height is "-webkit-max-content"
+PASS div.style.minHeight is "-webkit-max-content"
+PASS div.style.maxHeight is "-webkit-max-content"
+PASS div.style.height is "-webkit-fill-available"
+PASS div.style.minHeight is "-webkit-fill-available"
+PASS div.style.maxHeight is "-webkit-fill-available"
+PASS div.style.height is "-webkit-fit-content"
+PASS div.style.minHeight is "-webkit-fit-content"
+PASS div.style.maxHeight is "-webkit-fit-content"
</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"> -->
</span><span class="cx"> <script src="../../resources/js-test-pre.js"></script>
</span><span class="cx">
</span><del>-<div style="height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;"></div>
-<div style="height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;"></div>
-<div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;"></div>
-<div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;"></div>
</del><ins>+<div style="height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;" expected-data="min-content"></div>
+<div style="height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;" expected-data="max-content"></div>
+<div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;" expected-data="fill-available"></div>
+<div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;" expected-data="fit-content"></div>
</ins><span class="cx">
</span><span class="cx"> <script>
</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 < 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("expected-data")');
+ shouldBe('divs[i].style.minHeight', 'PREFIX + divs[i].getAttribute("expected-data")');
+ shouldBe('divs[i].style.maxHeight', 'PREFIX + divs[i].getAttribute("expected-data")');
</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', '"' + PREFIX + keyword + '"');
+ shouldBe('div.style.minHeight', '"' + PREFIX + keyword + '"');
+ shouldBe('div.style.maxHeight', '"' + PREFIX + keyword + '"');
</ins><span class="cx"> });
</span><span class="cx"> </script>
</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>+<!doctype html>
+<!--
+ Tests that the height keywords are not respected by the parser yet.
+-->
+<script src="../../resources/js-test-pre.js"></script>
+
+<div style="height: -webkit-min-content; min-height: -webkit-min-content; max-height: -webkit-min-content;"></div>
+<div style="height: -webkit-max-content; min-height: -webkit-max-content; max-height: -webkit-max-content;"></div>
+<div style="height: -webkit-fill-available; min-height: -webkit-fill-available; max-height: -webkit-fill-available;"></div>
+<div style="height: -webkit-fit-content; min-height: -webkit-fit-content; max-height: -webkit-fit-content;"></div>
+
+<script>
+ description('Tests that the height keywords are not exposed yet.');
+
+ var divs = document.querySelectorAll('div');
+ for (var i = 0; i < 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');
+ });
+</script>
+
+<script src="../../resources/js-test-post.js"></script>
</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>+<!DOCTYPE html>
+<style>
+ 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;
+ }
+</style>
+<div class="container">
+ <iframe>
+ height: min-content<br>on this box.
+ </iframe>
+
+ <iframe>
+ height: max-content<br>on this box.
+ </iframe>
+
+ <iframe>
+ height: fit-content<br>on this box.
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="fill-available">
+ height: fill-available<br> on this box.
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe>
+ min-height: min-content<br>on this box.
+ </iframe>
+
+ <iframe>
+ min-height: max-content<br>on this box.
+ </iframe>
+
+ <iframe>
+ min-height: fit-content<br>on this box.
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="fill-available">
+ min-height: fill-available<br> on this box.
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe>
+ max-height: min-content<br>on this box.
+ </iframe>
+
+ <iframe>
+ max-height: max-content<br>on this box.
+ </iframe>
+
+ <iframe>
+ max-height: fit-content<br>on this box.
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="fill-available">
+ max-height: fill-available<br> on this box.
+ </iframe>
+</div>
</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>+<!DOCTYPE html>
+<!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+-->
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ 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;
+ }
+</style>
+<div class="container">
+ <iframe class="min-content">
+ </iframe>
+
+ <iframe class="max-content">
+ </iframe>
+
+ <iframe class="fit-content">
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="fill-available">
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="small min-height-min-content">
+ </iframe>
+
+ <iframe class="small min-height-max-content">
+ </iframe>
+
+ <iframe class="small min-height-fit-content">
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="small min-height-fill-available">
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="big max-height-min-content">
+ </iframe>
+
+ <iframe class="big max-height-max-content">
+ </iframe>
+
+ <iframe class="big max-height-fit-content">
+ </iframe>
+</div>
+
+<div class="container">
+ <iframe class="really-big max-height-fill-available">
+ </iframe>
+</div>
</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>+<!DOCTYPE html>
+
+<style>
+ .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; }
+</style>
+
+<table>
+ <td>
+ <div class="item"></div>
+ </td>
+</table>
+
+<table>
+ <td>
+ <div class="item"></div>
+ </td>
+</table>
+
+<div class="container">
+ <table style="height: 100%; box-sizing: border-box;">
+ <td>
+ <div class="item"></div>
+ </td>
+ </table>
+</div>
+
+
+<table class="container">
+ <td style="height: 79px;">
+ <div class="item"></div>
+ </td>
+</table>
</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>+<!DOCTYPE html>
+
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ .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; }
+</style>
+
+<table class="big max-height-min-content">
+ <td>
+ <div class="item"></div>
+ </td>
+</table>
+
+<table>
+ <td class="small min-height-min-content">
+ <div class="item"></div>
+ </td>
+</table>
+
+<div class="container">
+ <table class="small min-height-fill-available">
+ <td>
+ <div class="item"></div>
+ </td>
+ </table>
+</div>
+
+
+<table class="container">
+ <td class="small min-height-fill-available">
+ <div class="item"></div>
+ </td>
+</table>
</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>+<!DOCTYPE html>
+
+<style>
+ .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; }
+</style>
+
+<table>
+ <td>
+ <div class="item"></div>
+ </td>
+</table>
+
+<table>
+ <td>
+ <div class="item"></div>
+ </td>
+</table>
+
+<div class="container">
+ <table style="height: 100%; box-sizing: border-box;">
+ <td>
+ <div class="item"></div>
+ </td>
+ </table>
+</div>
+
+
+<table class="container">
+ <td style="height: 79px;">
+ <div class="item"></div>
+ </td>
+</table>
</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>+<!DOCTYPE html>
+
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ .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; }
+</style>
+
+<table class="big max-height-min-content">
+ <td>
+ <div class="item"></div>
+ </td>
+</table>
+
+<table>
+ <td class="small min-height-min-content">
+ <div class="item"></div>
+ </td>
+</table>
+
+<div class="container">
+ <table class="small min-height-fill-available">
+ <td>
+ <div class="item"></div>
+ </td>
+ </table>
+</div>
+
+
+<table class="container">
+ <td class="small min-height-fill-available">
+ <div class="item"></div>
+ </td>
+</table>
</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>+<!DOCTYPE html>
+<!--
+All divs here should shrinkwrap to fit their content, except for fill-available
+-->
+<style>
+ @import "resources/height-keyword-classes.css";
+
+ 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;
+ }
+</style>
+<div class="container">
+ <div class="min-content">
+ height: min-content<br>on this box.
+ </div>
+
+ <div class="max-content">
+ height: max-content<br>on this box.
+ </div>
+
+ <div class="fit-content">
+ height: fit-content<br>on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="fill-available">
+ height: fill-available<br> on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="small min-height-min-content">
+ min-height: min-content<br>on this box.
+ </div>
+
+ <div class="small min-height-max-content">
+ min-height: max-content<br>on this box.
+ </div>
+
+ <div class="small min-height-fit-content">
+ min-height: fit-content<br>on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="small min-height-fill-available">
+ min-height: fill-available<br> on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="big max-height-min-content">
+ max-height: min-content<br>on this box.
+ </div>
+
+ <div class="big max-height-max-content">
+ max-height: max-content<br>on this box.
+ </div>
+
+ <div class="big max-height-fit-content">
+ max-height: fit-content<br>on this box.
+ </div>
+</div>
+
+<div class="container">
+ <div class="really-big max-height-fill-available">
+ max-height: fill-available<br> on this box.
+ </div>
+</div>
</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 <svillar@igalia.com>
+
+ 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 & r150355 by <cbiesinger@chromium.org>.
+
+ Adds intrinsic values support to heigh & 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 <commit-queue@webkit.org>
</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 && value.iValue == '/';
</span><span class="cx"> }
</span><span class="cx">
</span><del>-bool CSSParser::validateWidth(ValueWithCalculation& valueWithCalculation)
</del><ins>+bool CSSParser::isValidSize(ValueWithCalculation& 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 && 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& valueWithCalculation)
-{
- int id = valueWithCalculation.value().id;
- if (id == CSSValueIntrinsic || id == CSSValueMinIntrinsic)
- return true;
- return !id && validateUnit(valueWithCalculation, FLength | FPercent | FNonNeg);
-}
-
</del><span class="cx"> inline PassRefPtr<CSSPrimitiveValue> CSSParser::parseValidPrimitive(CSSValueID identifier, ValueWithCalculation& 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&);
- bool validateHeight(ValueWithCalculation&);
</del><ins>+ bool isValidSize(ValueWithCalculation&);
</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& 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& 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& 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->style(), &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& height) const
</del><ins>+LayoutUnit RenderBox::computeLogicalHeightUsing(const Length& 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& height) const
</del><ins>+LayoutUnit RenderBox::computeContentLogicalHeight(const Length& 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<LayoutUnit>(0, adjustContentBoxLogicalHeightForBoxSizing(heightIncludingScrollbar) - scrollbarLogicalHeight());
</span><span class="cx"> }
</span><span class="cx">
</span><del>-LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(const Length& 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()->availableLogicalHeight(ExcludeMarginBorderPadding) - borderAndPadding;
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+LayoutUnit RenderBox::computeContentAndScrollbarLogicalHeightUsing(const Length& 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->adjustContentBoxLogicalHeightForBoxSizing(cbstyle.logicalHeight().value());
</span><del>- availableHeight = std::max<LayoutUnit>(0, cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight()));
</del><ins>+ availableHeight = std::max<LayoutUnit>(0, cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeight - cb->scrollbarLogicalHeight(), -1));
</ins><span class="cx"> } else if (cbstyle.logicalHeight().isPercentOrCalculated() && !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->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->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight());
</del><ins>+ LayoutUnit contentBoxHeight = cb->constrainContentBoxLogicalHeightByMinMax(contentBoxHeightWithScrollbar - cb->scrollbarLogicalHeight(), -1);
</ins><span class="cx"> availableHeight = std::max<LayoutUnit>(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& 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<LayoutUnit>(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 && !logicalHeightIsAuto && !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& height) const;
- LayoutUnit computeContentLogicalHeight(const Length& height) const;
- LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& height) const;
</del><ins>+ LayoutUnit computeLogicalHeightUsing(const Length& height, LayoutUnit intrinsicContentHeight) const;
+ LayoutUnit computeContentLogicalHeight(const Length& height, LayoutUnit intrinsicContentHeight) const;
+ LayoutUnit computeContentAndScrollbarLogicalHeightUsing(const Length& 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&, 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() && !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 "auto" 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& 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<GridTrack>& tracks, const GridSpan& 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()->columnHeightAvailable();
</span><span class="cx"> LayoutUnit maxColumnHeight = availableHeight ? availableHeight : RenderFlowThread::maxLogicalHeight();
</span><span class="cx"> if (!multicolStyle.logicalMaxHeight().isUndefined()) {
</span><del>- LayoutUnit logicalMaxHeight = multicolBlock->computeContentLogicalHeight(multicolStyle.logicalMaxHeight());
</del><ins>+ LayoutUnit logicalMaxHeight = multicolBlock->computeContentLogicalHeight(multicolStyle.logicalMaxHeight(), -1);
</ins><span class="cx"> if (logicalMaxHeight != -1 && maxColumnHeight > 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& 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 <table> which other browsers allow.
</span><span class="cx"> if (is<HTMLTableElement>(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<LayoutUnit>(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() && logicalHeightLength.isPositive())
</del><ins>+ if (logicalHeightLength.isIntrinsic() || (logicalHeightLength.isSpecified() && 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() && !logicalMaxHeightLength.isNegative()) {
</del><ins>+ if (logicalMaxHeightLength.isIntrinsic() || (logicalMaxHeightLength.isSpecified() && !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() && !logicalMinHeightLength.isNegative()) {
</del><ins>+ if (logicalMinHeightLength.isIntrinsic() || (logicalMinHeightLength.isSpecified() && !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>