| Index: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| diff --git a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| index 9bac01d863e387845dede9541d8f7e159b76facb..4d4f495ffd56a3c3d95f108474546c299a0c0c61 100644
|
| --- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| +++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
|
| @@ -9,11 +9,14 @@
|
| #include "core/frame/FrameHost.h"
|
| #include "core/frame/FrameView.h"
|
| #include "core/frame/TopControls.h"
|
| +#include "core/frame/VisualViewport.h"
|
| #include "core/layout/LayoutBox.h"
|
| +#include "core/page/ChromeClient.h"
|
| #include "core/page/Page.h"
|
| #include "core/page/scrolling/OverscrollController.h"
|
| #include "core/page/scrolling/ViewportScrollCallback.h"
|
| #include "core/paint/PaintLayerScrollableArea.h"
|
| +#include "platform/graphics/GraphicsLayer.h"
|
| #include "platform/scroll/ScrollableArea.h"
|
|
|
| namespace blink {
|
| @@ -160,6 +163,34 @@ bool RootScrollerController::moveViewportApplyScroll(Element* target)
|
| return true;
|
| }
|
|
|
| +void RootScrollerController::didUpdateCompositing()
|
| +{
|
| + FrameHost& frameHost = *m_document->frameHost();
|
| +
|
| + // Let the compositor-side counterpart know about this change.
|
| + if (m_document->isInMainFrame())
|
| + frameHost.chromeClient().registerViewportLayers();
|
| +}
|
| +
|
| +GraphicsLayer* RootScrollerController::rootScrollerLayer()
|
| +{
|
| + if (!m_effectiveRootScroller)
|
| + return nullptr;
|
| +
|
| + ScrollableArea* area = scrollableAreaFor(*m_effectiveRootScroller);
|
| +
|
| + if (!area)
|
| + return nullptr;
|
| +
|
| + GraphicsLayer* graphicsLayer = area->layerForScrolling();
|
| +
|
| + // TODO(bokan): We should assert graphicsLayer here and
|
| + // RootScrollerController should do whatever needs to happen to ensure
|
| + // the root scroller gets composited.
|
| +
|
| + return graphicsLayer;
|
| +}
|
| +
|
| Element* RootScrollerController::defaultEffectiveRootScroller()
|
| {
|
| DCHECK(m_document);
|
|
|