Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index cabe639395f150f56f4b3e5a65cd40df4a5f5db7..225c434063713d46f9cda7c32fb5f9a49123bf03 100644 |
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -158,7 +158,7 @@ static void clearPositionConstraintExceptForLayer(GraphicsLayer* layer, Graphics |
static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* layer) |
{ |
- ASSERT(layer->isComposited()); |
+ ASSERT(layer->backing()); |
do { |
if (layer->renderer()->style()->position() == FixedPosition) { |
const RenderObject* fixedPositionObject = layer->renderer(); |
@@ -168,7 +168,10 @@ static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* l |
} |
layer = layer->parent(); |
- } while (layer && !layer->isComposited()); |
+ // FIXME: should this walk end at the first layer with any backing? Or should it end at the |
+ // first composited layer that does not paint into its ancestor? And what about for |
+ // squashed layers? For now, keeping this code equivalent to what it has been already. |
Ian Vollick
2013/10/01 19:46:22
My interpretation of this function:
If any layer
shawnsingh
2013/10/03 03:04:04
I'm not sure if your phrasing means the same thing
|
+ } while (layer && !layer->backing()); |
return WebLayerPositionConstraint(); |
} |
@@ -805,12 +808,12 @@ bool ScrollingCoordinator::hasVisibleSlowRepaintViewportConstrainedObjects(Frame |
return true; |
RenderLayer* layer = toRenderBoxModelObject(viewportConstrainedObject)->layer(); |
// Any explicit reason that a fixed position element is not composited shouldn't cause slow scrolling. |
- if (!layer->isComposited() && layer->viewportConstrainedNotCompositedReason() == RenderLayer::NoNotCompositedReason) |
+ if (layer->compositingState() != PaintsIntoOwnBacking && layer->viewportConstrainedNotCompositedReason() == RenderLayer::NoNotCompositedReason) |
return true; |
// Composited layers that actually paint into their enclosing ancestor |
// must also force main thread scrolling. |
- if (layer->isComposited() && layer->backing()->paintsIntoCompositedAncestor()) |
+ if (layer->compositingState() == HasOwnBackingButPaintsIntoAncestor) |
return true; |
} |
return false; |