Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index 2e2af0ecf1b31a85f53d057fdb317d77d902120d..4104e050e58eaa3ba57162665f414a6435ee56ea 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->compositedLayerMapping()); |
+ ASSERT(layer->isComposited()); |
do { |
if (layer->renderer()->style()->position() == FixedPosition) { |
const RenderObject* fixedPositionObject = layer->renderer(); |
@@ -168,10 +168,7 @@ static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* l |
} |
layer = layer->parent(); |
- |
- // Composited layers that inherit a fixed position state will be positioned with respect to the nearest compositedLayerMapping's GraphicsLayer. |
- // So, once we find a layer that has its own compositedLayerMapping, we can stop searching for a fixed position RenderObject. |
- } while (layer && layer->compositedLayerMapping()); |
+ } while (layer && !layer->isComposited()); |
return WebLayerPositionConstraint(); |
} |
@@ -808,12 +805,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->compositingState() != PaintsIntoOwnBacking && layer->viewportConstrainedNotCompositedReason() == RenderLayer::NoNotCompositedReason) |
+ if (!layer->isComposited() && layer->viewportConstrainedNotCompositedReason() == RenderLayer::NoNotCompositedReason) |
return true; |
// Composited layers that actually paint into their enclosing ancestor |
// must also force main thread scrolling. |
- if (layer->compositingState() == HasOwnBackingButPaintsIntoAncestor) |
+ if (layer->isComposited() && layer->compositedLayerMapping()->paintsIntoCompositedAncestor()) |
return true; |
} |
return false; |