Index: Source/core/rendering/compositing/RenderLayerCompositor.cpp |
diff --git a/Source/core/rendering/compositing/RenderLayerCompositor.cpp b/Source/core/rendering/compositing/RenderLayerCompositor.cpp |
index 4aa993786998fa87c6b571a548360a1107fd89a6..17df3b16852292df13781b34555ccba0dd112864 100644 |
--- a/Source/core/rendering/compositing/RenderLayerCompositor.cpp |
+++ b/Source/core/rendering/compositing/RenderLayerCompositor.cpp |
@@ -727,7 +727,14 @@ bool RenderLayerCompositor::updateLayerIfViewportConstrained(RenderLayer* layer) |
bool RenderLayerCompositor::canSquashIntoCurrentSquashingOwner(const RenderLayer* layer, const RenderLayerCompositor::SquashingState& squashingState, const RenderLayer* clippingAncestor) |
{ |
ASSERT(clippingAncestor); |
- return clippingAncestor == squashingState.clippingAncestorForMostRecentMapping; |
+ if (clippingAncestor != squashingState.clippingAncestorForMostRecentMapping) |
+ return false; |
+ |
+ ASSERT(squashignState.hasMostRecentMapping); |
jbroman
2014/03/15 05:29:24
drive-by: squashingState not squashignState
chrishtr
2014/03/17 16:58:52
Done.
|
+ if (layer->scrollsWithRespectTo(&squashingState.mostRecentMapping->owningLayer())) |
+ return false; |
+ |
+ return true; |
} |
RenderLayerCompositor::CompositingStateTransitionType RenderLayerCompositor::computeCompositedLayerUpdate(RenderLayer* layer) |
@@ -952,15 +959,6 @@ void RenderLayerCompositor::computeCompositingRequirements(RenderLayer* ancestor |
reasonsToComposite |= overlapCompositingReason; |
- // If the layer is squashable, but would scroll differently than the |
- // most recent backing that it would squash onto, then don't squash it. |
- // Note that this happens before we know all possible compositing reasons |
- // for this layer, but it's OK because we're just forcing the layer conservatively |
- // to be separately composited rather than squashed, anyway. |
- if (currentRecursionData.m_mostRecentCompositedLayer && requiresSquashing(reasonsToComposite) |
- && layer->scrollsWithRespectTo(currentRecursionData.m_mostRecentCompositedLayer)) |
- reasonsToComposite |= CompositingReasonOverlapsWithoutSquashingTarget; |
- |
// The children of this layer don't need to composite, unless there is |
// a compositing layer among them, so start by inheriting the compositing |
// ancestor with m_subtreeIsCompositing set to false. |
@@ -1184,7 +1182,7 @@ void RenderLayerCompositor::assignLayersToBackingsInternal(RenderLayer* layer, S |
clippingAncestor = layer; |
if (layerSquashingEnabled() && requiresSquashing(layer->compositingReasons()) && !canSquashIntoCurrentSquashingOwner(layer, squashingState, clippingAncestor)) |
- layer->setCompositingReasons(layer->compositingReasons() | CompositingReasonOverlapsWithoutSquashingTarget); |
+ layer->setCompositingReasons(layer->compositingReasons() | CompositingReasonNoSquashingTargetFound); |
CompositingStateTransitionType compositedLayerUpdate = computeCompositedLayerUpdate(layer); |