Title: [138274] trunk/LayoutTests
Revision
138274
Author
commit-qu...@webkit.org
Date
2012-12-20 10:48:42 -0800 (Thu, 20 Dec 2012)

Log Message

Block level pseudo elements bleed background color to <html>
https://bugs.webkit.org/show_bug.cgi?id=104855

Patch by Elliott Sprehn <espr...@gmail.com> on 2012-12-20
Reviewed by Julien Chaffraix.

Before r137336 placing a pseudo element :before or :after that was display
block on the <html> element would also set the background color of the
root of the document.

This was because RenderObject::isRoot checked if document()->documentElement() == m_node,
which was true for html:before or html:after with the old implementation
of generated content. Instead it should have compared against node() which
would have compensated for the anonymous generated content.

This is fixed by the new generated content implementation that was turned
on in r137336 because m_node is now the PseudoElement, not the generatingNode.

* fast/css-generated-content/html-pseudo-background-color-expected.html: Added.
* fast/css-generated-content/html-pseudo-background-color.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (138273 => 138274)


--- trunk/LayoutTests/ChangeLog	2012-12-20 18:42:13 UTC (rev 138273)
+++ trunk/LayoutTests/ChangeLog	2012-12-20 18:48:42 UTC (rev 138274)
@@ -1,3 +1,25 @@
+2012-12-20  Elliott Sprehn  <espr...@gmail.com>
+
+        Block level pseudo elements bleed background color to <html>
+        https://bugs.webkit.org/show_bug.cgi?id=104855
+
+        Reviewed by Julien Chaffraix.
+
+        Before r137336 placing a pseudo element :before or :after that was display
+        block on the <html> element would also set the background color of the
+        root of the document.
+
+        This was because RenderObject::isRoot checked if document()->documentElement() == m_node,
+        which was true for html:before or html:after with the old implementation
+        of generated content. Instead it should have compared against node() which
+        would have compensated for the anonymous generated content.
+
+        This is fixed by the new generated content implementation that was turned
+        on in r137336 because m_node is now the PseudoElement, not the generatingNode.
+
+        * fast/css-generated-content/html-pseudo-background-color-expected.html: Added.
+        * fast/css-generated-content/html-pseudo-background-color.html: Added.
+
 2012-12-20  Dominic Mazzoni  <dmazz...@google.com>
 
         Unreviewed. Adjust Mac TestExpectations.

Added: trunk/LayoutTests/fast/css-generated-content/html-pseudo-background-color-expected.html (0 => 138274)


--- trunk/LayoutTests/fast/css-generated-content/html-pseudo-background-color-expected.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-generated-content/html-pseudo-background-color-expected.html	2012-12-20 18:48:42 UTC (rev 138274)
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+
+<p>Bug 104855: Block level pseudo elements bleed background color to &lt;html&gt;</p>
+
+<p>Neither frame should be red.</p>
+
+<iframe></iframe>
+
+<iframe></iframe>

Added: trunk/LayoutTests/fast/css-generated-content/html-pseudo-background-color.html (0 => 138274)


--- trunk/LayoutTests/fast/css-generated-content/html-pseudo-background-color.html	                        (rev 0)
+++ trunk/LayoutTests/fast/css-generated-content/html-pseudo-background-color.html	2012-12-20 18:48:42 UTC (rev 138274)
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+
+<p>Bug 104855: Block level pseudo elements bleed background color to &lt;html&gt;</p>
+
+<p>Neither frame should be red.</p>
+
+<iframe srcdoc='
+    <style>
+        html:before { 
+            content: "";
+            display: block;
+            background: red;
+        }
+    </style>
+'></iframe>
+
+<iframe srcdoc='
+    <style>
+        html:after { 
+            content: "";
+            display: block;
+            background: red;
+        }
+    </style>
+'></iframe>
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to