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

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: Top Controls Work From Iframes 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..0710be557c637b99ac14b62d953b6e8a0ad11964 100644
--- a/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/RootScrollerController.cpp
@@ -83,6 +83,11 @@ void RootScrollerController::didUpdateLayout()
updateEffectiveRootScroller();
}
+void RootScrollerController::globalRootScrollerMayHaveChanged()
+{
+ NOTREACHED();
+}
+
void RootScrollerController::updateEffectiveRootScroller()
{
bool rootScrollerValid =
@@ -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()
tdresser 2016/08/25 19:46:37 Move to TopDocumentRootScrollerController only?
bokan 2016/08/26 19:35:04 Will do in follow up.
{
- 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