| Index: Source/core/rendering/compositing/GraphicsLayerTreeBuilder.cpp
|
| diff --git a/Source/core/rendering/compositing/GraphicsLayerTreeBuilder.cpp b/Source/core/rendering/compositing/GraphicsLayerTreeBuilder.cpp
|
| index c0358877e2e092eafc79a5f5379ccc1e2b3009f4..d99f45f91aeb1276eaa696a9f92df639af8cf0c5 100644
|
| --- a/Source/core/rendering/compositing/GraphicsLayerTreeBuilder.cpp
|
| +++ b/Source/core/rendering/compositing/GraphicsLayerTreeBuilder.cpp
|
| @@ -69,14 +69,13 @@ void GraphicsLayerTreeBuilder::rebuild(RenderLayer& layer, AncestorInfo info)
|
|
|
| layer.stackingNode()->updateLayerListsIfNeeded();
|
|
|
| - const bool hasCompositedLayerMapping = layer.hasCompositedLayerMapping();
|
| CompositedLayerMapping* currentCompositedLayerMapping = layer.compositedLayerMapping();
|
|
|
| // If this layer has a compositedLayerMapping, then that is where we place subsequent children GraphicsLayers.
|
| // Otherwise children continue to append to the child list of the enclosing layer.
|
| GraphicsLayerVector layerChildren;
|
| AncestorInfo infoForChildren(info);
|
| - if (hasCompositedLayerMapping) {
|
| + if (currentCompositedLayerMapping) {
|
| infoForChildren.childLayersOfEnclosingCompositedLayer = &layerChildren;
|
| infoForChildren.enclosingCompositedLayer = &layer;
|
| }
|
| @@ -91,7 +90,7 @@ void GraphicsLayerTreeBuilder::rebuild(RenderLayer& layer, AncestorInfo info)
|
| rebuild(*curNode->layer(), infoForChildren);
|
|
|
| // If a negative z-order child is compositing, we get a foreground layer which needs to get parented.
|
| - if (hasCompositedLayerMapping && currentCompositedLayerMapping->foregroundLayer())
|
| + if (currentCompositedLayerMapping && currentCompositedLayerMapping->foregroundLayer())
|
| infoForChildren.childLayersOfEnclosingCompositedLayer->append(currentCompositedLayerMapping->foregroundLayer());
|
| }
|
|
|
| @@ -99,7 +98,7 @@ void GraphicsLayerTreeBuilder::rebuild(RenderLayer& layer, AncestorInfo info)
|
| while (RenderLayerStackingNode* curNode = iterator.next())
|
| rebuild(*curNode->layer(), infoForChildren);
|
|
|
| - if (hasCompositedLayerMapping) {
|
| + if (currentCompositedLayerMapping) {
|
| bool parented = false;
|
| if (layer.renderer()->isRenderPart())
|
| parented = RenderLayerCompositor::parentFrameContentLayers(toRenderPart(layer.renderer()));
|
| @@ -131,11 +130,14 @@ void GraphicsLayerTreeBuilder::rebuild(RenderLayer& layer, AncestorInfo info)
|
| info.childLayersOfEnclosingCompositedLayer->append(currentCompositedLayerMapping->childForSuperlayers());
|
| }
|
|
|
| - if (layer.scrollParent()
|
| - && layer.scrollParent()->hasCompositedLayerMapping()
|
| - && layer.scrollParent()->compositedLayerMapping()->needsToReparentOverflowControls()
|
| - && layer.scrollParent()->scrollableArea()->topmostScrollChild() == &layer)
|
| - info.childLayersOfEnclosingCompositedLayer->append(layer.scrollParent()->compositedLayerMapping()->detachLayerForOverflowControls(*info.enclosingCompositedLayer));
|
| + if (!layer.scrollParent())
|
| + return;
|
| +
|
| + CompositedLayerMapping* scrollParentCompositedLayerMapping = layer.scrollParent()->compositedLayerMapping();
|
| + if (layer.scrollParent()->scrollableArea()->topmostScrollChild() == &layer
|
| + &&scrollParentCompositedLayerMapping
|
| + && scrollParentCompositedLayerMapping->needsToReparentOverflowControls())
|
| + info.childLayersOfEnclosingCompositedLayer->append(scrollParentCompositedLayerMapping->detachLayerForOverflowControls(*info.enclosingCompositedLayer));
|
| }
|
|
|
| }
|
|
|