Chromium Code Reviews| Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
| diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
| index 5df38d44cb0b49ccb0765c54baab7613979707fd..a214e26622c85ddd9a548f5fa5edc00ec9f6b13c 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,9 @@ static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* l |
| } |
| layer = layer->parent(); |
| - } while (layer && !layer->isComposited()); |
| + |
| + // This walk ends once we found the first layer that has its own backing. |
| + } while (layer && (layer->compositingState() == PaintsIntoOwnBacking || layer->compositingState() == HasOwnBackingButPaintsIntoAncestor)); |
|
Julien - ping for review
2013/10/03 20:08:36
Couldn't we use backing() here instead to be consi
shawnsingh
2013/10/07 11:45:04
Actually yes, I am reverting this back to using ba
|
| return WebLayerPositionConstraint(); |
| } |
| @@ -805,12 +807,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; |