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

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: Rebase 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 063abb03f90b2b3e0d45974732d43eafb74beb80..404aa19578c1ea05a6455f1637beee564da6d90c 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 =
« no previous file with comments | « third_party/WebKit/Source/core/core.gypi ('k') | third_party/WebKit/Source/core/page/scrolling/ChildViewportScrollCallback.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698