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); |
} |