Diff
Modified: trunk/LayoutTests/ChangeLog (149843 => 149844)
--- trunk/LayoutTests/ChangeLog 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/LayoutTests/ChangeLog 2013-05-09 21:45:46 UTC (rev 149844)
@@ -1,3 +1,16 @@
+2013-05-09 Robert Hogan <[email protected]>
+
+ REGRESSION (Safari 3-Safari 4): Replaced element with percent height in table has incorrect height
+ https://bugs.webkit.org/show_bug.cgi?id=26394
+
+ Reviewed by David Hyatt.
+
+ * fast/replaced/table-percent-height-text-controls-expected.txt: Renamed from LayoutTests/platform/mac/fast/replaced/table-percent-height-text-controls-expected.txt.
+ * fast/replaced/table-percent-height-text-controls.html:
+ * platform/gtk/fast/replaced/table-percent-height-text-controls-expected.txt: Removed.
+ * platform/qt/fast/replaced/table-percent-height-text-controls-expected.txt: Removed.
+ * platform/win/fast/replaced/table-percent-height-text-controls-expected.txt: Removed.
+
2013-05-09 Xiaobo Wang <[email protected]>
Update srcipt paths in editing/shadow/rightclick-on-meter-in-shadow-crash.html
Copied: trunk/LayoutTests/fast/replaced/table-percent-height-text-controls-expected.txt (from rev 149843, trunk/LayoutTests/platform/mac/fast/replaced/table-percent-height-text-controls-expected.txt) (0 => 149844)
--- trunk/LayoutTests/fast/replaced/table-percent-height-text-controls-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:45:46 UTC (rev 149844)
@@ -0,0 +1,29 @@
+
+
+
+
+This is a searchable index. Enter search keywords:
+This is a searchable index. Enter search keywords:
+
+
+This test checks that text controls with percentage heights within table cells have the correct height.Text controls are in a different test than other replaced elements because their metrics are platform-specific.
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS getWidth('input-password-75') is getWidth('input-password-100')
+PASS getFullHeight('input-password-75') != '0px' is true
+PASS getFullHeight('input-password-75') is equal to getFullHeight('input-password-100').
+PASS getWidth('input-text-75') is getWidth('input-text-100')
+PASS getFullHeight('input-text-75') != '0px' is true
+PASS getFullHeight('input-text-75') is equal to getFullHeight('input-text-100').
+PASS getWidth('isindex-75') is getWidth('isindex-100')
+PASS getFullHeight('isindex-75') != '0px' is true
+PASS getFullHeight('isindex-75') is getFullHeight('isindex-100')
+PASS getWidth('textarea-75') is getWidth('textarea-100')
+PASS getFullHeight('textarea-75') != '0px' is true
+PASS getFullHeight('textarea-75') is equal to getFullHeight('textarea-100').
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Modified: trunk/LayoutTests/fast/replaced/table-percent-height-text-controls.html (149843 => 149844)
--- trunk/LayoutTests/fast/replaced/table-percent-height-text-controls.html 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/LayoutTests/fast/replaced/table-percent-height-text-controls.html 2013-05-09 21:45:46 UTC (rev 149844)
@@ -47,7 +47,7 @@
return parseFloat(str);
}
-function is75PercentOf(expression75, expression100)
+function isEqual(expression75, expression100)
{
var str75 = eval(expression75);
var str100 = eval(expression100);
@@ -55,10 +55,10 @@
var num100 = parsePixelValue(str100);
if (num75 < 0 || num100 < 0)
return;
- if (num75 == Math.floor(num100 * 75 / 100))
- testPassed(expression75 + " is 75% of " + expression100 + ".");
+ if (num75 == num100)
+ testPassed(expression75 + " is equal to " + expression100 + ".");
else
- testFailed(expression75 + " [" + str75 + "] is not 75% of " + expression100 + " [" + str100 + "].");
+ testFailed(expression75 + " [" + str75 + "] is not equal to " + expression100 + " [" + str100 + "].");
}
function test()
@@ -68,13 +68,11 @@
shouldBe("getWidth('input-password-75')", "getWidth('input-password-100')");
shouldBeTrue("getFullHeight('input-password-75') != '0px'");
- // Note: This behavior doesn't match to IE 8, Firefox 3.5 and Opera 10.
- is75PercentOf("getFullHeight('input-password-75')", "getFullHeight('input-password-100')");
+ isEqual("getFullHeight('input-password-75')", "getFullHeight('input-password-100')");
shouldBe("getWidth('input-text-75')", "getWidth('input-text-100')");
shouldBeTrue("getFullHeight('input-text-75') != '0px'");
- // Note: This behavior doesn't match to IE 8, Firefox 3.5 and Opera 10.
- is75PercentOf("getFullHeight('input-text-75')", "getFullHeight('input-text-100')");
+ isEqual("getFullHeight('input-text-75')", "getFullHeight('input-text-100')");
shouldBe("getWidth('isindex-75')", "getWidth('isindex-100')");
shouldBeTrue("getFullHeight('isindex-75') != '0px'");
@@ -82,8 +80,7 @@
shouldBe("getWidth('textarea-75')", "getWidth('textarea-100')");
shouldBeTrue("getFullHeight('textarea-75') != '0px'");
- // Note: This behavior doesn't match to IE 8, Firefox 3.5 and Opera 10.
- is75PercentOf("getFullHeight('textarea-75')", "getFullHeight('textarea-100')");
+ isEqual("getFullHeight('textarea-75')", "getFullHeight('textarea-100')");
isSuccessfullyParsed();
Deleted: trunk/LayoutTests/platform/gtk/fast/replaced/table-percent-height-text-controls-expected.txt (149843 => 149844)
--- trunk/LayoutTests/platform/gtk/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/LayoutTests/platform/gtk/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:45:46 UTC (rev 149844)
@@ -1,29 +0,0 @@
-
-
-
-
-This is a searchable index. Enter search keywords:
-This is a searchable index. Enter search keywords:
-
-
-This test checks that text controls with percentage heights within table cells have the correct height.Text controls are in a different test than other replaced elements because their metrics are platform-specific.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS getWidth('input-password-75') is getWidth('input-password-100')
-PASS getFullHeight('input-password-75') != '0px' is true
-FAIL getFullHeight('input-password-75') [17.25px] is not 75% of getFullHeight('input-password-100') [23px].
-PASS getWidth('input-text-75') is getWidth('input-text-100')
-PASS getFullHeight('input-text-75') != '0px' is true
-FAIL getFullHeight('input-text-75') [17.25px] is not 75% of getFullHeight('input-text-100') [23px].
-PASS getWidth('isindex-75') is getWidth('isindex-100')
-PASS getFullHeight('isindex-75') != '0px' is true
-PASS getFullHeight('isindex-75') is getFullHeight('isindex-100')
-PASS getWidth('textarea-75') is getWidth('textarea-100')
-PASS getFullHeight('textarea-75') != '0px' is true
-PASS getFullHeight('textarea-75') is 75% of getFullHeight('textarea-100').
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/platform/mac/fast/replaced/table-percent-height-text-controls-expected.txt (149843 => 149844)
--- trunk/LayoutTests/platform/mac/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/LayoutTests/platform/mac/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:45:46 UTC (rev 149844)
@@ -1,29 +0,0 @@
-
-
-
-
-This is a searchable index. Enter search keywords:
-This is a searchable index. Enter search keywords:
-
-
-This test checks that text controls with percentage heights within table cells have the correct height.Text controls are in a different test than other replaced elements because their metrics are platform-specific.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS getWidth('input-password-75') is getWidth('input-password-100')
-PASS getFullHeight('input-password-75') != '0px' is true
-PASS getFullHeight('input-password-75') is 75% of getFullHeight('input-password-100').
-PASS getWidth('input-text-75') is getWidth('input-text-100')
-PASS getFullHeight('input-text-75') != '0px' is true
-PASS getFullHeight('input-text-75') is 75% of getFullHeight('input-text-100').
-PASS getWidth('isindex-75') is getWidth('isindex-100')
-PASS getFullHeight('isindex-75') != '0px' is true
-PASS getFullHeight('isindex-75') is getFullHeight('isindex-100')
-PASS getWidth('textarea-75') is getWidth('textarea-100')
-PASS getFullHeight('textarea-75') != '0px' is true
-PASS getFullHeight('textarea-75') is 75% of getFullHeight('textarea-100').
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/platform/qt/fast/replaced/table-percent-height-text-controls-expected.txt (149843 => 149844)
--- trunk/LayoutTests/platform/qt/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/LayoutTests/platform/qt/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:45:46 UTC (rev 149844)
@@ -1,29 +0,0 @@
-
-
-
-
-This is a searchable index. Enter search keywords:
-This is a searchable index. Enter search keywords:
-
-
-This test checks that text controls with percentage heights within table cells have the correct height.Text controls are in a different test than other replaced elements because their metrics are platform-specific.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS getWidth('input-password-75') is getWidth('input-password-100')
-PASS getFullHeight('input-password-75') != '0px' is true
-FAIL getFullHeight('input-password-75') [17.25px] is not 75% of getFullHeight('input-password-100') [23px].
-PASS getWidth('input-text-75') is getWidth('input-text-100')
-PASS getFullHeight('input-text-75') != '0px' is true
-FAIL getFullHeight('input-text-75') [17.25px] is not 75% of getFullHeight('input-text-100') [23px].
-PASS getWidth('isindex-75') is getWidth('isindex-100')
-PASS getFullHeight('isindex-75') != '0px' is true
-PASS getFullHeight('isindex-75') is getFullHeight('isindex-100')
-PASS getWidth('textarea-75') is getWidth('textarea-100')
-PASS getFullHeight('textarea-75') != '0px' is true
-FAIL getFullHeight('textarea-75') [31.5px] is not 75% of getFullHeight('textarea-100') [42px].
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Deleted: trunk/LayoutTests/platform/win/fast/replaced/table-percent-height-text-controls-expected.txt (149843 => 149844)
--- trunk/LayoutTests/platform/win/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/LayoutTests/platform/win/fast/replaced/table-percent-height-text-controls-expected.txt 2013-05-09 21:45:46 UTC (rev 149844)
@@ -1,33 +0,0 @@
-
-
-
-
-This is a searchable index. Enter search keywords:
-This is a searchable index. Enter search keywords:
-
-
-This test checks that text controls with percentage heights within table cells have the correct height.Text controls are in a different test than other replaced elements because their metrics are platform-specific.
-
-On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
-
-
-PASS WIN input-password-75 width = 152px. Expects: MAC 128px, WIN 152px
-PASS MAC/WIN input-password-75 height = 8px. Expects: MAC 8px, WIN 8px
-PASS WIN input-password-100 width = 152px. Expects: MAC 128px, WIN 152px
-PASS MAC/WIN input-password-100 height = 13px. Expects: MAC 13px, WIN 13px
-PASS WIN input-text-75 width = 152px. Expects: MAC 128px, WIN 152px
-PASS MAC/WIN input-text-75 height = 8px. Expects: MAC 8px, WIN 8px
-PASS WIN input-text-100 width = 152px. Expects: MAC 128px, WIN 152px
-PASS MAC/WIN input-text-100 height = 13px. Expects: MAC 13px, WIN 13px
-PASS WIN isindex-75 width = 146px. Expects: MAC 122px, WIN 146px
-PASS MAC/WIN isindex-75 height = 35px. Expects: MAC 35px, WIN 35px
-PASS WIN isindex-100 width = 146px. Expects: MAC 122px, WIN 146px
-PASS MAC/WIN isindex-100 height = 49px. Expects: MAC 49px, WIN 49px
-PASS WIN textarea-75 width = 161px. Expects: MAC 129px, WIN 161px
-PASS MAC/WIN textarea-75 height = 19px. Expects: MAC 19px, WIN 19px
-PASS WIN textarea-100 width = 161px. Expects: MAC 129px, WIN 161px
-PASS MAC/WIN textarea-100 height = 28px. Expects: MAC 28px, WIN 28px
-PASS successfullyParsed is true
-
-TEST COMPLETE
-
Modified: trunk/Source/WebCore/ChangeLog (149843 => 149844)
--- trunk/Source/WebCore/ChangeLog 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/Source/WebCore/ChangeLog 2013-05-09 21:45:46 UTC (rev 149844)
@@ -1,3 +1,16 @@
+2013-05-09 Robert Hogan <[email protected]>
+
+ REGRESSION (Safari 3-Safari 4): Replaced element with percent height in table has incorrect height
+ https://bugs.webkit.org/show_bug.cgi?id=26394
+
+ Reviewed by David Hyatt.
+
+ Text controls or any object that has scrollable content should not flex inside a table cell.
+ This makes our behaviour the same as IE, FF and Opera (Presto).
+
+ * rendering/RenderTableSection.cpp:
+ (WebCore::RenderTableSection::layoutRows):
+
2013-05-09 Anders Carlsson <[email protected]>
Build fix.
Modified: trunk/Source/WebCore/rendering/RenderTableSection.cpp (149843 => 149844)
--- trunk/Source/WebCore/rendering/RenderTableSection.cpp 2013-05-09 21:35:01 UTC (rev 149843)
+++ trunk/Source/WebCore/rendering/RenderTableSection.cpp 2013-05-09 21:45:46 UTC (rev 149844)
@@ -563,7 +563,7 @@
|| (!table()->style()->logicalHeight().isAuto() && rHeight != cell->logicalHeight());
for (RenderObject* o = cell->firstChild(); o; o = o->nextSibling()) {
- if (!o->isText() && o->style()->logicalHeight().isPercent() && (flexAllChildren || o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow()))) {
+ if (!o->isText() && o->style()->logicalHeight().isPercent() && (flexAllChildren || ((o->isReplaced() || (o->isBox() && toRenderBox(o)->scrollsOverflow())) && !o->isTextControl()))) {
// Tables with no sections do not flex.
if (!o->isTable() || toRenderTable(o)->hasSections()) {
o->setNeedsLayout(true, MarkOnlyThis);