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

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

Issue 2069713002: Make all gesture scrolls use customization path internally (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase + Fix test Created 4 years, 6 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/dom/Element.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 15eaf7ba9f5311b20e89f6e14f48044d98ce5bbd..e886c8a53694e6fd5e77f9e6a1bb21e3032d0f5e 100644
--- a/third_party/WebKit/Source/core/dom/Document.cpp
+++ b/third_party/WebKit/Source/core/dom/Document.cpp
@@ -195,6 +195,7 @@
#include "core/page/Page.h"
#include "core/page/PointerLockController.h"
#include "core/page/scrolling/RootScrollerController.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"
@@ -461,8 +462,12 @@ Document::Document(const DocumentInit& initializer, DocumentClassFlags documentC
ViewportScrollCallback* applyScroll = nullptr;
if (isInMainFrame()) {
applyScroll = RootScrollerController::createViewportApplyScroll(
- frameHost()->topControls(), frameHost()->overscrollController());
+ &frameHost()->topControls(), &frameHost()->overscrollController());
+ } else {
+ applyScroll =
+ RootScrollerController::createViewportApplyScroll(nullptr, nullptr);
}
+
m_rootScrollerController =
RootScrollerController::create(*this, applyScroll);
@@ -599,9 +604,17 @@ Element* Document::rootScroller() const
return m_rootScrollerController->get();
}
-bool Document::isEffectiveRootScroller(const Element& element) const
+const Element* Document::effectiveRootScroller() const
{
- return m_rootScrollerController->effectiveRootScroller() == element;
+ return m_rootScrollerController->effectiveRootScroller();
+}
+
+bool Document::isViewportScrollCallback(const ScrollStateCallback* callback)
+{
+ if (!callback)
+ return false;
+
+ return callback == m_rootScrollerController->viewportScrollCallback();
}
bool Document::isInMainFrame() const
« no previous file with comments | « third_party/WebKit/Source/core/dom/Document.h ('k') | third_party/WebKit/Source/core/dom/Element.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698