| Index: third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
|
| index 0df4cb7aabb8047047a3bfbd2eb54706e09d2341..5fe741f854763cfcd01ec40b6d637b6c10f2e528 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
|
| @@ -110,6 +110,7 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
|
|
| if (updateType == ForceUpdate) {
|
| PaintLayer::AncestorDependentCompositingInputs properties;
|
| + PaintLayer::RareAncestorDependentCompositingInputs rareProperties;
|
|
|
| if (!layer->isRootLayer()) {
|
| properties.clippedAbsoluteBoundingBox = enclosingIntRect(m_geometryMap.absoluteRect(FloatRect(layer->boundingBoxForCompositingOverlapTest())));
|
| @@ -123,11 +124,11 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
| properties.clippedAbsoluteBoundingBox.intersect(clipRect);
|
|
|
| const PaintLayer* parent = layer->parent();
|
| - properties.opacityAncestor = parent->isTransparent() ? parent : parent->opacityAncestor();
|
| - properties.transformAncestor = parent->hasTransformRelatedProperty() ? parent : parent->transformAncestor();
|
| - properties.filterAncestor = parent->hasFilter() ? parent : parent->filterAncestor();
|
| + rareProperties.opacityAncestor = parent->isTransparent() ? parent : parent->opacityAncestor();
|
| + rareProperties.transformAncestor = parent->hasTransformRelatedProperty() ? parent : parent->transformAncestor();
|
| + rareProperties.filterAncestor = parent->hasFilter() ? parent : parent->filterAncestor();
|
| bool layerIsFixedPosition = layer->layoutObject()->style()->position() == FixedPosition;
|
| - properties.nearestFixedPositionLayer = layerIsFixedPosition ? layer : parent->nearestFixedPositionLayer();
|
| + rareProperties.nearestFixedPositionLayer = layerIsFixedPosition ? layer : parent->nearestFixedPositionLayer();
|
|
|
| if (info.hasAncestorWithClipRelatedProperty) {
|
| const PaintLayer* parentLayerOnClippingContainerChain = findParentLayerOnClippingContainerChain(layer);
|
| @@ -139,25 +140,24 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
| const LayoutObject* containingBlock = layer->layoutObject()->containingBlock();
|
| const PaintLayer* parentLayerOnContainingBlockChain = findParentLayerOnContainingBlockChain(containingBlock);
|
|
|
| - properties.ancestorScrollingLayer = parentLayerOnContainingBlockChain->ancestorScrollingLayer();
|
| + rareProperties.ancestorScrollingLayer = parentLayerOnContainingBlockChain->ancestorScrollingLayer();
|
| if (parentLayerOnContainingBlockChain->scrollsOverflow())
|
| - properties.ancestorScrollingLayer = parentLayerOnContainingBlockChain;
|
| + rareProperties.ancestorScrollingLayer = parentLayerOnContainingBlockChain;
|
|
|
| if (layer->layoutObject()->isOutOfFlowPositioned() && !layer->subtreeIsInvisible()) {
|
| const PaintLayer* clippingLayer = properties.clippingContainer ? properties.clippingContainer->enclosingLayer() : layer->compositor()->rootLayer();
|
| if (hasClippedStackingAncestor(layer, clippingLayer))
|
| - properties.clipParent = clippingLayer;
|
| + rareProperties.clipParent = clippingLayer;
|
| }
|
|
|
| if (layer->stackingNode()->isTreatedAsOrStackingContext()
|
| - && properties.ancestorScrollingLayer
|
| - && !info.ancestorStackingContext->layoutObject()->isDescendantOf(properties.ancestorScrollingLayer->layoutObject()))
|
| - properties.scrollParent = properties.ancestorScrollingLayer;
|
| + && rareProperties.ancestorScrollingLayer
|
| + && !info.ancestorStackingContext->layoutObject()->isDescendantOf(rareProperties.ancestorScrollingLayer->layoutObject()))
|
| + rareProperties.scrollParent = rareProperties.ancestorScrollingLayer;
|
| }
|
| }
|
|
|
| - properties.hasAncestorWithClipPath = info.hasAncestorWithClipPath;
|
| - layer->updateAncestorDependentCompositingInputs(properties);
|
| + layer->updateAncestorDependentCompositingInputs(properties, rareProperties, info.hasAncestorWithClipPath);
|
| }
|
|
|
| if (layer->stackingNode()->isStackingContext())
|
| @@ -172,15 +172,16 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
| if (layer->layoutObject()->hasClipPath())
|
| info.hasAncestorWithClipPath = true;
|
|
|
| - PaintLayer::DescendantDependentCompositingInputs descendantProperties;
|
| + bool hasDescendantWithClipPath = false;
|
| + bool hasNonIsolatedDescendantWithBlendMode = false;
|
| for (PaintLayer* child = layer->firstChild(); child; child = child->nextSibling()) {
|
| updateRecursive(child, updateType, info);
|
|
|
| - descendantProperties.hasDescendantWithClipPath |= child->hasDescendantWithClipPath() || child->layoutObject()->hasClipPath();
|
| - descendantProperties.hasNonIsolatedDescendantWithBlendMode |= (!child->stackingNode()->isStackingContext() && child->hasNonIsolatedDescendantWithBlendMode()) || child->layoutObject()->style()->hasBlendMode();
|
| + hasDescendantWithClipPath |= child->hasDescendantWithClipPath() || child->layoutObject()->hasClipPath();
|
| + hasNonIsolatedDescendantWithBlendMode |= (!child->stackingNode()->isStackingContext() && child->hasNonIsolatedDescendantWithBlendMode()) || child->layoutObject()->style()->hasBlendMode();
|
| }
|
|
|
| - layer->updateDescendantDependentCompositingInputs(descendantProperties);
|
| + layer->updateDescendantDependentCompositingInputs(hasDescendantWithClipPath, hasNonIsolatedDescendantWithBlendMode);
|
| layer->didUpdateCompositingInputs();
|
|
|
| m_geometryMap.popMappingsToAncestor(layer->parent());
|
|
|