Index: Source/core/rendering/RenderLayer.cpp |
diff --git a/Source/core/rendering/RenderLayer.cpp b/Source/core/rendering/RenderLayer.cpp |
index 0f135d3588e9d45dae43856a9782ce5ec12f7086..454dad0fa0189c10750907a412feaad577ec0755 100644 |
--- a/Source/core/rendering/RenderLayer.cpp |
+++ b/Source/core/rendering/RenderLayer.cpp |
@@ -535,6 +535,13 @@ void RenderLayer::updatePagination() |
} |
} |
+void RenderLayer::clearPaginationRecursive() |
+{ |
+ m_enclosingPaginationLayer = 0; |
+ for (RenderLayer* child = firstChild(); child; child = child->nextSibling()) |
+ child->clearPaginationRecursive(); |
+} |
+ |
LayoutPoint RenderLayer::positionFromPaintInvalidationBacking(const RenderObject* renderObject, const RenderLayerModelObject* paintInvalidationContainer, const PaintInvalidationState* paintInvalidationState) |
{ |
FloatPoint point = renderObject->localToContainerPoint(FloatPoint(), paintInvalidationContainer, 0, 0, paintInvalidationState); |
@@ -1239,6 +1246,9 @@ RenderLayer* RenderLayer::removeChild(RenderLayer* oldChild) |
if (oldChild->m_hasVisibleContent || oldChild->m_hasVisibleDescendant) |
dirtyAncestorChainVisibleDescendantStatus(); |
+ if (oldChild->enclosingPaginationLayer()) |
+ oldChild->clearPaginationRecursive(); |
+ |
return oldChild; |
} |