<!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>[163175] 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/163175">163175</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2014-01-31 09:43:04 -0800 (Fri, 31 Jan 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>Unreviewed, rolling out <a href="http://trac.webkit.org/projects/webkit/changeset/163165">r163165</a>.
http://trac.webkit.org/changeset/163165
https://bugs.webkit.org/show_bug.cgi?id=127997

broke 2 fast/table tests (Requested by kling on #webkit).

Source/WebCore:

* rendering/RenderTable.cpp:
(WebCore::RenderTable::updateLogicalWidth):
(WebCore::RenderTable::computePreferredLogicalWidths):

LayoutTests:

* fast/table/css-table-max-width-expected.txt:
* fast/table/css-table-max-width.html:
* fast/table/html-table-width-max-width-constrained-expected.txt: Removed.
* fast/table/html-table-width-max-width-constrained.html: Removed.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfasttablecsstablemaxwidthexpectedtxt">trunk/LayoutTests/fast/table/css-table-max-width-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttablecsstablemaxwidthhtml">trunk/LayoutTests/fast/table/css-table-max-width.html</a></li>
<li><a href="#trunkSourceWebCoreChangeLog">trunk/Source/WebCore/ChangeLog</a></li>
<li><a href="#trunkSourceWebCorerenderingRenderTablecpp">trunk/Source/WebCore/rendering/RenderTable.cpp</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsfasttablehtmltablewidthmaxwidthconstrainedexpectedtxt">trunk/LayoutTests/fast/table/html-table-width-max-width-constrained-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfasttablehtmltablewidthmaxwidthconstrainedhtml">trunk/LayoutTests/fast/table/html-table-width-max-width-constrained.html</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/LayoutTests/ChangeLog        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -1,3 +1,16 @@
</span><ins>+2014-01-31  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r163165.
+        http://trac.webkit.org/changeset/163165
+        https://bugs.webkit.org/show_bug.cgi?id=127997
+
+        broke 2 fast/table tests (Requested by kling on #webkit).
+
+        * fast/table/css-table-max-width-expected.txt:
+        * fast/table/css-table-max-width.html:
+        * fast/table/html-table-width-max-width-constrained-expected.txt: Removed.
+        * fast/table/html-table-width-max-width-constrained.html: Removed.
+
</ins><span class="cx"> 2014-01-31  Mihnea Ovidenie  &lt;mihnea@adobe.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [CSSRegions] Add test(s) for list item as region
</span></span></pre></div>
<a id="trunkLayoutTestsfasttablecsstablemaxwidthexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/table/css-table-max-width-expected.txt (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/table/css-table-max-width-expected.txt        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/LayoutTests/fast/table/css-table-max-width-expected.txt        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -10,11 +10,11 @@
</span><span class="cx"> PASS maxGreatThanMinWidthAutoLayout.getBoundingClientRect().width is 202
</span><span class="cx"> PASS minGreatThanMaxWidthAutoLayout.getBoundingClientRect().width is 202
</span><span class="cx"> PASS onlyMaxWidthAutoLayout.getBoundingClientRect().width is 202
</span><del>-PASS maxWidthZeroAutoLayout.getBoundingClientRect().width is 182
</del><ins>+PASS maxWidthZeroAutoLayout.getBoundingClientRect().width is 0
</ins><span class="cx"> PASS maxGreatThanMinWidthFixedLayout.getBoundingClientRect().width is 202
</span><span class="cx"> PASS minGreatThanMaxWidthFixedLayout.getBoundingClientRect().width is 202
</span><span class="cx"> PASS onlyMaxWidthFixedLayout.getBoundingClientRect().width is 202
</span><del>-PASS maxWidthZeroFixedLayout.getBoundingClientRect().width is 2
</del><ins>+PASS maxWidthZeroFixedLayout.getBoundingClientRect().width is 0
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfasttablecsstablemaxwidthhtml"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/table/css-table-max-width.html (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/table/css-table-max-width.html        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/LayoutTests/fast/table/css-table-max-width.html        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -42,7 +42,7 @@
</span><span class="cx">         fugiat nulla pariatur.Excepteur sint occaecat cupidatat non proident, sunt in culpa 
</span><span class="cx">         qui officia deserunt mollit anim id est laborum.
</span><span class="cx">     &lt;/div&gt;
</span><del>-    &lt;div id=&quot;maxWidthZeroAutoLayout&quot; class=&quot;child&quot; style=&quot;display:table; max-width:0; width:100%; font: 10px/1 Ahem;&quot;&gt;
</del><ins>+    &lt;div id=&quot;maxWidthZeroAutoLayout&quot; class=&quot;child&quot; style=&quot;display:table; max-width:0; width:100%;&quot;&gt;
</ins><span class="cx">         Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod 
</span><span class="cx">         tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, 
</span><span class="cx">         quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. 
</span><span class="lines">@@ -97,7 +97,7 @@
</span><span class="cx"> onlyMaxWidthAutoLayout = document.getElementById(&quot;onlyMaxWidthAutoLayout&quot;);
</span><span class="cx"> shouldBe(&quot;onlyMaxWidthAutoLayout.getBoundingClientRect().width&quot;,&quot;202&quot;);
</span><span class="cx"> maxWidthZeroAutoLayout = document.getElementById(&quot;maxWidthZeroAutoLayout&quot;);
</span><del>-shouldBe(&quot;maxWidthZeroAutoLayout.getBoundingClientRect().width&quot;,&quot;182&quot;);
</del><ins>+shouldBe(&quot;maxWidthZeroAutoLayout.getBoundingClientRect().width&quot;,&quot;0&quot;);
</ins><span class="cx"> maxGreatThanMinWidthFixedLayout = document.getElementById(&quot;maxGreatThanMinWidthFixedLayout&quot;);
</span><span class="cx"> shouldBe(&quot;maxGreatThanMinWidthFixedLayout.getBoundingClientRect().width&quot;,&quot;202&quot;);
</span><span class="cx"> minGreatThanMaxWidthFixedLayout = document.getElementById(&quot;minGreatThanMaxWidthFixedLayout&quot;);
</span><span class="lines">@@ -105,7 +105,7 @@
</span><span class="cx"> onlyMaxWidthFixedLayout = document.getElementById(&quot;onlyMaxWidthFixedLayout&quot;);
</span><span class="cx"> shouldBe(&quot;onlyMaxWidthFixedLayout.getBoundingClientRect().width&quot;,&quot;202&quot;);
</span><span class="cx"> maxWidthZeroFixedLayout = document.getElementById(&quot;maxWidthZeroFixedLayout&quot;);
</span><del>-shouldBe(&quot;maxWidthZeroFixedLayout.getBoundingClientRect().width&quot;,&quot;2&quot;);
</del><ins>+shouldBe(&quot;maxWidthZeroFixedLayout.getBoundingClientRect().width&quot;,&quot;0&quot;);
</ins><span class="cx"> 
</span><span class="cx"> document.body.removeChild(document.getElementById('container'));
</span><span class="cx"> &lt;/script&gt;
</span></span></pre></div>
<a id="trunkLayoutTestsfasttablehtmltablewidthmaxwidthconstrainedexpectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/table/html-table-width-max-width-constrained-expected.txt (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/table/html-table-width-max-width-constrained-expected.txt        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/LayoutTests/fast/table/html-table-width-max-width-constrained-expected.txt        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -1,4 +0,0 @@
</span><del>-This test checks that a fixed table layout with max-width doesn't over-constraint the cell (ie the content width still wins over max-width per the specification).
-For this test to pass, the second cell shouldn't bleed out of the table.
-Cell text        Cell text text text text
-PASS
</del></span></pre></div>
<a id="trunkLayoutTestsfasttablehtmltablewidthmaxwidthconstrainedhtml"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/fast/table/html-table-width-max-width-constrained.html (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/table/html-table-width-max-width-constrained.html        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/LayoutTests/fast/table/html-table-width-max-width-constrained.html        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -1,34 +0,0 @@
</span><del>-&lt;!DOCTYPE html&gt;
-&lt;html&gt;
-&lt;head&gt;
-&lt;style&gt;
-table {
-    font: 20px/1 Ahem;
-    border-collapse: separate;
-    table-layout: fixed;
-    max-width: 300px;
-    width: 300px;
-    border: 1px solid #dddddd;
-    border-spacing: 0px;
-}
-
-td {
-    padding: 0px;
-    width: 200px;
-    border-left: 1px solid #dddddd;
-}
-&lt;/style&gt;
-&lt;script src=&quot;../../resources/check-layout.js&quot;&gt;&lt;/script&gt;
-&lt;/head&gt;
-&lt;body onload=&quot;checkLayout('table')&quot;&gt;
-    &lt;div&gt;This test checks that a fixed table layout with max-width doesn't over-constraint the cell (ie the content width still wins over max-width per the specification).&lt;/div&gt;
-    &lt;div&gt;For this test to pass, the second cell shouldn't bleed out of the table.&lt;/div&gt;
-    &lt;table data-expected-width=&quot;404&quot;&gt;
-        &lt;tbody&gt;
-            &lt;tr&gt;
-            &lt;td&gt;Cell text&lt;/td&gt;
-            &lt;td&gt;Cell text text text text&lt;/td&gt;
-            &lt;/tr&gt;
-        &lt;/tbody&gt;
-    &lt;/table&gt;
-&lt;/body&gt;&lt;/html&gt;
</del></span></pre></div>
<a id="trunkSourceWebCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/ChangeLog (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/ChangeLog        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/Source/WebCore/ChangeLog        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2014-01-31  Commit Queue  &lt;commit-queue@webkit.org&gt;
+
+        Unreviewed, rolling out r163165.
+        http://trac.webkit.org/changeset/163165
+        https://bugs.webkit.org/show_bug.cgi?id=127997
+
+        broke 2 fast/table tests (Requested by kling on #webkit).
+
+        * rendering/RenderTable.cpp:
+        (WebCore::RenderTable::updateLogicalWidth):
+        (WebCore::RenderTable::computePreferredLogicalWidths):
+
</ins><span class="cx"> 2014-01-31  Anders Carlsson  &lt;andersca@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Don't allocate a new XMLHttpRequestStaticData every time staticData() is called
</span></span></pre></div>
<a id="trunkSourceWebCorerenderingRenderTablecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (163174 => 163175)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/WebCore/rendering/RenderTable.cpp        2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/Source/WebCore/rendering/RenderTable.cpp        2014-01-31 17:43:04 UTC (rev 163175)
</span><span class="lines">@@ -292,16 +292,16 @@
</span><span class="cx">         setLogicalWidth(std::min&lt;int&gt;(availableContentLogicalWidth, maxPreferredLogicalWidth()));
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    // Ensure we aren't smaller than our min preferred width.
+    setLogicalWidth(std::max&lt;int&gt;(logicalWidth(), minPreferredLogicalWidth()));
+
+    
</ins><span class="cx">     // Ensure we aren't bigger than our max-width style.
</span><span class="cx">     Length styleMaxLogicalWidth = style().logicalMaxWidth();
</span><span class="cx">     if ((styleMaxLogicalWidth.isSpecified() &amp;&amp; !styleMaxLogicalWidth.isNegative()) || styleMaxLogicalWidth.isIntrinsic()) {
</span><span class="cx">         LayoutUnit computedMaxLogicalWidth = convertStyleLogicalWidthToComputedWidth(styleMaxLogicalWidth, availableLogicalWidth);
</span><span class="cx">         setLogicalWidth(std::min&lt;int&gt;(logicalWidth(), computedMaxLogicalWidth));
</span><span class="cx">     }
</span><del>-    
-    // Ensure we aren't smaller than our min preferred width. This MUST be done after 'max-width' as
-    // we ignore it if it means we wouldn't accomodate our content.
-    setLogicalWidth(std::max&lt;int&gt;(logicalWidth(), minPreferredLogicalWidth()));
</del><span class="cx"> 
</span><span class="cx">     // Ensure we aren't smaller than our min-width style.
</span><span class="cx">     Length styleMinLogicalWidth = style().logicalMinWidth();
</span><span class="lines">@@ -328,10 +328,6 @@
</span><span class="cx">         setMarginStart(minimumValueForLength(style().marginStart(), availableLogicalWidth));
</span><span class="cx">         setMarginEnd(minimumValueForLength(style().marginEnd(), availableLogicalWidth));
</span><span class="cx">     }
</span><del>-
-    // We should NEVER shrink the table below the min-content logical width, or else the table can't accomodate
-    // its own content which doesn't match CSS nor what authors expect.
-    ASSERT(logicalWidth() &gt;= minPreferredLogicalWidth());
</del><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> // This method takes a RenderStyle's logical width, min-width, or max-width length and computes its actual value.
</span><span class="lines">@@ -782,9 +778,8 @@
</span><span class="cx"> 
</span><span class="cx">     // FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for maxWidth.
</span><span class="cx">     if (styleToUse.logicalMaxWidth().isFixed()) {
</span><del>-        // We don't constrain m_minPreferredLogicalWidth as the table should be at least the size of its min-content, regardless of 'max-width'.
</del><span class="cx">         m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
</span><del>-        m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
</del><ins>+        m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
</ins><span class="cx">     }
</span><span class="cx"> 
</span><span class="cx">     // FIXME: We should be adding borderAndPaddingLogicalWidth here, but m_tableLayout-&gt;computePreferredLogicalWidths already does,
</span></span></pre>
</div>
</div>

</body>
</html>