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

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

Issue 2128543002: Make ViewportScrollCallback an interface and add child and root classes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@moveViewportCreationToDocumentAttachment
Patch Set: 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 0c3e10fb35f43f9a63b827e27d697de605581876..39d54fe62c6f222b82c82ee8b5bf7127e05304a0 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -195,11 +195,12 @@
#include "core/page/FrameTree.h"
#include "core/page/Page.h"
#include "core/page/PointerLockController.h"
+#include "core/page/scrolling/ChildViewportScrollCallback.h"
#include "core/page/scrolling/RootScrollerController.h"
+#include "core/page/scrolling/RootViewportScrollCallback.h"
#include "core/page/scrolling/ScrollStateCallback.h"
#include "core/page/scrolling/ScrollingCoordinator.h"
#include "core/page/scrolling/SnapCoordinator.h"
-#include "core/page/scrolling/ViewportScrollCallback.h"
#include "core/svg/SVGDocumentExtensions.h"
#include "core/svg/SVGScriptElement.h"
#include "core/svg/SVGTitleElement.h"
@@ -462,11 +463,11 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
ViewportScrollCallback* applyScroll = nullptr;
if (isInMainFrame()) {
- applyScroll = RootScrollerController::createViewportApplyScroll(
+ applyScroll = RootViewportScrollCallback::create(
&frameHost()->topControls(), &frameHost()->overscrollController());
} else {
applyScroll =
- RootScrollerController::createViewportApplyScroll(nullptr, nullptr);
+ ChildViewportScrollCallback::create();
}
m_rootScrollerController =

Powered by Google App Engine
This is Rietveld 408576698