Title: [94135] branches/chromium/835

Diff

Copied: branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update-expected.png (from rev 94109, trunk/LayoutTests/fast/table/table-before-child-style-update-expected.png)


(Binary files differ)

Copied: branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update-expected.txt (from rev 94109, trunk/LayoutTests/fast/table/table-before-child-style-update-expected.txt) (0 => 94135)


--- branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update-expected.txt	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update-expected.txt	2011-08-31 00:25:37 UTC (rev 94135)
@@ -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"

Copied: branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update.html (from rev 94109, trunk/LayoutTests/fast/table/table-before-child-style-update.html) (0 => 94135)


--- branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update.html	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/table/table-before-child-style-update.html	2011-08-31 00:25:37 UTC (rev 94135)
@@ -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>

Copied: branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update-expected.png (from rev 94109, trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.png)


(Binary files differ)

Copied: branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt (from rev 94109, trunk/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt) (0 => 94135)


--- branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update-expected.txt	2011-08-31 00:25:37 UTC (rev 94135)
@@ -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"

Copied: branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update.html (from rev 94109, trunk/LayoutTests/fast/table/table-row-before-child-style-update.html) (0 => 94135)


--- branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update.html	                        (rev 0)
+++ branches/chromium/835/LayoutTests/fast/table/table-row-before-child-style-update.html	2011-08-31 00:25:37 UTC (rev 94135)
@@ -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: branches/chromium/835/LayoutTests/platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt (94134 => 94135)


--- branches/chromium/835/LayoutTests/platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt	2011-08-31 00:21:18 UTC (rev 94134)
+++ branches/chromium/835/LayoutTests/platform/mac/fast/css-generated-content/table-row-before-after-child-add-expected.txt	2011-08-31 00:25:37 UTC (rev 94135)
@@ -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: branches/chromium/835/LayoutTests/platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt (94134 => 94135)


--- branches/chromium/835/LayoutTests/platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt	2011-08-31 00:21:18 UTC (rev 94134)
+++ branches/chromium/835/LayoutTests/platform/mac/fast/css-generated-content/table-table-before-after-child-add-expected.txt	2011-08-31 00:25:37 UTC (rev 94135)
@@ -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: branches/chromium/835/Source/WebCore/rendering/RenderObjectChildList.cpp (94134 => 94135)


--- branches/chromium/835/Source/WebCore/rendering/RenderObjectChildList.cpp	2011-08-31 00:21:18 UTC (rev 94134)
+++ branches/chromium/835/Source/WebCore/rendering/RenderObjectChildList.cpp	2011-08-31 00:25:37 UTC (rev 94135)
@@ -388,6 +388,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()) {
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to