| 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 5fe741f854763cfcd01ec40b6d637b6c10f2e528..52fc69583cee0420e45c17c314428c8d8f4420e4 100644
|
| --- a/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/compositing/CompositingInputsUpdater.cpp
|
| @@ -4,7 +4,9 @@
|
|
|
| #include "core/layout/compositing/CompositingInputsUpdater.h"
|
|
|
| +#include "core/frame/FrameView.h"
|
| #include "core/layout/LayoutBlock.h"
|
| +#include "core/layout/LayoutView.h"
|
| #include "core/layout/compositing/CompositedLayerMapping.h"
|
| #include "core/layout/compositing/PaintLayerCompositor.h"
|
| #include "core/paint/PaintLayer.h"
|
| @@ -25,7 +27,7 @@ CompositingInputsUpdater::~CompositingInputsUpdater()
|
| void CompositingInputsUpdater::update()
|
| {
|
| TRACE_EVENT0("blink", "CompositingInputsUpdater::update");
|
| - updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo());
|
| + updateRecursive(m_rootLayer, DoNotForceUpdate, AncestorInfo(m_rootLayer));
|
| }
|
|
|
| static const PaintLayer* findParentLayerOnClippingContainerChain(const PaintLayer* layer)
|
| @@ -136,9 +138,14 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
| properties.clippingContainer = parentHasClipRelatedProperty ? parentLayerOnClippingContainerChain->layoutObject() : parentLayerOnClippingContainerChain->clippingContainer();
|
| }
|
|
|
| + const LayoutObject* containingBlock = layer->layoutObject()->containingBlock();
|
| + const PaintLayer* parentLayerOnContainingBlockChain = findParentLayerOnContainingBlockChain(containingBlock);
|
| +
|
| + rareProperties.ancestorOverflowLayer = parentLayerOnContainingBlockChain->ancestorOverflowLayer();
|
| + if (parentLayerOnContainingBlockChain->layoutObject()->hasOverflowClip())
|
| + rareProperties.ancestorOverflowLayer = parentLayerOnContainingBlockChain;
|
| +
|
| if (info.lastScrollingAncestor) {
|
| - const LayoutObject* containingBlock = layer->layoutObject()->containingBlock();
|
| - const PaintLayer* parentLayerOnContainingBlockChain = findParentLayerOnContainingBlockChain(containingBlock);
|
|
|
| rareProperties.ancestorScrollingLayer = parentLayerOnContainingBlockChain->ancestorScrollingLayer();
|
| if (parentLayerOnContainingBlockChain->scrollsOverflow())
|
| @@ -155,6 +162,16 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
| && !info.ancestorStackingContext->layoutObject()->isDescendantOf(rareProperties.ancestorScrollingLayer->layoutObject()))
|
| rareProperties.scrollParent = rareProperties.ancestorScrollingLayer;
|
| }
|
| +
|
| + if (layer->layoutObject()->style()->position() == StickyPosition) {
|
| + if (info.lastOverflowLayer->isRootLayer())
|
| + layer->layoutObject()->view()->frameView()->addViewportConstrainedObject(layer->layoutObject());
|
| + else
|
| + layer->layoutObject()->view()->frameView()->removeViewportConstrainedObject(layer->layoutObject());
|
| + layer->layoutObject()->updateStickyPositionConstraints(info.lastOverflowLayer);
|
| + }
|
| + } else {
|
| + rareProperties.ancestorOverflowLayer = info.lastOverflowLayer;
|
| }
|
|
|
| layer->updateAncestorDependentCompositingInputs(properties, rareProperties, info.hasAncestorWithClipPath);
|
| @@ -163,6 +180,9 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd
|
| if (layer->stackingNode()->isStackingContext())
|
| info.ancestorStackingContext = layer;
|
|
|
| + if (layer->layoutObject()->hasOverflowClip())
|
| + info.lastOverflowLayer = layer;
|
| +
|
| if (layer->scrollsOverflow())
|
| info.lastScrollingAncestor = layer;
|
|
|
|
|