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

Unified Diff: third_party/WebKit/Source/core/dom/Document.cpp

Issue 2128553002: Make rootScroller the layout viewport. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@viewportScrollCallbackInterface
Patch Set: Rebase + comment fix in test Created 4 years, 5 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
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/dom/Document.cpp
diff --git a/third_party/WebKit/Source/core/dom/Document.cpp b/third_party/WebKit/Source/core/dom/Document.cpp
index 404aa19578c1ea05a6455f1637beee564da6d90c..179c42293ac068b106321168aaac0d7ce5566771 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -461,17 +461,7 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
m_fetcher = ResourceFetcher::create(nullptr);
}
- ViewportScrollCallback* applyScroll = nullptr;
- if (isInMainFrame()) {
- applyScroll = RootViewportScrollCallback::create(
- &frameHost()->topControls(), &frameHost()->overscrollController());
- } else {
- applyScroll =
- ChildViewportScrollCallback::create();
- }
-
- m_rootScrollerController =
- RootScrollerController::create(*this, applyScroll);
+ m_rootScrollerController = RootScrollerController::create(*this);
// We depend on the url getting immediately set in subframes, but we
// also depend on the url NOT getting immediately set in opened windows.
@@ -601,6 +591,11 @@ void Document::setRootScroller(Element* newScroller, ExceptionState& exceptionSt
m_rootScrollerController->set(newScroller);
}
+void Document::initializeRootScroller(ViewportScrollCallback* callback)
+{
+ m_rootScrollerController->setViewportScrollCallback(callback);
+}
+
Element* Document::rootScroller() const
{
return m_rootScrollerController->get();
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/frame/FrameView.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698