diff options
author | John Reck <jreck@google.com> | 2011-10-21 13:59:22 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2011-10-21 13:59:22 -0700 |
commit | b7e2702e32ab8b1cc3b5d85e6a815174e2830108 (patch) | |
tree | 537522a2d57fda3b6cd74eb86687b7013410a590 /Source | |
parent | 686c16a0cf5238ab24da8f229e3bf84e6510ee68 (diff) | |
parent | 5dee9ed228c914254062b62ae459884e3060a2ae (diff) | |
download | external_webkit-b7e2702e32ab8b1cc3b5d85e6a815174e2830108.zip external_webkit-b7e2702e32ab8b1cc3b5d85e6a815174e2830108.tar.gz external_webkit-b7e2702e32ab8b1cc3b5d85e6a815174e2830108.tar.bz2 |
am 5dee9ed2: Merge "Cherry pick 97075" into ics-mr0
* commit '5dee9ed228c914254062b62ae459884e3060a2ae':
Cherry pick 97075
Diffstat (limited to 'Source')
-rw-r--r-- | Source/WebCore/rendering/RenderBlock.cpp | 6 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderObject.cpp | 4 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderObject.h | 4 | ||||
-rw-r--r-- | Source/WebCore/rendering/RenderObjectChildList.cpp | 28 |
4 files changed, 15 insertions, 27 deletions
diff --git a/Source/WebCore/rendering/RenderBlock.cpp b/Source/WebCore/rendering/RenderBlock.cpp index 8fa021f..373523d 100644 --- a/Source/WebCore/rendering/RenderBlock.cpp +++ b/Source/WebCore/rendering/RenderBlock.cpp @@ -1554,13 +1554,9 @@ bool RenderBlock::handleRunInChild(RenderBox* child) if (!child->isRenderBlock()) return false; - // Get the next non-positioned/non-floating RenderBlock. RenderBlock* blockRunIn = toRenderBlock(child); RenderObject* curr = blockRunIn->nextSibling(); - while (curr && curr->isFloatingOrPositioned()) - curr = curr->nextSibling(); - - if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRunIn() || curr->isAnonymous()) + if (!curr || !curr->isRenderBlock() || !curr->childrenInline() || curr->isRunIn() || curr->isAnonymous() || curr->isFloatingOrPositioned()) return false; RenderBlock* currBlock = toRenderBlock(curr); diff --git a/Source/WebCore/rendering/RenderObject.cpp b/Source/WebCore/rendering/RenderObject.cpp index b050539..8caef04 100644 --- a/Source/WebCore/rendering/RenderObject.cpp +++ b/Source/WebCore/rendering/RenderObject.cpp @@ -366,7 +366,7 @@ RenderObject* RenderObject::nextInPreOrderAfterChildren() const return o; } -RenderObject* RenderObject::nextInPreOrder(RenderObject* stayWithin) const +RenderObject* RenderObject::nextInPreOrder(const RenderObject* stayWithin) const { if (RenderObject* o = firstChild()) return o; @@ -374,7 +374,7 @@ RenderObject* RenderObject::nextInPreOrder(RenderObject* stayWithin) const return nextInPreOrderAfterChildren(stayWithin); } -RenderObject* RenderObject::nextInPreOrderAfterChildren(RenderObject* stayWithin) const +RenderObject* RenderObject::nextInPreOrderAfterChildren(const RenderObject* stayWithin) const { if (this == stayWithin) return 0; diff --git a/Source/WebCore/rendering/RenderObject.h b/Source/WebCore/rendering/RenderObject.h index 14a40e9..005c453 100644 --- a/Source/WebCore/rendering/RenderObject.h +++ b/Source/WebCore/rendering/RenderObject.h @@ -158,9 +158,9 @@ public: virtual const RenderObjectChildList* virtualChildren() const { return 0; } RenderObject* nextInPreOrder() const; - RenderObject* nextInPreOrder(RenderObject* stayWithin) const; + RenderObject* nextInPreOrder(const RenderObject* stayWithin) const; RenderObject* nextInPreOrderAfterChildren() const; - RenderObject* nextInPreOrderAfterChildren(RenderObject* stayWithin) const; + RenderObject* nextInPreOrderAfterChildren(const RenderObject* stayWithin) const; RenderObject* previousInPreOrder() const; RenderObject* childAt(unsigned) const; diff --git a/Source/WebCore/rendering/RenderObjectChildList.cpp b/Source/WebCore/rendering/RenderObjectChildList.cpp index b6c7992..92f3b16 100644 --- a/Source/WebCore/rendering/RenderObjectChildList.cpp +++ b/Source/WebCore/rendering/RenderObjectChildList.cpp @@ -269,15 +269,10 @@ RenderObject* RenderObjectChildList::beforePseudoElementRenderer(const RenderObj // 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) @@ -287,20 +282,17 @@ RenderObject* RenderObjectChildList::beforePseudoElementRenderer(const RenderObj 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; } |