Diff
Modified: trunk/LayoutTests/ChangeLog (163174 => 163175)
--- trunk/LayoutTests/ChangeLog 2014-01-31 17:36:37 UTC (rev 163174)
+++ trunk/LayoutTests/ChangeLog 2014-01-31 17:43:04 UTC (rev 163175)
@@ -1,3 +1,16 @@
+2014-01-31 Commit Queue <[email protected]>
+
+ 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.
+
2014-01-31 Mihnea Ovidenie <[email protected]>
[CSSRegions] Add test(s) for list item as region
Modified: trunk/LayoutTests/fast/table/css-table-max-width-expected.txt (163174 => 163175)
--- 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)
@@ -10,11 +10,11 @@
PASS maxGreatThanMinWidthAutoLayout.getBoundingClientRect().width is 202
PASS minGreatThanMaxWidthAutoLayout.getBoundingClientRect().width is 202
PASS onlyMaxWidthAutoLayout.getBoundingClientRect().width is 202
-PASS maxWidthZeroAutoLayout.getBoundingClientRect().width is 182
+PASS maxWidthZeroAutoLayout.getBoundingClientRect().width is 0
PASS maxGreatThanMinWidthFixedLayout.getBoundingClientRect().width is 202
PASS minGreatThanMaxWidthFixedLayout.getBoundingClientRect().width is 202
PASS onlyMaxWidthFixedLayout.getBoundingClientRect().width is 202
-PASS maxWidthZeroFixedLayout.getBoundingClientRect().width is 2
+PASS maxWidthZeroFixedLayout.getBoundingClientRect().width is 0
PASS successfullyParsed is true
TEST COMPLETE
Modified: trunk/LayoutTests/fast/table/css-table-max-width.html (163174 => 163175)
--- 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)
@@ -42,7 +42,7 @@
fugiat nulla pariatur.Excepteur sint occaecat cupidatat non proident, sunt in culpa
qui officia deserunt mollit anim id est laborum.
</div>
- <div id="maxWidthZeroAutoLayout" class="child" style="display:table; max-width:0; width:100%; font: 10px/1 Ahem;">
+ <div id="maxWidthZeroAutoLayout" class="child" style="display:table; max-width:0; width:100%;">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
@@ -97,7 +97,7 @@
_onlyMaxWidthAutoLayout_ = document.getElementById("onlyMaxWidthAutoLayout");
shouldBe("onlyMaxWidthAutoLayout.getBoundingClientRect().width","202");
maxWidthZeroAutoLayout = document.getElementById("maxWidthZeroAutoLayout");
-shouldBe("maxWidthZeroAutoLayout.getBoundingClientRect().width","182");
+shouldBe("maxWidthZeroAutoLayout.getBoundingClientRect().width","0");
maxGreatThanMinWidthFixedLayout = document.getElementById("maxGreatThanMinWidthFixedLayout");
shouldBe("maxGreatThanMinWidthFixedLayout.getBoundingClientRect().width","202");
minGreatThanMaxWidthFixedLayout = document.getElementById("minGreatThanMaxWidthFixedLayout");
@@ -105,7 +105,7 @@
_onlyMaxWidthFixedLayout_ = document.getElementById("onlyMaxWidthFixedLayout");
shouldBe("onlyMaxWidthFixedLayout.getBoundingClientRect().width","202");
maxWidthZeroFixedLayout = document.getElementById("maxWidthZeroFixedLayout");
-shouldBe("maxWidthZeroFixedLayout.getBoundingClientRect().width","2");
+shouldBe("maxWidthZeroFixedLayout.getBoundingClientRect().width","0");
document.body.removeChild(document.getElementById('container'));
</script>
Deleted: trunk/LayoutTests/fast/table/html-table-width-max-width-constrained-expected.txt (163174 => 163175)
--- 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)
@@ -1,4 +0,0 @@
-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
Deleted: trunk/LayoutTests/fast/table/html-table-width-max-width-constrained.html (163174 => 163175)
--- 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)
@@ -1,34 +0,0 @@
-<!DOCTYPE html>
-<html>
-<head>
-<style>
-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;
-}
-</style>
-<script src=""
-</head>
-<body _onload_="checkLayout('table')">
- <div>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).</div>
- <div>For this test to pass, the second cell shouldn't bleed out of the table.</div>
- <table data-expected-width="404">
- <tbody>
- <tr>
- <td>Cell text</td>
- <td>Cell text text text text</td>
- </tr>
- </tbody>
- </table>
-</body></html>
Modified: trunk/Source/WebCore/ChangeLog (163174 => 163175)
--- 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)
@@ -1,3 +1,15 @@
+2014-01-31 Commit Queue <[email protected]>
+
+ 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):
+
2014-01-31 Anders Carlsson <[email protected]>
Don't allocate a new XMLHttpRequestStaticData every time staticData() is called
Modified: trunk/Source/WebCore/rendering/RenderTable.cpp (163174 => 163175)
--- 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)
@@ -292,16 +292,16 @@
setLogicalWidth(std::min<int>(availableContentLogicalWidth, maxPreferredLogicalWidth()));
}
+ // Ensure we aren't smaller than our min preferred width.
+ setLogicalWidth(std::max<int>(logicalWidth(), minPreferredLogicalWidth()));
+
+
// Ensure we aren't bigger than our max-width style.
Length styleMaxLogicalWidth = style().logicalMaxWidth();
if ((styleMaxLogicalWidth.isSpecified() && !styleMaxLogicalWidth.isNegative()) || styleMaxLogicalWidth.isIntrinsic()) {
LayoutUnit computedMaxLogicalWidth = convertStyleLogicalWidthToComputedWidth(styleMaxLogicalWidth, availableLogicalWidth);
setLogicalWidth(std::min<int>(logicalWidth(), computedMaxLogicalWidth));
}
-
- // 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<int>(logicalWidth(), minPreferredLogicalWidth()));
// Ensure we aren't smaller than our min-width style.
Length styleMinLogicalWidth = style().logicalMinWidth();
@@ -328,10 +328,6 @@
setMarginStart(minimumValueForLength(style().marginStart(), availableLogicalWidth));
setMarginEnd(minimumValueForLength(style().marginEnd(), availableLogicalWidth));
}
-
- // 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() >= minPreferredLogicalWidth());
}
// This method takes a RenderStyle's logical width, min-width, or max-width length and computes its actual value.
@@ -782,9 +778,8 @@
// FIXME: This should probably be checking for isSpecified since you should be able to use percentage, calc or viewport relative values for maxWidth.
if (styleToUse.logicalMaxWidth().isFixed()) {
- // We don't constrain m_minPreferredLogicalWidth as the table should be at least the size of its min-content, regardless of 'max-width'.
m_maxPreferredLogicalWidth = std::min(m_maxPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
- m_minPreferredLogicalWidth = std::max(m_minPreferredLogicalWidth, m_maxPreferredLogicalWidth);
+ m_minPreferredLogicalWidth = std::min(m_minPreferredLogicalWidth, adjustContentBoxLogicalWidthForBoxSizing(styleToUse.logicalMaxWidth().value()));
}
// FIXME: We should be adding borderAndPaddingLogicalWidth here, but m_tableLayout->computePreferredLogicalWidths already does,