[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.15.1-1414-gc69ee75
bdakin at apple.com
bdakin at apple.com
Thu Oct 29 20:32:05 UTC 2009
The following commit has been merged in the webkit-1.1 branch:
commit 3f8a004a3c7f79c84733d60c75a4c0c38f209af4
Author: bdakin at apple.com <bdakin at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Tue Sep 22 20:19:32 2009 +0000
WebCore: Fix for <rdar://problem/6925121> SAP: Wrong width calculation in
table with fixed layout
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29501
Reviewed by Dave Hyatt.
New Tests:
* fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
* fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
* fast/table/fixed-table-with-percent-width-inside-div.html: Added.
* fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
* fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
* fast/table/fixed-table-with-small-percent-width.html: Added.
This new quirk is very similar to an existing one that was
implemented in revision 4316.
* rendering/FixedTableLayout.cpp:
(WebCore::FixedTableLayout::calcPrefWidths):
LayoutTests: Tests for <rdar://problem/6925121> SAP: Wrong width calculation in
table with fixed layout
-and corresponding-
https://bugs.webkit.org/show_bug.cgi?id=29501
Reviewed by Dave Hyatt.
* fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
* fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
* fast/table/fixed-table-with-percent-width-inside-div.html: Added.
* fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
* fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
* fast/table/fixed-table-with-small-percent-width.html: Added.
* platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.checksum: Added.
* platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.png: Added.
* platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.txt: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.checksum: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.png: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.txt: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.checksum: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.png: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.txt: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.checksum: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.png: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.txt: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.checksum: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.png: Added.
* platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.txt: Added.
* platform/mac/fast/table/fixed-table-with-small-percent-width-expected.checksum: Added.
* platform/mac/fast/table/fixed-table-with-small-percent-width-expected.png: Added.
* platform/mac/fast/table/fixed-table-with-small-percent-width-expected.txt: Added.
New and improved results for this test.
* platform/mac/tables/mozilla/bugs/bug34176-expected.checksum:
* platform/mac/tables/mozilla/bugs/bug34176-expected.png:
* platform/mac/tables/mozilla/bugs/bug34176-expected.txt:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@48647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index 2ccec57..706f5cf 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,42 @@
+2009-09-22 Beth Dakin <bdakin at apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Tests for <rdar://problem/6925121> SAP: Wrong width calculation in
+ table with fixed layout
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=29501
+
+ * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
+ * fast/table/fixed-table-with-small-percent-width.html: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.checksum: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.png: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.txt: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.checksum: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.png: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.txt: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.checksum: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.png: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.txt: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.checksum: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.png: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.txt: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.checksum: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.png: Added.
+ * platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.txt: Added.
+ * platform/mac/fast/table/fixed-table-with-small-percent-width-expected.checksum: Added.
+ * platform/mac/fast/table/fixed-table-with-small-percent-width-expected.png: Added.
+ * platform/mac/fast/table/fixed-table-with-small-percent-width-expected.txt: Added.
+
+ New and improved results for this test.
+ * platform/mac/tables/mozilla/bugs/bug34176-expected.checksum:
+ * platform/mac/tables/mozilla/bugs/bug34176-expected.png:
+ * platform/mac/tables/mozilla/bugs/bug34176-expected.txt:
+
2009-09-22 Brady Eidson <beidson at apple.com>
Reviewed by Darin Adler.
diff --git a/LayoutTests/fast/table/fixed-table-with-percent-inside-percent-table.html b/LayoutTests/fast/table/fixed-table-with-percent-inside-percent-table.html
new file mode 100644
index 0000000..4e387bf
--- /dev/null
+++ b/LayoutTests/fast/table/fixed-table-with-percent-inside-percent-table.html
@@ -0,0 +1,13 @@
+<html>
+ <table style="width:100%; background-color:red"><tr><td>
+
+ <tr><td>
+
+ <table style="width:100%; background-color:green; table-layout:fixed"><tr><td>
+ Content
+ </td></tr></table>
+
+ </td></tr>
+
+ </td></tr></table>
+</html>
\ No newline at end of file
diff --git a/LayoutTests/fast/table/fixed-table-with-percent-width-inside-auto-table.html b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-auto-table.html
new file mode 100644
index 0000000..22405a3
--- /dev/null
+++ b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-auto-table.html
@@ -0,0 +1,13 @@
+<html>
+ <table style="width:100%; background-color:red"><tr><td>
+
+ <table style="background-color:blue"><tr><td>
+
+ <table style="width:100%; background-color:green; table-layout:fixed"><tr><td>
+ Content
+ </td></tr></table>
+
+ </td></tr></table>
+
+ </td></tr></table>
+</html>
diff --git a/LayoutTests/fast/table/fixed-table-with-percent-width-inside-div.html b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-div.html
new file mode 100644
index 0000000..080a954
--- /dev/null
+++ b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-div.html
@@ -0,0 +1,13 @@
+<html>
+ <table style="width:100%; background-color:red"><tr><td>
+ <div style="width:150px; background-color:purple;">
+ <table style="background-color:blue"><tr><td>
+
+ <table style="width:100%; background-color:green; table-layout:fixed"><tr><td>
+ Content
+ </td></tr></table>
+
+ </td></tr></table>
+ </div>
+ </td></tr></table>
+</html>
diff --git a/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div.html b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div.html
new file mode 100644
index 0000000..57d5624
--- /dev/null
+++ b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-extra-large-div.html
@@ -0,0 +1,20 @@
+<html>
+ <div style="width: 2000px; position: absolute; left: -9000px;">
+ <table style="background-color:blue"><tr><td>
+
+ <table id="table" style="width:100%; background-color:green; table-layout:fixed;"><tr><td>
+ Content
+ </td></tr></table>
+
+ </td></tr></table>
+
+ </div>
+ <span id="result">This test failed. The width of the fixed table should be 1994px, which is based on the width of its containing div.</span>
+
+ <script>
+ var table = document.getElementById("table");
+ var result = document.getElementById("result");
+ if (window.getComputedStyle(table, null).getPropertyValue("width") == "1994px")
+ result.innerHTML = "Success! The width of the fixed table is 1994px, which is based on the width of its containing div.";
+ </script>
+</html>
diff --git a/LayoutTests/fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html
new file mode 100644
index 0000000..b94b14e
--- /dev/null
+++ b/LayoutTests/fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html
@@ -0,0 +1,14 @@
+<html>
+ <table style="width:100%; background-color:red"><tr><td>
+ <div> boo
+ <table style="width:100px; background-color:purple"><tr><td>
+ <table style="background-color:blue"><tr><td>
+
+ <table style="width:100%; background-color:green; table-layout:fixed"><tr><td>
+ Content
+ </td></tr></table>
+
+ </td></tr></table>
+ </div></td></tr></table>
+ </td></tr></table>
+</html>
diff --git a/LayoutTests/fast/table/fixed-table-with-small-percent-width.html b/LayoutTests/fast/table/fixed-table-with-small-percent-width.html
new file mode 100644
index 0000000..e1e08d5
--- /dev/null
+++ b/LayoutTests/fast/table/fixed-table-with-small-percent-width.html
@@ -0,0 +1,13 @@
+<html>
+ <table style="width:100%; background-color:red"><tr><td>
+
+ <table style="background-color:blue"><tr><td>
+
+ <table style="width:50%; background-color:green; table-layout:fixed"><tr><td>
+ Content
+ </td></tr></table>
+
+ </td></tr></table>
+
+ </td></tr></table>
+</html>
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.checksum b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.checksum
new file mode 100644
index 0000000..21e092c
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.checksum
@@ -0,0 +1 @@
+f64edfc584e6ed1a284a826b3ab312de
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.png b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.png
new file mode 100644
index 0000000..8e187f4
Binary files /dev/null and b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.txt b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.txt
new file mode 100644
index 0000000..1cb96d3
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-inside-percent-table-expected.txt
@@ -0,0 +1,17 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTable {TABLE} at (0,0) size 784x34 [bgcolor=#FF0000]
+ RenderTableSection {TBODY} at (0,0) size 784x34
+ RenderTableRow {TR} at (0,2) size 784x2
+ RenderTableCell {TD} at (2,2) size 780x2 [r=0 c=0 rs=1 cs=1]
+ RenderTableRow {TR} at (0,6) size 784x26
+ RenderTableCell {TD} at (2,6) size 780x26 [r=1 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 778x24 [bgcolor=#008000]
+ RenderTableSection {TBODY} at (0,0) size 778x24
+ RenderTableRow {TR} at (0,2) size 778x20
+ RenderTableCell {TD} at (2,2) size 774x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (1,1) size 50x18
+ text run at (1,1) width 50: "Content"
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.checksum b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.checksum
new file mode 100644
index 0000000..c54925d
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.checksum
@@ -0,0 +1 @@
+fed0bd141cb3a3dc66d988695b3d081b
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.png b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.png
new file mode 100644
index 0000000..f51927f
Binary files /dev/null and b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.txt b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.txt
new file mode 100644
index 0000000..3820384
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-auto-table-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTable {TABLE} at (0,0) size 784x36 [bgcolor=#FF0000]
+ RenderTableSection {TBODY} at (0,0) size 784x36
+ RenderTableRow {TR} at (0,2) size 784x32
+ RenderTableCell {TD} at (2,2) size 780x32 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 778x30 [bgcolor=#0000FF]
+ RenderTableSection {TBODY} at (0,0) size 778x30
+ RenderTableRow {TR} at (0,2) size 778x26
+ RenderTableCell {TD} at (2,2) size 774x26 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 772x24 [bgcolor=#008000]
+ RenderTableSection {TBODY} at (0,0) size 772x24
+ RenderTableRow {TR} at (0,2) size 772x20
+ RenderTableCell {TD} at (2,2) size 768x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (1,1) size 50x18
+ text run at (1,1) width 50: "Content"
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.checksum b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.checksum
new file mode 100644
index 0000000..fb1062b
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.checksum
@@ -0,0 +1 @@
+4a93aed77aac69a7a8ce7c28122d17ff
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.png b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.png
new file mode 100644
index 0000000..154a535
Binary files /dev/null and b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.txt b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.txt
new file mode 100644
index 0000000..0e7c086
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-div-expected.txt
@@ -0,0 +1,20 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTable {TABLE} at (0,0) size 784x36 [bgcolor=#FF0000]
+ RenderTableSection {TBODY} at (0,0) size 784x36
+ RenderTableRow {TR} at (0,2) size 784x32
+ RenderTableCell {TD} at (2,2) size 780x32 [r=0 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (1,1) size 150x30 [bgcolor=#800080]
+ RenderTable {TABLE} at (0,0) size 150x30 [bgcolor=#0000FF]
+ RenderTableSection {TBODY} at (0,0) size 150x30
+ RenderTableRow {TR} at (0,2) size 150x26
+ RenderTableCell {TD} at (2,2) size 146x26 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 144x24 [bgcolor=#008000]
+ RenderTableSection {TBODY} at (0,0) size 144x24
+ RenderTableRow {TR} at (0,2) size 144x20
+ RenderTableCell {TD} at (2,2) size 140x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (1,1) size 50x18
+ text run at (1,1) width 50: "Content"
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.checksum b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.checksum
new file mode 100644
index 0000000..336f164
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.checksum
@@ -0,0 +1 @@
+79a614837a64ac63e07dfdeb3a8aade9
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.png b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.png
new file mode 100644
index 0000000..1a07d7d
Binary files /dev/null and b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.txt b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.txt
new file mode 100644
index 0000000..eb1d4e3
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-extra-large-div-expected.txt
@@ -0,0 +1,11 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderInline {SPAN} at (0,0) size 617x18
+ RenderText {#text} at (0,0) size 617x18
+ text run at (0,0) width 617: "Success! The width of the fixed table is 1994px, which is based on the width of its containing div."
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
+ RenderText {#text} at (0,0) size 0x0
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.checksum b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.checksum
new file mode 100644
index 0000000..5535abd
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.checksum
@@ -0,0 +1 @@
+b0e61872d935add47aa12cfd920ba940
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.png b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.png
new file mode 100644
index 0000000..bbbfcee
Binary files /dev/null and b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.txt b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.txt
new file mode 100644
index 0000000..4f5bfe0
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-percent-width-inside-fixed-width-table-expected.txt
@@ -0,0 +1,27 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTable {TABLE} at (0,0) size 784x60 [bgcolor=#FF0000]
+ RenderTableSection {TBODY} at (0,0) size 784x60
+ RenderTableRow {TR} at (0,2) size 784x56
+ RenderTableCell {TD} at (2,2) size 780x56 [r=0 c=0 rs=1 cs=1]
+ RenderBlock {DIV} at (1,1) size 778x54
+ RenderBlock (anonymous) at (0,0) size 778x18
+ RenderText {#text} at (0,0) size 24x18
+ text run at (0,0) width 24: "boo"
+ RenderTable {TABLE} at (0,18) size 100x36 [bgcolor=#800080]
+ RenderTableSection {TBODY} at (0,0) size 100x36
+ RenderTableRow {TR} at (0,2) size 100x32
+ RenderTableCell {TD} at (2,2) size 96x32 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 94x30 [bgcolor=#0000FF]
+ RenderTableSection {TBODY} at (0,0) size 94x30
+ RenderTableRow {TR} at (0,2) size 94x26
+ RenderTableCell {TD} at (2,2) size 90x26 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 88x24 [bgcolor=#008000]
+ RenderTableSection {TBODY} at (0,0) size 88x24
+ RenderTableRow {TR} at (0,2) size 88x20
+ RenderTableCell {TD} at (2,2) size 84x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (1,1) size 50x18
+ text run at (1,1) width 50: "Content"
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.checksum b/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.checksum
new file mode 100644
index 0000000..14f73fc
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.checksum
@@ -0,0 +1 @@
+efed2d6cbb205c74231cca8ad3e2dbc7
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.png b/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.png
new file mode 100644
index 0000000..b19da2d
Binary files /dev/null and b/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.png differ
diff --git a/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.txt b/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.txt
new file mode 100644
index 0000000..31627e3
--- /dev/null
+++ b/LayoutTests/platform/mac/fast/table/fixed-table-with-small-percent-width-expected.txt
@@ -0,0 +1,19 @@
+layer at (0,0) size 800x600
+ RenderView at (0,0) size 800x600
+layer at (0,0) size 800x600
+ RenderBlock {HTML} at (0,0) size 800x600
+ RenderBody {BODY} at (8,8) size 784x584
+ RenderTable {TABLE} at (0,0) size 784x36 [bgcolor=#FF0000]
+ RenderTableSection {TBODY} at (0,0) size 784x36
+ RenderTableRow {TR} at (0,2) size 784x32
+ RenderTableCell {TD} at (2,2) size 780x32 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 778x30 [bgcolor=#0000FF]
+ RenderTableSection {TBODY} at (0,0) size 778x30
+ RenderTableRow {TR} at (0,2) size 778x26
+ RenderTableCell {TD} at (2,2) size 774x26 [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (1,1) size 386x24 [bgcolor=#008000]
+ RenderTableSection {TBODY} at (0,0) size 386x24
+ RenderTableRow {TR} at (0,2) size 386x20
+ RenderTableCell {TD} at (2,2) size 382x20 [r=0 c=0 rs=1 cs=1]
+ RenderText {#text} at (1,1) size 50x18
+ text run at (1,1) width 50: "Content"
diff --git a/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.checksum b/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.checksum
index bad0fee..49cc4dd 100644
--- a/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.checksum
+++ b/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.checksum
@@ -1 +1 @@
-f2c4f2ef36efea2e3bf3ed2d93d14e0a
\ No newline at end of file
+b38fa6d9a6b86b55d0b54df3f6a08e87
\ No newline at end of file
diff --git a/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.png b/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.png
index 63ce1bc..5bc2360 100644
Binary files a/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.png and b/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.png differ
diff --git a/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.txt b/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.txt
index 4ef12c1..958e017 100644
--- a/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.txt
+++ b/LayoutTests/platform/mac/tables/mozilla/bugs/bug34176-expected.txt
@@ -3,16 +3,16 @@ layer at (0,0) size 800x600
layer at (0,0) size 800x600
RenderBlock {HTML} at (0,0) size 800x600
RenderBody {BODY} at (8,8) size 784x584
- RenderTable {TABLE} at (0,0) size 718x38 [border: (1px outset #808080)]
- RenderTableSection {TBODY} at (1,1) size 716x36
- RenderTableRow {TR} at (0,2) size 716x32
- RenderTableCell {TD} at (2,2) size 712x32 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
- RenderTable {TABLE} at (2,2) size 708x28 [border: (1px outset #808080)]
- RenderTableSection {TBODY} at (1,1) size 706x26
- RenderTableRow {TR} at (0,2) size 706x22
- RenderTableCell {TD} at (2,2) size 200x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (0,0) size 784x38 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 782x36
+ RenderTableRow {TR} at (0,2) size 782x32
+ RenderTableCell {TD} at (2,2) size 778x32 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
+ RenderTable {TABLE} at (2,2) size 774x28 [border: (1px outset #808080)]
+ RenderTableSection {TBODY} at (1,1) size 772x26
+ RenderTableRow {TR} at (0,2) size 772x22
+ RenderTableCell {TD} at (2,2) size 219x22 [border: (1px inset #808080)] [r=0 c=0 rs=1 cs=1]
RenderText {#text} at (2,2) size 34x18
text run at (2,2) width 34: "cell 1"
- RenderTableCell {TD} at (204,2) size 500x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
+ RenderTableCell {TD} at (223,2) size 547x22 [border: (1px inset #808080)] [r=0 c=1 rs=1 cs=1]
RenderText {#text} at (2,2) size 34x18
text run at (2,2) width 34: "cell 2"
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 5c2f214..530f719 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,25 @@
+2009-09-22 Beth Dakin <bdakin at apple.com>
+
+ Reviewed by Dave Hyatt.
+
+ Fix for <rdar://problem/6925121> SAP: Wrong width calculation in
+ table with fixed layout
+ -and corresponding-
+ https://bugs.webkit.org/show_bug.cgi?id=29501
+
+ New Tests:
+ * fast/table/fixed-table-with-percent-inside-percent-table.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-auto-table.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-div.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-extra-large-div.html: Added.
+ * fast/table/fixed-table-with-percent-width-inside-fixed-width-table.html: Added.
+ * fast/table/fixed-table-with-small-percent-width.html: Added.
+
+ This new quirk is very similar to an existing one that was
+ implemented in revision 4316.
+ * rendering/FixedTableLayout.cpp:
+ (WebCore::FixedTableLayout::calcPrefWidths):
+
2009-09-22 Brian Weinstein <bweinstein at apple.com>
Reviewed by Timothy Hatcher.
diff --git a/WebCore/rendering/FixedTableLayout.cpp b/WebCore/rendering/FixedTableLayout.cpp
index ee3e75a..4852708 100644
--- a/WebCore/rendering/FixedTableLayout.cpp
+++ b/WebCore/rendering/FixedTableLayout.cpp
@@ -188,6 +188,11 @@ int FixedTableLayout::calcWidthArray(int)
return usedWidth;
}
+// Use a very large value (in effect infinite). But not too large!
+// numeric_limits<int>::max() will too easily overflow widths.
+// Keep this in synch with BLOCK_MAX_WIDTH in RenderBlock.cpp
+#define TABLE_MAX_WIDTH 15000
+
void FixedTableLayout::calcPrefWidths(int& minWidth, int& maxWidth)
{
// FIXME: This entire calculation is incorrect for both minwidth and maxwidth.
@@ -206,6 +211,24 @@ void FixedTableLayout::calcPrefWidths(int& minWidth, int& maxWidth)
minWidth = max(mw, tableWidth);
maxWidth = minWidth;
+
+ // This quirk is very similar to one that exists in RenderBlock::calcBlockPrefWidths().
+ // Here's the example for this one:
+ /*
+ <table style="width:100%; background-color:red"><tr><td>
+ <table style="background-color:blue"><tr><td>
+ <table style="width:100%; background-color:green; table-layout:fixed"><tr><td>
+ Content
+ </td></tr></table>
+ </td></tr></table>
+ </td></tr></table>
+ */
+ // In this example, the two inner tables should be as large as the outer table.
+ // We can achieve this effect by making the maxwidth of fixed tables with percentage
+ // widths be infinite.
+ if (m_table->style()->htmlHacks() && m_table->style()->width().isPercent()
+ && maxWidth < TABLE_MAX_WIDTH)
+ maxWidth = TABLE_MAX_WIDTH;
}
void FixedTableLayout::layout()
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list