| 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 e94f3ec8911803f061737fb1dce147b7e788a518..66d5fa6119d49db32c93361d474a16d9c3d20298 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" | 
| @@ -97,6 +99,28 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd | 
| if (!layer->childNeedsCompositingInputsUpdate() && updateType != ForceUpdate) | 
| return; | 
|  | 
| +    const PaintLayer* previousOverflowLayer = layer->ancestorOverflowLayer(); | 
| +    layer->updateAncestorOverflowLayer(info.lastOverflowLayer); | 
| +    if (info.lastOverflowLayer && layer->needsCompositingInputsUpdate() && layer->layoutObject()->style()->position() == StickyPosition) { | 
| +        if (info.lastOverflowLayer != previousOverflowLayer) { | 
| +            // Old ancestor scroller should no longer have these constraints. | 
| +            ASSERT(!previousOverflowLayer || !previousOverflowLayer->getScrollableArea()->stickyConstraintsMap().contains(layer)); | 
| + | 
| +            if (info.lastOverflowLayer->isRootLayer()) | 
| +                layer->layoutObject()->view()->frameView()->addViewportConstrainedObject(layer->layoutObject()); | 
| +            else if (previousOverflowLayer && previousOverflowLayer->isRootLayer()) | 
| +                layer->layoutObject()->view()->frameView()->removeViewportConstrainedObject(layer->layoutObject()); | 
| +        } | 
| +        layer->layoutObject()->updateStickyPositionConstraints(); | 
| + | 
| +        // Sticky position constraints and ancestor overflow scroller affect | 
| +        // the sticky layer position, so we need to update it again here. | 
| +        // TODO(flackr): This should be refactored in the future to be clearer | 
| +        // (i.e. update layer position and ancestor inputs updates in the | 
| +        // same walk) | 
| +        layer->updateLayerPosition(); | 
| +    } | 
| + | 
| m_geometryMap.pushMappingsToAncestor(layer, layer->parent()); | 
|  | 
| if (layer->hasCompositedLayerMapping()) | 
| @@ -163,6 +187,9 @@ void CompositingInputsUpdater::updateRecursive(PaintLayer* layer, UpdateType upd | 
| if (layer->stackingNode()->isStackingContext()) | 
| info.ancestorStackingContext = layer; | 
|  | 
| +    if (layer->isRootLayer() || layer->layoutObject()->hasOverflowClip()) | 
| +        info.lastOverflowLayer = layer; | 
| + | 
| if (layer->scrollsOverflow()) | 
| info.lastScrollingAncestor = layer; | 
|  | 
|  |