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

Unified Diff: third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp

Issue 1915783002: Move overscroll logic out of EventHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 8 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/page/scrolling/OverscrollController.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
diff --git a/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp b/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
index fce8208bd2576b646756614e7f21a0ec7c0a354a..3cef299eae114ab4788d3b722cfb54dc071cf4ad 100644
--- a/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
+++ b/third_party/WebKit/Source/core/page/scrolling/ViewportScrollCallback.cpp
@@ -12,6 +12,7 @@
#include "core/frame/VisualViewport.h"
#include "core/input/EventHandler.h"
#include "core/layout/api/LayoutViewItem.h"
+#include "core/page/scrolling/OverscrollController.h"
#include "core/page/scrolling/ScrollState.h"
#include "platform/geometry/FloatSize.h"
#include "platform/scroll/ScrollableArea.h"
@@ -61,6 +62,8 @@ void ViewportScrollCallback::handleEvent(ScrollState* state)
return;
TopControls& topControls = m_document->frameHost()->topControls();
+ OverscrollController& overscrollController =
+ m_document->frameHost()->overscrollController();
// Scroll top controls.
if (state->isBeginning())
@@ -90,9 +93,7 @@ void ViewportScrollCallback::handleEvent(ScrollState* state)
// Handle Overscroll.
FloatPoint position(state->positionX(), state->positionY());
FloatSize velocity(state->velocityX(), state->velocityY());
-
- m_document->frame()->eventHandler().handleOverscroll(
- result, position, velocity);
+ overscrollController.handleOverscroll(result, position, velocity);
// The viewport consumes everything.
state->consumeDeltaNative(
« no previous file with comments | « third_party/WebKit/Source/core/page/scrolling/OverscrollController.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698