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

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

Issue 68833004: Fix chicken and egg problem in composited bounds computation (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: . Created 7 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/CompositedLayerMapping.cpp ('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 f78fdbb8cd0b745c480cd3b63aefe0415c32752b..138492f7ba689979912345c5a6ca2640ba8c27ca 100644
--- a/Source/core/rendering/RenderLayer.cpp
+++ b/Source/core/rendering/RenderLayer.cpp
@@ -3600,6 +3600,14 @@ IntRect RenderLayer::calculateLayerBounds(const RenderLayer* ancestorLayer, cons
// This applies to all z-order lists below.
RenderLayerStackingNodeIterator iterator(*m_stackingNode.get(), AllChildren);
while (RenderLayerStackingNode* node = iterator.next()) {
+ // Node's compositing ancestor may have changed its draw content status
+ // prior to updating its bounds. The requires-own-backing-store-for-ancestor-reasons
+ // could be stale. Refresh them now.
+ if (node->layer()->hasCompositedLayerMapping()) {
+ RenderLayer* enclosingCompositingLayer = node->layer()->enclosingCompositingLayer(false);
+ node->layer()->compositedLayerMapping()->updateRequiresOwnBackingStoreForAncestorReasons(enclosingCompositingLayer);
+ }
+
if (flags & IncludeCompositedDescendants || !node->layer()->hasCompositedLayerMapping()) {
IntRect childUnionBounds = node->layer()->calculateLayerBounds(this, 0, descendantFlags);
unionBounds.unite(childUnionBounds);
« no previous file with comments | « Source/core/rendering/CompositedLayerMapping.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698