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

Unified Diff: Source/core/rendering/compositing/CompositedLayerMapping.cpp

Issue 218313002: Revert of Put the squashing layer underneath the ancestor clipping layer if present. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 9 months 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/compositing/CompositedLayerMapping.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/compositing/CompositedLayerMapping.cpp
diff --git a/Source/core/rendering/compositing/CompositedLayerMapping.cpp b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
index 7a67e4caed9214ffd420db7074fde67742d0eb04..f03f62614a7c6c6d19eca779878a3618ab8fa14f 100644
--- a/Source/core/rendering/compositing/CompositedLayerMapping.cpp
+++ b/Source/core/rendering/compositing/CompositedLayerMapping.cpp
@@ -878,11 +878,7 @@
}
}
- {
- IntPoint squashingDelta(delta);
- squashingDelta.moveBy(-graphicsLayerParentLocation);
- updateSquashingLayerGeometry(squashingDelta);
- }
+ updateSquashingLayerGeometry(delta);
if (m_owningLayer.scrollableArea() && m_owningLayer.scrollableArea()->scrollsOverflow())
m_owningLayer.scrollableArea()->positionOverflowControls();
@@ -974,16 +970,16 @@
// The squashing containment layer, if it exists, becomes a no-op parent.
if (m_squashingLayer) {
ASSERT(compositor()->layerSquashingEnabled());
- ASSERT((m_ancestorClippingLayer && !m_squashingContainmentLayer) || (!m_ancestorClippingLayer && m_squashingContainmentLayer));
-
- if (m_squashingContainmentLayer) {
- m_squashingContainmentLayer->removeAllChildren();
+ ASSERT(m_squashingContainmentLayer);
+
+ m_squashingContainmentLayer->removeAllChildren();
+
+ if (m_ancestorClippingLayer)
+ m_squashingContainmentLayer->addChild(m_ancestorClippingLayer.get());
+ else
m_squashingContainmentLayer->addChild(m_graphicsLayer.get());
- m_squashingContainmentLayer->addChild(m_squashingLayer.get());
- } else {
- // The ancestor clipping layer is already set up and has m_graphicsLayer under it.
- m_ancestorClippingLayer->addChild(m_squashingLayer.get());
- }
+
+ m_squashingContainmentLayer->addChild(m_squashingLayer.get());
}
}
@@ -1463,23 +1459,23 @@
m_squashingLayer->setDrawsContent(true);
// FIXME: containment layer needs a new CompositingReason, CompositingReasonOverlap is not appropriate.
- if (!m_ancestorClippingLayer)
- m_squashingContainmentLayer = createGraphicsLayer(CompositingReasonLayerForSquashingContainer);
+ m_squashingContainmentLayer = createGraphicsLayer(CompositingReasonLayerForSquashingContainer);
layersChanged = true;
}
- ASSERT(m_squashingLayer);
+ ASSERT(m_squashingLayer && m_squashingContainmentLayer);
} else {
if (m_squashingLayer) {
m_squashingLayer->removeFromParent();
m_squashingLayer = nullptr;
- layersChanged = true;
- }
- if (m_squashingContainmentLayer) {
+ // FIXME: do we need to invalidate something here?
+
+ ASSERT(m_squashingContainmentLayer);
m_squashingContainmentLayer->removeFromParent();
m_squashingContainmentLayer = nullptr;
layersChanged = true;
}
+
ASSERT(!m_squashingLayer && !m_squashingContainmentLayer);
}
« no previous file with comments | « Source/core/rendering/compositing/CompositedLayerMapping.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698