Diff
Modified: trunk/LayoutTests/ChangeLog (94108 => 94109)
--- trunk/LayoutTests/ChangeLog 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/ChangeLog 2011-08-30 21:22:48 UTC (rev 94109)
@@ -1,3 +1,27 @@
+2011-08-30 Abhishek Arya <[email protected]>
+
+ Style not updated for table parts in :before, :after content.
+ https://bugs.webkit.org/show_bug.cgi?id=66141
+
+ 1. 2 new tests show that the blue and green boxes don't overlap
+ after the fix.
+ 2. update r93794 tests showing that style info is propagated.
+
+ Reviewed by Dave Hyatt.
+
+ * fast/table/table-before-child-style-update-expected.png: Added.
+ * fast/table/table-before-child-style-update-expected.txt: Added.
+ * fast/table/table-before-child-style-update.html: Added.
+ * fast/table/table-row-before-child-style-update-expected.png: Added.
+ * fast/table/table-row-before-child-style-update-expected.txt: Added.
+ * fast/table/table-row-before-child-style-update.html: Added.
+ * platform/mac/fast/table/table-after-child-in-table-expected.txt:
+ * platform/mac/fast/table/table-before-child-in-table-expected.txt:
+ * platform/mac/fast/table/table-row-after-child-in-block-expected.txt:
+ * platform/mac/fast/table/table-row-after-child-in-table-expected.txt:
+ * platform/mac/fast/table/table-row-before-child-in-block-expected.txt:
+ * platform/mac/fast/table/table-row-before-child-in-table-expected.txt:
+
2011-08-30 Tony Chang <[email protected]>
refactor box-ordinal-group handling so we don't timeout on large values
Added: trunk/LayoutTests/fast/table/table-before-child-style-update-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/fast/table/table-before-child-style-update-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/fast/table/table-before-child-style-update-expected.txt (0 => 94109)
--- trunk/LayoutTests/fast/table/table-before-child-style-update-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/table/table-before-child-style-update-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -0,0 +1,15 @@
+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 {DIV} at (0,0) size 784x256 [color=#008000]
+ RenderTable at (0,0) size 512x128 [color=#0000FF]
+ RenderTableSection (anonymous) at (0,0) size 512x128
+ RenderTableRow (anonymous) at (0,0) size 512x128
+ RenderTableCell (anonymous) at (0,0) size 512x128 [r=0 c=0 rs=1 cs=1]
+ RenderText at (0,0) size 512x128
+ text run at (0,0) width 512: "ABCD"
+ RenderBlock (anonymous) at (0,128) size 784x128
+ RenderText {#text} at (0,0) size 384x128
+ text run at (0,0) width 384: "ABC"
Added: trunk/LayoutTests/fast/table/table-before-child-style-update.html (0 => 94109)
--- trunk/LayoutTests/fast/table/table-before-child-style-update.html (rev 0)
+++ trunk/LayoutTests/fast/table/table-before-child-style-update.html 2011-08-30 21:22:48 UTC (rev 94109)
@@ -0,0 +1,15 @@
+<html>
+<body style="font: 1em/1 Ahem, sans-serif;">
+<style>
+div::before {
+ content: "ABCD";
+ color: blue;
+ display: table;
+}
+</style>
+<div id="test" style="color: green">ABC</div>
+<script>
+ document.getElementById('test').style.fontSize= "800%";
+</script>
+</body>
+</html>
Added: trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.png
(Binary files differ)
Property changes on: trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.png
___________________________________________________________________
Added: svn:mime-type
Added: trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt (0 => 94109)
--- trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt (rev 0)
+++ trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -0,0 +1,15 @@
+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 {DIV} at (0,0) size 784x256 [color=#008000]
+ RenderTable at (0,0) size 512x128
+ RenderTableSection (anonymous) at (0,0) size 512x128
+ RenderTableRow (anonymous) at (0,0) size 512x128 [color=#0000FF]
+ RenderTableCell (anonymous) at (0,0) size 512x128 [r=0 c=0 rs=1 cs=1]
+ RenderText at (0,0) size 512x128
+ text run at (0,0) width 512: "ABCD"
+ RenderBlock (anonymous) at (0,128) size 784x128
+ RenderText {#text} at (0,0) size 384x128
+ text run at (0,0) width 384: "ABC"
Added: trunk/LayoutTests/fast/table/table-row-before-child-style-update.html (0 => 94109)
--- trunk/LayoutTests/fast/table/table-row-before-child-style-update.html (rev 0)
+++ trunk/LayoutTests/fast/table/table-row-before-child-style-update.html 2011-08-30 21:22:48 UTC (rev 94109)
@@ -0,0 +1,15 @@
+<html>
+<body style="font: 1em/1 Ahem, sans-serif;">
+<style>
+div::before {
+ content: "ABCD";
+ color: blue;
+ display: table-row;
+}
+</style>
+<div id="test" style="color: green">ABC</div>
+<script>
+ document.getElementById('test').style.fontSize= "800%";
+</script>
+</body>
+</html>
Modified: trunk/LayoutTests/platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -9,7 +9,7 @@
RenderTable {DIV} at (0,34) size 77x54
RenderTableSection (anonymous) at (0,0) size 77x54 [color=#000000]
RenderTableRow (anonymous) at (0,0) size 77x18 [color=#FF0000]
- RenderTableCell (anonymous) at (0,0) size 77x18 [color=#000000] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 77x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 63x18
text run at (0,0) width 63: "BEFORE"
RenderTableRow (anonymous) at (0,18) size 77x18
@@ -18,7 +18,7 @@
RenderText {#text} at (0,0) size 77x18
text run at (0,0) width 77: "CONTENT"
RenderTableRow (anonymous) at (0,36) size 77x18 [color=#FF0000]
- RenderTableCell (anonymous) at (0,36) size 77x18 [color=#000000] [r=2 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,36) size 77x18 [r=2 c=0 rs=1 cs=1]
RenderText at (0,0) size 52x18
text run at (0,0) width 52: "AFTER"
RenderBlock (anonymous) at (0,88) size 784x18
Modified: trunk/LayoutTests/platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -11,7 +11,7 @@
RenderTableRow (anonymous) at (0,0) size 77x54
RenderTableCell (anonymous) at (0,0) size 77x54 [r=0 c=0 rs=1 cs=1]
RenderTable at (0,0) size 63x18 [color=#FF0000]
- RenderTableSection (anonymous) at (0,0) size 63x18 [color=#000000]
+ RenderTableSection (anonymous) at (0,0) size 63x18
RenderTableRow (anonymous) at (0,0) size 63x18
RenderTableCell (anonymous) at (0,0) size 63x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 63x18
@@ -20,7 +20,7 @@
RenderText {#text} at (0,0) size 77x18
text run at (0,0) width 77: "CONTENT"
RenderTable at (0,36) size 52x18 [color=#FF0000]
- RenderTableSection (anonymous) at (0,0) size 52x18 [color=#000000]
+ RenderTableSection (anonymous) at (0,0) size 52x18
RenderTableRow (anonymous) at (0,0) size 52x18
RenderTableCell (anonymous) at (0,0) size 52x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 52x18
Modified: trunk/LayoutTests/platform/mac/fast/table/table-after-child-in-table-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/table/table-after-child-in-table-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/table/table-after-child-in-table-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -12,7 +12,7 @@
RenderText {#text} at (0,0) size 77x18
text run at (0,0) width 77: "CONTENT"
RenderTable at (0,18) size 90x56 [color=#FF0000] [border: (3px solid #0000FF)]
- RenderTableSection (anonymous) at (19,19) size 52x18 [color=#000000]
+ RenderTableSection (anonymous) at (19,19) size 52x18
RenderTableRow (anonymous) at (0,0) size 52x18
RenderTableCell (anonymous) at (0,0) size 52x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 52x18
Modified: trunk/LayoutTests/platform/mac/fast/table/table-before-child-in-table-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/table/table-before-child-in-table-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/table/table-before-child-in-table-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -8,7 +8,7 @@
RenderTableRow (anonymous) at (0,0) size 101x74
RenderTableCell (anonymous) at (0,0) size 101x74 [r=0 c=0 rs=1 cs=1]
RenderTable at (0,0) size 101x56 [color=#FF0000] [border: (3px solid #0000FF)]
- RenderTableSection (anonymous) at (19,19) size 63x18 [color=#000000]
+ RenderTableSection (anonymous) at (19,19) size 63x18
RenderTableRow (anonymous) at (0,0) size 63x18
RenderTableCell (anonymous) at (0,0) size 63x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 63x18
Modified: trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-block-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-block-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-block-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -10,6 +10,6 @@
RenderTable at (19,37) size 52x18 [color=#000000]
RenderTableSection (anonymous) at (0,0) size 52x18
RenderTableRow (anonymous) at (0,0) size 52x18 [color=#FF0000] [border: (3px solid #0000FF)]
- RenderTableCell (anonymous) at (0,0) size 52x18 [color=#000000] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 52x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 52x18
text run at (0,0) width 52: "AFTER"
Modified: trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-table-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-table-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/table/table-row-after-child-in-table-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -11,6 +11,6 @@
RenderText {#text} at (0,0) size 77x18
text run at (0,0) width 77: "CONTENT"
RenderTableRow (anonymous) at (0,18) size 77x18 [color=#FF0000] [border: (3px solid #0000FF)]
- RenderTableCell (anonymous) at (0,18) size 77x18 [color=#000000] [r=1 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,18) size 77x18 [r=1 c=0 rs=1 cs=1]
RenderText at (0,0) size 52x18
text run at (0,0) width 52: "AFTER"
Modified: trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-block-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-block-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-block-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -7,7 +7,7 @@
RenderTable at (19,19) size 63x18 [color=#000000]
RenderTableSection (anonymous) at (0,0) size 63x18
RenderTableRow (anonymous) at (0,0) size 63x18 [color=#FF0000] [border: (3px solid #0000FF)]
- RenderTableCell (anonymous) at (0,0) size 63x18 [color=#000000] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 63x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 63x18
text run at (0,0) width 63: "BEFORE"
RenderBlock {DIV} at (19,37) size 746x18
Modified: trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-table-expected.txt (94108 => 94109)
--- trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-table-expected.txt 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/LayoutTests/platform/mac/fast/table/table-row-before-child-in-table-expected.txt 2011-08-30 21:22:48 UTC (rev 94109)
@@ -6,7 +6,7 @@
RenderTable {DIV} at (0,0) size 115x74 [color=#FF0000] [border: (3px solid #008000)]
RenderTableSection (anonymous) at (19,19) size 77x36 [color=#000000]
RenderTableRow (anonymous) at (0,0) size 77x18 [color=#FF0000] [border: (3px solid #0000FF)]
- RenderTableCell (anonymous) at (0,0) size 77x18 [color=#000000] [r=0 c=0 rs=1 cs=1]
+ RenderTableCell (anonymous) at (0,0) size 77x18 [r=0 c=0 rs=1 cs=1]
RenderText at (0,0) size 63x18
text run at (0,0) width 63: "BEFORE"
RenderTableRow (anonymous) at (0,18) size 77x18
Modified: trunk/Source/WebCore/ChangeLog (94108 => 94109)
--- trunk/Source/WebCore/ChangeLog 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/Source/WebCore/ChangeLog 2011-08-30 21:22:48 UTC (rev 94109)
@@ -1,3 +1,16 @@
+2011-08-30 Abhishek Arya <[email protected]>
+
+ Style not updated for table parts in :before, :after content.
+ https://bugs.webkit.org/show_bug.cgi?id=66141
+
+ Reviewed by Dave Hyatt.
+
+ Tests: fast/table/table-before-child-style-update.html
+ fast/table/table-row-before-child-style-update.html
+
+ * rendering/RenderObjectChildList.cpp:
+ (WebCore::RenderObjectChildList::updateBeforeAfterContent):
+
2011-08-30 Tony Chang <[email protected]>
refactor box-ordinal-group handling so we don't timeout on large values
Modified: trunk/Source/WebCore/rendering/RenderObjectChildList.cpp (94108 => 94109)
--- trunk/Source/WebCore/rendering/RenderObjectChildList.cpp 2011-08-30 20:53:45 UTC (rev 94108)
+++ trunk/Source/WebCore/rendering/RenderObjectChildList.cpp 2011-08-30 21:22:48 UTC (rev 94109)
@@ -416,6 +416,21 @@
if (!beforeAfterParent)
return;
+ // When beforeAfterParent is not equal to child (e.g. in tables),
+ // we need to create new styles inheriting from pseudoElementStyle
+ // on all the intermediate parents (leaving their display same).
+ if (beforeAfterParent != child) {
+ RenderObject* curr = beforeAfterParent;
+ while (curr && curr != child) {
+ ASSERT(curr->isAnonymous());
+ RefPtr<RenderStyle> newStyle = RenderStyle::create();
+ newStyle->inheritFrom(pseudoElementStyle);
+ newStyle->setDisplay(curr->style()->display());
+ curr->setStyle(newStyle);
+ curr = curr->parent();
+ }
+ }
+
// Note that if we ever support additional types of generated content (which should be way off
// in the future), this code will need to be patched.
for (RenderObject* genChild = beforeAfterParent->firstChild(); genChild; genChild = genChild->nextSibling()) {