Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: Source/WebCore/rendering/RenderObjectChildList.cpp

Issue 8216022: Merge 97075 - Style for updated due to inability to locate (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/rendering/RenderObjectChildList.cpp
===================================================================
--- Source/WebCore/rendering/RenderObjectChildList.cpp (revision 97085)
+++ Source/WebCore/rendering/RenderObjectChildList.cpp (working copy)
@@ -297,15 +297,10 @@
// generated inline run-in in the next level of children.
RenderObject* first = const_cast<RenderObject*>(owner);
do {
- // Skip list markers and generated run-ins
first = first->firstChild();
- 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();
+ // Skip list markers and generated run-ins.
+ while (first && (first->isListMarker() || (first->isRenderInline() && first->isRunIn())))
+ first = first->nextInPreOrderAfterChildren(owner);
} while (first && first->isAnonymous() && first->style()->styleType() == NOPSEUDO);
if (!first)
@@ -315,20 +310,17 @@
return first;
// Check for a possible generated run-in, using run-in positioning rules.
- // Skip inlines and floating / positioned blocks, and place as the first child.
first = owner->firstChild();
if (!first->isRenderBlock())
return 0;
- while (first && first->isFloatingOrPositioned())
+
+ first = first->firstChild();
+ // 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 = first->firstChild();
- // 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())
- return first;
- }
+ if (first && first->style()->styleType() == BEFORE && first->isRenderInline() && first->isRunIn())
+ return first;
+
return 0;
}
« no previous file with comments | « Source/WebCore/rendering/RenderObject.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698