| Index: third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| diff --git a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| index 883758e27529c6b0d09f787ffbd90dbf53bc27f5..f46b29a9ebec2fb3b74f95cca29a52aec2a8c775 100644
|
| --- a/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| +++ b/third_party/WebKit/Source/core/layout/LayoutBoxModelObject.cpp
|
| @@ -424,15 +424,24 @@ void LayoutBoxModelObject::styleDidChange(StyleDifference diff,
|
| }
|
|
|
| void LayoutBoxModelObject::invalidateStickyConstraints() {
|
| - if (!layer())
|
| - return;
|
| + PaintLayer* enclosing = enclosingLayer();
|
| +
|
| + if (PaintLayerScrollableArea* scrollableArea =
|
| + enclosing->getScrollableArea()) {
|
| + scrollableArea->invalidateAllStickyConstraints();
|
| + // If this object doesn't have a layer and its enclosing layer is a scroller
|
| + // then we don't need to invalidate the sticky constraints on the ancestor
|
| + // scroller because the enclosing scroller won't have changed size.
|
| + if (!layer())
|
| + return;
|
| + }
|
|
|
| // This intentionally uses the stale ancestor overflow layer compositing input
|
| // as if we have saved constraints for this layer they were saved in the
|
| // previous frame.
|
| DisableCompositingQueryAsserts disabler;
|
| if (const PaintLayer* ancestorOverflowLayer =
|
| - layer()->ancestorOverflowLayer())
|
| + enclosing->ancestorOverflowLayer())
|
| ancestorOverflowLayer->getScrollableArea()
|
| ->invalidateAllStickyConstraints();
|
| }
|
|
|