Chromium Code Reviews| 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 52aed2ef694a61823640ae159c1ab72b35b0bfb6..cd239b64827d26fb96971e7b411c06daf7edfa83 100644 |
| --- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp |
| +++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp |
| @@ -65,7 +65,7 @@ DEFINE_TRACE(RootScrollerController) |
| void RootScrollerController::set(Element* newRootScroller) |
| { |
| m_rootScroller = newRootScroller; |
| - updateEffectiveRootScroller(); |
| + recomputeEffectiveRootScroller(); |
| } |
| Element* RootScrollerController::get() const |
| @@ -80,10 +80,15 @@ Element* RootScrollerController::effectiveRootScroller() const |
| void RootScrollerController::didUpdateLayout() |
| { |
| - updateEffectiveRootScroller(); |
| + recomputeEffectiveRootScroller(); |
| } |
| -void RootScrollerController::updateEffectiveRootScroller() |
| +void RootScrollerController::globalRootScrollerMayHaveChanged() |
| +{ |
| + NOTREACHED(); |
|
bokan
2016/08/29 13:27:10
This gets tripped in tests that use a remote main
|
| +} |
| + |
| +void RootScrollerController::recomputeEffectiveRootScroller() |
| { |
| bool rootScrollerValid = |
| m_rootScroller && isValidRootScroller(*m_rootScroller); |
| @@ -96,6 +101,9 @@ void RootScrollerController::updateEffectiveRootScroller() |
| return; |
| m_effectiveRootScroller = newEffectiveRootScroller; |
| + |
| + m_document->topDocument().rootScrollerController() |
| + ->globalRootScrollerMayHaveChanged(); |
| } |
| ScrollableArea* RootScrollerController::scrollableAreaFor( |
| @@ -141,21 +149,8 @@ void RootScrollerController::didAttachDocument() |
| 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; |
| + NOTREACHED(); |
| + return nullptr; |
| } |
| bool RootScrollerController::isViewportScrollCallback( |