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

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: Replace the layout viewport with the root scroller 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
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 39d54fe62c6f222b82c82ee8b5bf7127e05304a0..ae4c4b7244826ac9a9fa6fcb06541a987503f922 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();

Powered by Google App Engine
This is Rietveld 408576698