Title: [117640] trunk
Revision
117640
Author
[email protected]
Date
2012-05-18 15:09:51 -0700 (Fri, 18 May 2012)

Log Message

Standalone table-columns should be wrapped in anonymous tables
https://bugs.webkit.org/show_bug.cgi?id=86671

Reviewed by Julien Chaffraix.

Source/WebCore: 

The CSS2 spec specifies that table-columns misparented outside of a table or
table-column-group should be wrapped in an anonymous table. Updating 
RenderObject::addChild to follow the spec.
see http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes for details.

Tests: fast/table/table-column-generates-anonymous-table.html
       fast/table/table-column-group-generates-anonymous-table.html

* rendering/RenderObject.cpp:
(WebCore::RenderObject::addChild):

LayoutTests: 

Adding 2 test cases and updating test results for two with changed expectations.

* fast/table/table-column-generates-anonymous-table-expected.html: Added.
* fast/table/table-column-generates-anonymous-table.html: Added.
* fast/table/table-column-group-generates-anonymous-table-expected.html: Added.
* fast/table/table-column-group-generates-anonymous-table.html: Added.
* platform/chromium-linux/fast/forms/form-hides-table-expected.txt: Added. An anonymous
table is now generated to enclose the misparented table column.
* platform/chromium-linux/fast/table/form-with-table-style-expected.txt: Added.
* platform/chromium-linux/fast/table/form-with-table-style-expected.png: Modified. The
expectations previously were wrong in that the table column occupied height the
equivalent of its line-height. This is correctly no longer the case.
* platform/chromium/test_expectations.txt: Modified. Skipping modified tests on other
platforms until I can rebaseline.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (117639 => 117640)


--- trunk/LayoutTests/ChangeLog	2012-05-18 21:57:09 UTC (rev 117639)
+++ trunk/LayoutTests/ChangeLog	2012-05-18 22:09:51 UTC (rev 117640)
@@ -1,3 +1,25 @@
+        2012-05-17  Levi Weintraub  <[email protected]>
+
+        Standalone table-columns should be wrapped in anonymous tables
+        https://bugs.webkit.org/show_bug.cgi?id=86671
+
+        Reviewed by Julien Chaffraix.
+
+        Adding 2 test cases and updating test results for two with changed expectations.
+
+        * fast/table/table-column-generates-anonymous-table-expected.html: Added.
+        * fast/table/table-column-generates-anonymous-table.html: Added.
+        * fast/table/table-column-group-generates-anonymous-table-expected.html: Added.
+        * fast/table/table-column-group-generates-anonymous-table.html: Added.
+        * platform/chromium-linux/fast/forms/form-hides-table-expected.txt: Added. An anonymous
+        table is now generated to enclose the misparented table column.
+        * platform/chromium-linux/fast/table/form-with-table-style-expected.txt: Added.
+        * platform/chromium-linux/fast/table/form-with-table-style-expected.png: Modified. The
+        expectations previously were wrong in that the table column occupied height the
+        equivalent of its line-height. This is correctly no longer the case.
+        * platform/chromium/test_expectations.txt: Modified. Skipping modified tests on other
+        platforms until I can rebaseline.
+
 2012-05-18  Tony Chang  <[email protected]>
 
         Unreviewed, skip grid layout tests that are failing after r117613.

Added: trunk/LayoutTests/fast/table/table-column-generates-anonymous-table-expected.html (0 => 117640)


--- trunk/LayoutTests/fast/table/table-column-generates-anonymous-table-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/table-column-generates-anonymous-table-expected.html	2012-05-18 22:09:51 UTC (rev 117640)
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<html>
+<body>
+This tests that a misparented table-column is properly wrapped in an anonymous table.
+See <a href="" 86671</a> for details.
+<div style="display:table">
+<div style="display:table-column; background-color: green;"></div>
+<div style="display:table-row;"><div style="display:table-cell;">This box should be green</div></div>
+</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/table/table-column-generates-anonymous-table.html (0 => 117640)


--- trunk/LayoutTests/fast/table/table-column-generates-anonymous-table.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/table-column-generates-anonymous-table.html	2012-05-18 22:09:51 UTC (rev 117640)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+<body>
+This tests that a misparented table-column is properly wrapped in an anonymous table.
+See <a href="" 86671</a> for details.
+<div style="display:table-column; background-color: green;"></div>
+<div style="display:table-row;"><div style="display:table-cell;">This box should be green</div></div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/table/table-column-group-generates-anonymous-table-expected.html (0 => 117640)


--- trunk/LayoutTests/fast/table/table-column-group-generates-anonymous-table-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/table-column-group-generates-anonymous-table-expected.html	2012-05-18 22:09:51 UTC (rev 117640)
@@ -0,0 +1,14 @@
+<!DOCTYPE html>
+<html>
+<body>
+This tests that a misparented table-column-group is properly wrapped in an anonymous table.
+See <a href="" 86671</a> for details.
+<div style="display:table">
+<div style="display:table-column-group;">
+	<div style="display: table-column; background-color: green;"></div>
+	<div style="display: table-column; background-color: yellow;"></div>
+</div>
+<div style="display:table-row;"><div style="display:table-cell;">This box should be green</div><div style="display:table-cell;">This box should be yellow</div></div>
+</div>
+</body>
+</html>

Added: trunk/LayoutTests/fast/table/table-column-group-generates-anonymous-table.html (0 => 117640)


--- trunk/LayoutTests/fast/table/table-column-group-generates-anonymous-table.html	                        (rev 0)
+++ trunk/LayoutTests/fast/table/table-column-group-generates-anonymous-table.html	2012-05-18 22:09:51 UTC (rev 117640)
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<html>
+<body>
+This tests that a misparented table-column-group is properly wrapped in an anonymous table.
+See <a href="" 86671</a> for details.
+<div style="display:table-column-group;">
+	<div style="display: table-column; background-color: green;"></div>
+	<div style="display: table-column; background-color: yellow;"></div>
+</div>
+<div style="display:table-row;"><div style="display:table-cell;">This box should be green</div><div style="display:table-cell;">This box should be yellow</div></div>
+</body>
+</html>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (117639 => 117640)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-05-18 21:57:09 UTC (rev 117639)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-05-18 22:09:51 UTC (rev 117640)
@@ -3745,6 +3745,10 @@
 BUGWK86592 LINUX : fast/loader/unload-form-about-blank.html = TIMEOUT PASS
 BUGWK86592 LINUX : http/tests/xmlhttprequest/zero-length-response-sync.html = TIMEOUT PASS
 
+// Need rebaselining after patch from WK86671
+BUGLEVIW MAC WIN : fast/forms/form-hides-table.html = FAIL PASS
+BUGLEVIW MAC WIN : fast/table/form-with-table-style.html = FAIL
+
 // strange "Unexpected no expected results found" on cr-linux ews
 BUGWK86600 LINUX : http/tests/cache/loaded-from-cache-after-reload-within-iframe.html = MISSING PASS
 BUGWK86600 LINUX : http/tests/cache/loaded-from-cache-after-reload.html = MISSING PASS

Added: trunk/LayoutTests/platform/chromium-linux/fast/forms/form-hides-table-expected.txt (0 => 117640)


--- trunk/LayoutTests/platform/chromium-linux/fast/forms/form-hides-table-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/forms/form-hides-table-expected.txt	2012-05-18 22:09:51 UTC (rev 117640)
@@ -0,0 +1,178 @@
+layer at (0,0) size 785x720
+  RenderView at (0,0) size 785x600
+layer at (0,0) size 785x720
+  RenderBlock {HTML} at (0,0) size 785x720
+    RenderBody {BODY} at (8,8) size 769x704
+      RenderBlock {P} at (0,0) size 769x20
+        RenderText {#text} at (0,0) size 515x19
+          text run at (0,0) width 515: "This page has a few tables within form elements within divs with various display styles."
+      RenderBlock {P} at (0,36) size 769x20
+        RenderText {#text} at (0,0) size 27x19
+          text run at (0,0) width 27: "See "
+        RenderInline {A} at (0,0) size 110x19 [color=#0000EE]
+          RenderText {#text} at (27,0) size 110x19
+            text run at (27,0) width 110: "Bugzilla Bug 4977"
+        RenderText {#text} at (137,0) size 4x19
+          text run at (137,0) width 4: "."
+      RenderBlock {DIV} at (0,72) size 769x26
+        RenderBlock (anonymous) at (0,0) size 769x0
+          RenderInline {DIV} at (0,0) size 0x0
+        RenderBlock (anonymous) at (0,0) size 769x26
+          RenderBlock {FORM} at (0,0) size 769x26
+            RenderTable {TABLE} at (0,0) size 85x26
+              RenderTableSection {TBODY} at (0,0) size 85x26
+                RenderTableRow {TR} at (0,2) size 85x22
+                  RenderTableCell {TD} at (2,2) size 81x22 [r=0 c=0 rs=1 cs=1]
+                    RenderText {#text} at (1,1) size 79x19
+                      text run at (1,1) width 79: "display: inline"
+        RenderBlock (anonymous) at (0,42) size 769x0
+          RenderInline {DIV} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,114) size 769x26
+        RenderBlock {DIV} at (0,0) size 769x26
+          RenderBlock {FORM} at (0,0) size 769x26
+            RenderTable {TABLE} at (0,0) size 89x26
+              RenderTableSection {TBODY} at (0,0) size 89x26
+                RenderTableRow {TR} at (0,2) size 89x22
+                  RenderTableCell {TD} at (2,2) size 85x22 [r=0 c=0 rs=1 cs=1]
+                    RenderText {#text} at (1,1) size 83x19
+                      text run at (1,1) width 83: "display: block"
+      RenderBlock {DIV} at (0,156) size 769x46
+        RenderListItem {DIV} at (0,0) size 769x46
+          RenderBlock (anonymous) at (0,0) size 769x20
+            RenderListMarker at (-18,0) size 7x19: bullet
+          RenderBlock {FORM} at (0,20) size 769x26
+            RenderTable {TABLE} at (0,0) size 102x26
+              RenderTableSection {TBODY} at (0,0) size 102x26
+                RenderTableRow {TR} at (0,2) size 102x22
+                  RenderTableCell {TD} at (2,2) size 98x22 [r=0 c=0 rs=1 cs=1]
+                    RenderText {#text} at (1,1) size 96x19
+                      text run at (1,1) width 96: "display: list-item"
+      RenderBlock {DIV} at (0,218) size 769x26
+        RenderBlock (run-in) {DIV} at (0,0) size 769x26
+          RenderBlock {FORM} at (0,0) size 769x26
+            RenderTable {TABLE} at (0,0) size 90x26
+              RenderTableSection {TBODY} at (0,0) size 90x26
+                RenderTableRow {TR} at (0,2) size 90x22
+                  RenderTableCell {TD} at (2,2) size 86x22 [r=0 c=0 rs=1 cs=1]
+                    RenderText {#text} at (1,1) size 84x19
+                      text run at (1,1) width 84: "display: run-in"
+      RenderBlock {DIV} at (0,260) size 769x26
+        RenderBlock {DIV} at (0,0) size 769x26
+          RenderBlock {FORM} at (0,0) size 769x26
+            RenderTable {TABLE} at (0,0) size 107x26
+              RenderTableSection {TBODY} at (0,0) size 107x26
+                RenderTableRow {TR} at (0,2) size 107x22
+                  RenderTableCell {TD} at (2,2) size 103x22 [r=0 c=0 rs=1 cs=1]
+                    RenderText {#text} at (1,1) size 101x19
+                      text run at (1,1) width 101: "display: compact"
+      RenderBlock {DIV} at (0,302) size 769x42
+        RenderBlock {DIV} at (0,0) size 125x42
+          RenderBlock {FORM} at (0,0) size 125x26
+            RenderTable {TABLE} at (0,0) size 125x26
+              RenderTableSection {TBODY} at (0,0) size 125x26
+                RenderTableRow {TR} at (0,2) size 125x22
+                  RenderTableCell {TD} at (2,2) size 121x22 [r=0 c=0 rs=1 cs=1]
+                    RenderText {#text} at (1,1) size 119x19
+                      text run at (1,1) width 119: "display: inline-block"
+      RenderBlock {DIV} at (0,344) size 769x42
+        RenderTable {DIV} at (0,0) size 84x42
+          RenderTableSection (anonymous) at (0,0) size 84x42
+            RenderTableRow (anonymous) at (0,0) size 84x42
+              RenderTableCell (anonymous) at (0,0) size 84x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 84x26
+                  RenderTable {TABLE} at (0,0) size 84x26
+                    RenderTableSection {TBODY} at (0,0) size 84x26
+                      RenderTableRow {TR} at (0,2) size 84x22
+                        RenderTableCell {TD} at (2,2) size 80x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 78x19
+                            text run at (1,1) width 78: "display: table"
+      RenderBlock {DIV} at (0,386) size 769x42
+        RenderTable {DIV} at (0,0) size 120x42
+          RenderTableSection (anonymous) at (0,0) size 120x42
+            RenderTableRow (anonymous) at (0,0) size 120x42
+              RenderTableCell (anonymous) at (0,0) size 120x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 120x26
+                  RenderTable {TABLE} at (0,0) size 120x26
+                    RenderTableSection {TBODY} at (0,0) size 120x26
+                      RenderTableRow {TR} at (0,2) size 120x22
+                        RenderTableCell {TD} at (2,2) size 116x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 114x19
+                            text run at (1,1) width 114: "display: inline-table"
+      RenderBlock {DIV} at (0,428) size 769x42
+        RenderTable at (0,0) size 155x42
+          RenderTableSection {DIV} at (0,0) size 155x42
+            RenderTableRow (anonymous) at (0,0) size 155x42
+              RenderTableCell (anonymous) at (0,0) size 155x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 155x26
+                  RenderTable {TABLE} at (0,0) size 155x26
+                    RenderTableSection {TBODY} at (0,0) size 155x26
+                      RenderTableRow {TR} at (0,2) size 155x22
+                        RenderTableCell {TD} at (2,2) size 151x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 149x19
+                            text run at (1,1) width 149: "display: table-row-group"
+      RenderBlock {DIV} at (0,470) size 769x42
+        RenderTable at (0,0) size 172x42
+          RenderTableSection {DIV} at (0,0) size 172x42
+            RenderTableRow (anonymous) at (0,0) size 172x42
+              RenderTableCell (anonymous) at (0,0) size 172x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 172x26
+                  RenderTable {TABLE} at (0,0) size 172x26
+                    RenderTableSection {TBODY} at (0,0) size 172x26
+                      RenderTableRow {TR} at (0,2) size 172x22
+                        RenderTableCell {TD} at (2,2) size 168x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 166x19
+                            text run at (1,1) width 166: "display: table-header-group"
+      RenderBlock {DIV} at (0,512) size 769x42
+        RenderTable at (0,0) size 167x42
+          RenderTableSection {DIV} at (0,0) size 167x42
+            RenderTableRow (anonymous) at (0,0) size 167x42
+              RenderTableCell (anonymous) at (0,0) size 167x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 167x26
+                  RenderTable {TABLE} at (0,0) size 167x26
+                    RenderTableSection {TBODY} at (0,0) size 167x26
+                      RenderTableRow {TR} at (0,2) size 167x22
+                        RenderTableCell {TD} at (2,2) size 163x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 161x19
+                            text run at (1,1) width 161: "display: table-footer-group"
+      RenderBlock {DIV} at (0,554) size 769x42
+        RenderTable at (0,0) size 114x42
+          RenderTableSection (anonymous) at (0,0) size 114x42
+            RenderTableRow {DIV} at (0,0) size 114x42
+              RenderTableCell (anonymous) at (0,0) size 114x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 114x26
+                  RenderTable {TABLE} at (0,0) size 114x26
+                    RenderTableSection {TBODY} at (0,0) size 114x26
+                      RenderTableRow {TR} at (0,2) size 114x22
+                        RenderTableCell {TD} at (2,2) size 110x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 108x19
+                            text run at (1,1) width 108: "display: table-row"
+      RenderBlock {DIV} at (0,596) size 769x0
+        RenderTable at (0,0) size 0x0
+          RenderTableCol {DIV} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,596) size 769x0
+        RenderTable at (0,0) size 0x0
+          RenderTableCol {DIV} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,596) size 769x42
+        RenderTable at (0,0) size 110x42
+          RenderTableSection (anonymous) at (0,0) size 110x42
+            RenderTableRow (anonymous) at (0,0) size 110x42
+              RenderTableCell {DIV} at (0,0) size 110x42 [r=0 c=0 rs=1 cs=1]
+                RenderBlock {FORM} at (0,0) size 110x26
+                  RenderTable {TABLE} at (0,0) size 110x26
+                    RenderTableSection {TBODY} at (0,0) size 110x26
+                      RenderTableRow {TR} at (0,2) size 110x22
+                        RenderTableCell {TD} at (2,2) size 106x22 [r=0 c=0 rs=1 cs=1]
+                          RenderText {#text} at (1,1) size 104x19
+                            text run at (1,1) width 104: "display: table-cell"
+      RenderBlock {DIV} at (0,638) size 769x66
+        RenderTable at (0,0) size 51x66
+          RenderBlock {DIV} at (0,0) size 51x66
+            RenderBlock {FORM} at (0,0) size 51x66
+              RenderTable {TABLE} at (0,0) size 51x66
+                RenderTableSection {TBODY} at (0,0) size 51x66
+                  RenderTableRow {TR} at (0,2) size 51x62
+                    RenderTableCell {TD} at (2,2) size 47x62 [r=0 c=0 rs=1 cs=1]
+                      RenderText {#text} at (1,1) size 45x59
+                        text run at (1,1) width 45: "display:"
+                        text run at (1,21) width 35: "table-"
+                        text run at (1,41) width 44: "caption"

Modified: trunk/LayoutTests/platform/chromium-linux/fast/table/form-with-table-style-expected.png


(Binary files differ)

Added: trunk/LayoutTests/platform/chromium-linux/fast/table/form-with-table-style-expected.txt (0 => 117640)


--- trunk/LayoutTests/platform/chromium-linux/fast/table/form-with-table-style-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/platform/chromium-linux/fast/table/form-with-table-style-expected.txt	2012-05-18 22:09:51 UTC (rev 117640)
@@ -0,0 +1,103 @@
+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
+      RenderBlock {P} at (0,0) size 784x20
+        RenderText {#text} at (0,0) size 354x19
+          text run at (0,0) width 354: "This page has a few form elements on it with various styles."
+      RenderBlock {P} at (0,36) size 784x20
+        RenderText {#text} at (0,0) size 544x19
+          text run at (0,0) width 544: "In older versions of WebKit, the table styles would cause infinite recursion and hangs. See "
+        RenderInline {A} at (0,0) size 106x19 [color=#0000EE]
+          RenderText {#text} at (544,0) size 106x19
+            text run at (544,0) width 106: "bugzilla bug 5731"
+        RenderText {#text} at (650,0) size 4x19
+          text run at (650,0) width 4: "."
+      RenderBlock {DIV} at (0,72) size 784x20
+        RenderInline {FORM} at (0,0) size 79x19
+          RenderText {#text} at (0,0) size 79x19
+            text run at (0,0) width 79: "display: inline"
+      RenderBlock {DIV} at (0,92) size 784x20
+        RenderBlock {FORM} at (0,0) size 784x20
+          RenderText {#text} at (0,0) size 83x19
+            text run at (0,0) width 83: "display: block"
+      RenderBlock {DIV} at (0,128) size 784x20
+        RenderListItem {FORM} at (0,0) size 784x20
+          RenderListMarker at (-18,0) size 7x19: bullet
+          RenderText {#text} at (0,0) size 96x19
+            text run at (0,0) width 96: "display: list-item"
+      RenderBlock {DIV} at (0,164) size 784x20
+        RenderBlock (run-in) {FORM} at (0,0) size 784x20
+          RenderText {#text} at (0,0) size 84x19
+            text run at (0,0) width 84: "display: run-in"
+      RenderBlock {DIV} at (0,200) size 784x20
+        RenderBlock {FORM} at (0,0) size 784x20
+          RenderText {#text} at (0,0) size 101x19
+            text run at (0,0) width 101: "display: compact"
+      RenderBlock {DIV} at (0,236) size 784x36
+        RenderBlock {FORM} at (0,0) size 119x20
+          RenderText {#text} at (0,0) size 119x19
+            text run at (0,0) width 119: "display: inline-block"
+      RenderBlock {DIV} at (0,272) size 784x20
+        RenderTable {FORM} at (0,0) size 78x20
+          RenderTableSection (anonymous) at (0,0) size 78x20
+            RenderTableRow (anonymous) at (0,0) size 78x20
+              RenderTableCell (anonymous) at (0,0) size 78x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 78x19
+                  text run at (0,0) width 78: "display: table"
+      RenderBlock {DIV} at (0,308) size 784x36
+        RenderTable {FORM} at (0,0) size 114x20
+          RenderTableSection (anonymous) at (0,0) size 114x20
+            RenderTableRow (anonymous) at (0,0) size 114x20
+              RenderTableCell (anonymous) at (0,0) size 114x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 114x19
+                  text run at (0,0) width 114: "display: inline-table"
+      RenderBlock {DIV} at (0,344) size 784x20
+        RenderTable at (0,0) size 149x20
+          RenderTableSection {FORM} at (0,0) size 149x20
+            RenderTableRow (anonymous) at (0,0) size 149x20
+              RenderTableCell (anonymous) at (0,0) size 149x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 149x19
+                  text run at (0,0) width 149: "display: table-row-group"
+      RenderBlock {DIV} at (0,364) size 784x20
+        RenderTable at (0,0) size 166x20
+          RenderTableSection {FORM} at (0,0) size 166x20
+            RenderTableRow (anonymous) at (0,0) size 166x20
+              RenderTableCell (anonymous) at (0,0) size 166x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 166x19
+                  text run at (0,0) width 166: "display: table-header-group"
+      RenderBlock {DIV} at (0,384) size 784x20
+        RenderTable at (0,0) size 161x20
+          RenderTableSection {FORM} at (0,0) size 161x20
+            RenderTableRow (anonymous) at (0,0) size 161x20
+              RenderTableCell (anonymous) at (0,0) size 161x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 161x19
+                  text run at (0,0) width 161: "display: table-footer-group"
+      RenderBlock {DIV} at (0,404) size 784x20
+        RenderTable at (0,0) size 108x20
+          RenderTableSection (anonymous) at (0,0) size 108x20
+            RenderTableRow {FORM} at (0,0) size 108x20
+              RenderTableCell (anonymous) at (0,0) size 108x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 108x19
+                  text run at (0,0) width 108: "display: table-row"
+      RenderBlock {DIV} at (0,424) size 784x0
+        RenderTable at (0,0) size 0x0
+          RenderTableCol {FORM} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,424) size 784x0
+        RenderTable at (0,0) size 0x0
+          RenderTableCol {FORM} at (0,0) size 0x0
+      RenderBlock {DIV} at (0,424) size 784x20
+        RenderTable at (0,0) size 104x20
+          RenderTableSection (anonymous) at (0,0) size 104x20
+            RenderTableRow (anonymous) at (0,0) size 104x20
+              RenderTableCell {FORM} at (0,0) size 104x20 [r=0 c=0 rs=1 cs=1]
+                RenderText {#text} at (0,0) size 104x19
+                  text run at (0,0) width 104: "display: table-cell"
+      RenderBlock {DIV} at (0,444) size 784x76
+        RenderTable at (0,0) size 45x76
+          RenderBlock {FORM} at (0,0) size 45x60
+            RenderText {#text} at (0,0) size 45x59
+              text run at (0,0) width 45: "display:"
+              text run at (0,20) width 35: "table-"
+              text run at (0,40) width 44: "caption"

Modified: trunk/Source/WebCore/ChangeLog (117639 => 117640)


--- trunk/Source/WebCore/ChangeLog	2012-05-18 21:57:09 UTC (rev 117639)
+++ trunk/Source/WebCore/ChangeLog	2012-05-18 22:09:51 UTC (rev 117640)
@@ -1,3 +1,21 @@
+2012-05-18  Levi Weintraub  <[email protected]>
+
+        Standalone table-columns should be wrapped in anonymous tables
+        https://bugs.webkit.org/show_bug.cgi?id=86671
+
+        Reviewed by Julien Chaffraix.
+
+        The CSS2 spec specifies that table-columns misparented outside of a table or
+        table-column-group should be wrapped in an anonymous table. Updating 
+        RenderObject::addChild to follow the spec.
+        see http://www.w3.org/TR/CSS2/tables.html#anonymous-boxes for details.
+
+        Tests: fast/table/table-column-generates-anonymous-table.html
+               fast/table/table-column-group-generates-anonymous-table.html
+
+        * rendering/RenderObject.cpp:
+        (WebCore::RenderObject::addChild):
+
 2012-05-18  Keyar Hood  <[email protected]>
 
         Support imageSmoothingEnabled

Modified: trunk/Source/WebCore/rendering/RenderObject.cpp (117639 => 117640)


--- trunk/Source/WebCore/rendering/RenderObject.cpp	2012-05-18 21:57:09 UTC (rev 117639)
+++ trunk/Source/WebCore/rendering/RenderObject.cpp	2012-05-18 22:09:51 UTC (rev 117640)
@@ -271,8 +271,10 @@
 
     bool needsTable = false;
 
-    if (newChild->isTableCol() && newChild->style()->display() == TABLE_COLUMN_GROUP)
+    if (newChild->style()->display() == TABLE_COLUMN_GROUP)
         needsTable = !isTable();
+    else if (newChild->style()->display() == TABLE_COLUMN)
+        needsTable = !isTable() && style()->display() != TABLE_COLUMN_GROUP;
     else if (newChild->isTableCaption())
         needsTable = !isTable();
     else if (newChild->isTableSection())
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to