Index: Source/core/layout/LayoutBlock.cpp |
diff --git a/Source/core/layout/LayoutBlock.cpp b/Source/core/layout/LayoutBlock.cpp |
index fc625dabc3bb795c86c022451ac44cb97e7b89b4..c5875358bdc3759972b26bd8048be8616888c1b9 100644 |
--- a/Source/core/layout/LayoutBlock.cpp |
+++ b/Source/core/layout/LayoutBlock.cpp |
@@ -287,7 +287,7 @@ void LayoutBlock::styleWillChange(StyleDifference diff, const ComputedStyle& new |
} else if (!oldStyleIsContainer && (newStyle.position() != StaticPosition || newHasTransformRelatedProperty)) { |
// Remove our absolutely positioned descendants from their current containing block. |
// They will be inserted into our positioned objects list during layout. |
- if (LayoutBlock* cb = containingBlock()) |
+ if (LayoutBlock* cb = containerForAbsolutePosition()) |
cb->removePositionedObjects(this, NewContainingBlock); |
} |
} |
@@ -1512,6 +1512,7 @@ void LayoutBlock::insertPositionedObject(LayoutBox* o) |
{ |
ASSERT(!isAnonymousBlock()); |
insertIntoTrackedLayoutBoxMaps(o, gPositionedDescendantsMap, gPositionedContainerMap); |
+ ASSERT(gPositionedContainerMap->get(o)->size() == 1); |
} |
void LayoutBlock::removePositionedObject(LayoutBox* o) |