Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(572)

Unified Diff: third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp

Issue 2281603002: Make document.rootScroller work properly across iframes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@splitRootScrollerController
Patch Set: ASSERT->EXPECT in tests Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..8fc0647065efa0b7900508e884af631613518610 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,14 @@ Element* RootScrollerController::effectiveRootScroller() const
void RootScrollerController::didUpdateLayout()
{
- updateEffectiveRootScroller();
+ recomputeEffectiveRootScroller();
}
-void RootScrollerController::updateEffectiveRootScroller()
+void RootScrollerController::globalRootScrollerMayHaveChanged()
+{
+}
+
+void RootScrollerController::recomputeEffectiveRootScroller()
{
bool rootScrollerValid =
m_rootScroller && isValidRootScroller(*m_rootScroller);
@@ -96,6 +100,9 @@ void RootScrollerController::updateEffectiveRootScroller()
return;
m_effectiveRootScroller = newEffectiveRootScroller;
+
+ m_document->topDocument().rootScrollerController()
+ ->globalRootScrollerMayHaveChanged();
}
ScrollableArea* RootScrollerController::scrollableAreaFor(
@@ -141,21 +148,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(

Powered by Google App Engine
This is Rietveld 408576698