OSDN Git Service

Cherry pick 94857
authorJohn Reck <jreck@google.com>
Thu, 20 Oct 2011 22:23:20 +0000 (15:23 -0700)
committerJohn Reck <jreck@google.com>
Thu, 20 Oct 2011 22:23:20 +0000 (15:23 -0700)
 Bug: 5491573

Change-Id: I32666ca6abdc2e224e6b9727f65e62fd3bd10859

Source/WebCore/rendering/RenderObjectChildList.cpp

index 1ea8675..b6c7992 100644 (file)
@@ -271,7 +271,12 @@ RenderObject* RenderObjectChildList::beforePseudoElementRenderer(const RenderObj
     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);
 
@@ -293,7 +298,7 @@ RenderObject* RenderObjectChildList::beforePseudoElementRenderer(const RenderObj
         // 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;