Index: Source/WebCore/rendering/RenderBoxModelObject.cpp |
=================================================================== |
--- Source/WebCore/rendering/RenderBoxModelObject.cpp (revision 122130) |
+++ Source/WebCore/rendering/RenderBoxModelObject.cpp (working copy) |
@@ -3046,6 +3046,11 @@ |
void RenderBoxModelObject::moveChildTo(RenderBoxModelObject* toBoxModelObject, RenderObject* child, RenderObject* beforeChild, bool fullRemoveInsert) |
{ |
+ // FIXME: We need a performant way to handle clearing positioned objects from our list that are |
+ // in |child|'s subtree so we could just clear them here. Because of this, we assume that callers |
+ // have cleared their positioned objects list for child moves (!fullRemoveInsert) to avoid any badness. |
+ ASSERT(!fullRemoveInsert || !isRenderBlock() || !toRenderBlock(this)->hasPositionedObjects()); |
+ |
ASSERT(this == child->parent()); |
ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
if (fullRemoveInsert && (toBoxModelObject->isRenderBlock() || toBoxModelObject->isRenderInline())) { |
@@ -3058,6 +3063,15 @@ |
void RenderBoxModelObject::moveChildrenTo(RenderBoxModelObject* toBoxModelObject, RenderObject* startChild, RenderObject* endChild, RenderObject* beforeChild, bool fullRemoveInsert) |
{ |
+ // This condition is rarely hit since this function is usually called on |
+ // anonymous blocks which can no longer carry positioned objects (see r120761) |
+ // or when fullRemoveInsert is false. |
+ if (fullRemoveInsert && isRenderBlock()) { |
+ RenderBlock* block = toRenderBlock(this); |
+ if (block->hasPositionedObjects()) |
+ block->removePositionedObjects(0); |
+ } |
+ |
ASSERT(!beforeChild || toBoxModelObject == beforeChild->parent()); |
for (RenderObject* child = startChild; child && child != endChild; ) { |
// Save our next sibling as moveChildTo will clear it. |