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

Unified Diff: Source/core/rendering/RenderLayer.cpp

Issue 744313002: Need to reset enclosingPaginationLayer when a RenderLayer is removed from the tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Put the expectation file in the right directory. Created 6 years, 1 month 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/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « Source/core/rendering/RenderLayer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698