Index: Source/core/page/scrolling/ScrollingCoordinator.cpp |
diff --git a/Source/core/page/scrolling/ScrollingCoordinator.cpp b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
index 1bfd1b4189819e4f7894d9705a92eafd8dfe18a5..6c96609eafc5854ecc38cf9c10db3d65a129cf29 100644 |
--- a/Source/core/page/scrolling/ScrollingCoordinator.cpp |
+++ b/Source/core/page/scrolling/ScrollingCoordinator.cpp |
@@ -199,7 +199,7 @@ static void clearPositionConstraintExceptForLayer(GraphicsLayer* layer, Graphics |
static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* layer) |
{ |
- ASSERT(layer->hasCompositedLayerMapping()); |
+ ASSERT(layer->compositedLayerMapping()); |
do { |
if (layer->renderer()->style()->position() == FixedPosition) { |
const RenderObject* fixedPositionObject = layer->renderer(); |
@@ -212,14 +212,14 @@ static WebLayerPositionConstraint computePositionConstraint(const RenderLayer* l |
// 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->hasCompositedLayerMapping()); |
+ } while (layer && !layer->compositedLayerMapping()); |
return WebLayerPositionConstraint(); |
} |
void ScrollingCoordinator::updateLayerPositionConstraint(RenderLayer* layer) |
{ |
- ASSERT(layer->hasCompositedLayerMapping()); |
CompositedLayerMapping* compositedLayerMapping = layer->compositedLayerMapping(); |
+ ASSERT(compositedLayerMapping); |
GraphicsLayer* mainLayer = compositedLayerMapping->childForSuperlayers(); |
// Avoid unnecessary commits |
@@ -606,8 +606,12 @@ void ScrollingCoordinator::touchEventTargetRectsDidChange() |
void ScrollingCoordinator::updateScrollParentForGraphicsLayer(GraphicsLayer* child, RenderLayer* parent) |
{ |
WebLayer* scrollParentWebLayer = nullptr; |
- if (parent && parent->hasCompositedLayerMapping()) |
- scrollParentWebLayer = toWebLayer(parent->compositedLayerMapping()->scrollingContentsLayer()); |
+ |
+ if (parent) { |
+ CompositedLayerMapping* compositedLayerMapping = parent->compositedLayerMapping(); |
+ if (compositedLayerMapping) |
+ scrollParentWebLayer = toWebLayer(compositedLayerMapping->scrollingContentsLayer()); |
+ } |
child->setScrollParent(scrollParentWebLayer); |
} |
@@ -615,8 +619,12 @@ void ScrollingCoordinator::updateScrollParentForGraphicsLayer(GraphicsLayer* chi |
void ScrollingCoordinator::updateClipParentForGraphicsLayer(GraphicsLayer* child, RenderLayer* parent) |
{ |
WebLayer* clipParentWebLayer = nullptr; |
- if (parent && parent->hasCompositedLayerMapping()) |
- clipParentWebLayer = toWebLayer(parent->compositedLayerMapping()->parentForSublayers()); |
+ |
+ if (parent) { |
+ CompositedLayerMapping* compositedLayerMapping = parent->compositedLayerMapping(); |
+ if (compositedLayerMapping) |
+ clipParentWebLayer = toWebLayer(compositedLayerMapping->parentForSublayers()); |
+ } |
child->setClipParent(clipParentWebLayer); |
} |