Title: [94857] trunk
Revision
94857
Author
infe...@chromium.org
Date
2011-09-09 09:23:53 -0700 (Fri, 09 Sep 2011)

Log Message

:before content rendering issues with list markers and run-ins.
https://bugs.webkit.org/show_bug.cgi?id=67735

Source/WebCore: 

1) Remove the isAnonymous checks for run-in detection since the
run-in can belong to a node.
2) When the parent has block children, then the list marker will
be enclosed in an anonymous block. In that case, for going to the
next list marker, we need to traverse one level up. We don't need
this check when searching for generated run-in (loop 2), since we
know parent will have inline children, so the list marker wont be
enclosed in an anonymous block.

Reviewed by Dave Hyatt.

Tests: fast/lists/list-marker-before-content-table.html
       fast/runin/runin-generated-before-content.html

* rendering/RenderObjectChildList.cpp:
(WebCore::RenderObjectChildList::beforePseudoElementRenderer):

LayoutTests: 

Reviewed by Dave Hyatt.

* fast/lists/list-marker-before-content-table-expected.png: Added.
* fast/lists/list-marker-before-content-table-expected.txt: Added.
* fast/lists/list-marker-before-content-table.html: Added.
* fast/runin/runin-generated-before-content-expected.png: Added.
* fast/runin/runin-generated-before-content-expected.txt: Added.
* fast/runin/runin-generated-before-content.html: Added.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (94856 => 94857)


--- trunk/LayoutTests/ChangeLog	2011-09-09 16:16:04 UTC (rev 94856)
+++ trunk/LayoutTests/ChangeLog	2011-09-09 16:23:53 UTC (rev 94857)
@@ -1,3 +1,17 @@
+2011-09-08  Abhishek Arya  <infe...@chromium.org>
+
+        :before content rendering issues with list markers and run-ins.
+        https://bugs.webkit.org/show_bug.cgi?id=67735
+
+        Reviewed by Dave Hyatt.
+
+        * fast/lists/list-marker-before-content-table-expected.png: Added.
+        * fast/lists/list-marker-before-content-table-expected.txt: Added.
+        * fast/lists/list-marker-before-content-table.html: Added.
+        * fast/runin/runin-generated-before-content-expected.png: Added.
+        * fast/runin/runin-generated-before-content-expected.txt: Added.
+        * fast/runin/runin-generated-before-content.html: Added.
+
 2011-09-09  Nate Chapin  <jap...@chromium.org>
 
         Chromium leopard css3 baselines, and new mac gpu baselines.

Added: trunk/LayoutTests/fast/lists/list-marker-before-content-table-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/fast/lists/list-marker-before-content-table-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/fast/lists/list-marker-before-content-table-expected.txt (0 => 94857)


--- trunk/LayoutTests/fast/lists/list-marker-before-content-table-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/lists/list-marker-before-content-table-expected.txt	2011-09-09 16:23:53 UTC (rev 94857)
@@ -0,0 +1,18 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x160
+  RenderBlock {HTML} at (0,0) size 800x160
+    RenderBody {BODY} at (8,32) size 784x96
+      RenderBlock {UL} at (0,0) size 784x96
+        RenderListItem {LI} at (40,0) size 744x96 [color=#008000]
+          RenderBlock (anonymous) at (0,0) size 744x32
+            RenderListMarker at (-25,0) size 11x32: bullet
+          RenderTable at (0,32) size 128x32
+            RenderTableSection (anonymous) at (0,0) size 128x32
+              RenderTableRow (anonymous) at (0,0) size 128x32 [color=#0000FF]
+                RenderTableCell (anonymous) at (0,0) size 128x32 [r=0 c=0 rs=1 cs=1]
+                  RenderText at (0,0) size 128x32
+                    text run at (0,0) width 128: "ABCD"
+          RenderBlock (anonymous) at (0,64) size 744x32
+            RenderText {#text} at (0,0) size 128x32
+              text run at (0,0) width 128: "EFGH"

Added: trunk/LayoutTests/fast/lists/list-marker-before-content-table.html (0 => 94857)


--- trunk/LayoutTests/fast/lists/list-marker-before-content-table.html	                        (rev 0)
+++ trunk/LayoutTests/fast/lists/list-marker-before-content-table.html	2011-09-09 16:23:53 UTC (rev 94857)
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<!-- You should only one blue textbox between the green list maker and green textbox -->
+<html>
+<body style="font: 1em/1 Ahem, sans-serif;">
+<style>
+li:before {
+    display: table-row;
+    content: "ABCD";
+    color: blue;
+}
+</style>
+<ul>              
+<li style="color: green">EFGH</li>
+</ul>
+<script>
+    document.body.offsetTop;
+    document.body.style.fontSize = "200%";
+</script>
+</body>
+</html>

Added: trunk/LayoutTests/fast/runin/runin-generated-before-content-expected.png


(Binary files differ)
Property changes on: trunk/LayoutTests/fast/runin/runin-generated-before-content-expected.png ___________________________________________________________________

Added: svn:mime-type

Added: trunk/LayoutTests/fast/runin/runin-generated-before-content-expected.txt (0 => 94857)


--- trunk/LayoutTests/fast/runin/runin-generated-before-content-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/fast/runin/runin-generated-before-content-expected.txt	2011-09-09 16:23:53 UTC (rev 94857)
@@ -0,0 +1,14 @@
+layer at (0,0) size 800x600
+  RenderView at (0,0) size 800x600
+layer at (0,0) size 800x48
+  RenderBlock {HTML} at (0,0) size 800x48
+    RenderBody {BODY} at (8,8) size 784x32
+      RenderBlock {DIV} at (0,0) size 784x32 [color=#008000]
+        RenderInline (run-in) {DIV} at (0,0) size 128x32 [color=#FFA500]
+          RenderText {#text} at (0,0) size 128x32
+            text run at (0,0) width 128: "ABCD"
+        RenderInline (generated) at (0,0) size 128x32 [color=#0000FF]
+          RenderText at (128,0) size 128x32
+            text run at (128,0) width 128: "EFGH"
+        RenderText {#text} at (256,0) size 128x32
+          text run at (256,0) width 128: "IJKL"

Added: trunk/LayoutTests/fast/runin/runin-generated-before-content.html (0 => 94857)


--- trunk/LayoutTests/fast/runin/runin-generated-before-content.html	                        (rev 0)
+++ trunk/LayoutTests/fast/runin/runin-generated-before-content.html	2011-09-09 16:23:53 UTC (rev 94857)
@@ -0,0 +1,17 @@
+<!DOCTYPE html>
+<!-- You should see only one blue textbox between the orange and green textbox. -->
+<html>
+<body style="font: 1em/1 Ahem, sans-serif;">
+<style>
+#test::before {
+    content: "EFGH";
+    color: blue;
+}
+</style>                          
+<div style="display: run-in; color: orange">ABCD</div><div id="test" style="color: green">IJKL</div>
+<script>
+    document.body.offsetTop;
+    document.body.style.fontSize = "200%";
+</script>
+</body>
+</html>

Modified: trunk/Source/WebCore/ChangeLog (94856 => 94857)


--- trunk/Source/WebCore/ChangeLog	2011-09-09 16:16:04 UTC (rev 94856)
+++ trunk/Source/WebCore/ChangeLog	2011-09-09 16:23:53 UTC (rev 94857)
@@ -1,3 +1,25 @@
+2011-09-08  Abhishek Arya  <infe...@chromium.org>
+
+        :before content rendering issues with list markers and run-ins.
+        https://bugs.webkit.org/show_bug.cgi?id=67735
+
+        1) Remove the isAnonymous checks for run-in detection since the
+        run-in can belong to a node.
+        2) When the parent has block children, then the list marker will
+        be enclosed in an anonymous block. In that case, for going to the
+        next list marker, we need to traverse one level up. We don't need
+        this check when searching for generated run-in (loop 2), since we
+        know parent will have inline children, so the list marker wont be
+        enclosed in an anonymous block.
+
+        Reviewed by Dave Hyatt.
+
+        Tests: fast/lists/list-marker-before-content-table.html
+               fast/runin/runin-generated-before-content.html
+
+        * rendering/RenderObjectChildList.cpp:
+        (WebCore::RenderObjectChildList::beforePseudoElementRenderer):
+
 2011-09-09  Pavel Podivilov  <podivi...@chromium.org>
 
         Web Inspector: introduce _javascript_SourceFrame class.

Modified: trunk/Source/WebCore/rendering/RenderObjectChildList.cpp (94856 => 94857)


--- trunk/Source/WebCore/rendering/RenderObjectChildList.cpp	2011-09-09 16:16:04 UTC (rev 94856)
+++ trunk/Source/WebCore/rendering/RenderObjectChildList.cpp	2011-09-09 16:23:53 UTC (rev 94857)
@@ -299,8 +299,13 @@
     do {
         // Skip list markers and generated run-ins
         first = first->firstChild();
-        while (first && (first->isListMarker() || (first->isRenderInline() && first->isRunIn() && first->isAnonymous())))
+        while (first && first->isListMarker()) {
+            if (first->parent() != owner && first->parent()->isAnonymousBlock())
+                first = first->parent();
             first = first->nextSibling();
+        }
+        while (first && first->isRenderInline() && first->isRunIn())
+            first = first->nextSibling();
     } while (first && first->isAnonymous() && first->style()->styleType() == NOPSEUDO);
 
     if (!first)
@@ -321,7 +326,7 @@
         // We still need to skip any list markers that could exist before the run-in.
         while (first && first->isListMarker())
             first = first->nextSibling();
-        if (first && first->style()->styleType() == BEFORE && first->isRenderInline() && first->isRunIn() && first->isAnonymous())
+        if (first && first->style()->styleType() == BEFORE && first->isRenderInline() && first->isRunIn())
             return first;
     }
     return 0;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to