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

Unified Diff: third_party/WebKit/Source/core/input/EventHandler.cpp

Issue 1646663002: Refactor Scroll Customization to share cc::ScrollStateData with blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix linking more. Created 4 years, 10 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/input/EventHandler.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandler.cpp b/third_party/WebKit/Source/core/input/EventHandler.cpp
index 5ec337e655cfa8a1cfe03b4df1cb535a050dfb01..0d438b8b165014a6b3c13ff556f310131cc0ddcd 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -2440,8 +2440,13 @@ WebInputEventResult EventHandler::handleGestureScrollEnd(const PlatformGestureEv
passScrollGestureEventToWidget(gestureEvent, node->layoutObject());
if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) {
RefPtrWillBeRawPtr<ScrollState> scrollState = ScrollState::create(
- 0, 0, 0, 0, 0, gestureEvent.inertial(), /* isBeginning */
- false, /* isEnding */ true, /* fromUserInput */ true);
+ 0 /* deltaX */, 0 /* deltaY */,
+ gestureEvent.position().x(), gestureEvent.position().y(),
+ 0 /* velocityX*/, 0 /* velocityY */,
+ false /* isBeginning */, gestureEvent.inertial(), true /* isEnding */,
+ false /* shouldPropagate */, true /* fromUserInput */,
+ true /* isDirectManipulation */, 0 /* deltaGranularity*/,
+ m_deltaConsumedForScrollSequence);
customizedScroll(*node.get(), *scrollState);
}
}
@@ -2477,8 +2482,13 @@ WebInputEventResult EventHandler::handleGestureScrollBegin(const PlatformGesture
if (RuntimeEnabledFeatures::scrollCustomizationEnabled()) {
m_currentScrollChain.clear();
RefPtrWillBeRawPtr<ScrollState> scrollState = ScrollState::create(
- 0, 0, 0, 0, 0, /* inInertialPhase */ false, /* isBeginning */
- true, /* isEnding */ false, /* fromUserInput */ true);
+ 0 /* deltaX */, 0 /* deltaY */,
+ gestureEvent.position().x(), gestureEvent.position().y(),
+ 0 /* velocityX*/, 0 /* velocityY */,
+ true /* isBeginning */, false /* inertial */, false /* isEnding */,
+ false /* shouldPropagate */, true /* fromUserInput */,
+ true /* isDirectManipulation */, 0 /* deltaGranularity*/,
+ m_deltaConsumedForScrollSequence);
customizedScroll(*m_scrollGestureHandlingNode.get(), *scrollState);
} else {
if (m_frame->isMainFrame())
@@ -2557,10 +2567,12 @@ WebInputEventResult EventHandler::handleGestureScrollUpdate(const PlatformGestur
if (handleScrollCustomization) {
RefPtrWillBeRawPtr<ScrollState> scrollState = ScrollState::create(
gestureEvent.deltaX(), gestureEvent.deltaY(),
- 0, gestureEvent.velocityX(), gestureEvent.velocityY(),
- gestureEvent.inertial(), /* isBeginning */
- false, /* isEnding */ false, /* fromUserInput */ true,
- !gestureEvent.preventPropagation(), m_deltaConsumedForScrollSequence);
+ gestureEvent.position().x(), gestureEvent.position().y(),
+ gestureEvent.velocityX(), gestureEvent.velocityY(),
+ false /* isBeginning */, gestureEvent.inertial(), false /* isEnding */,
+ !gestureEvent.preventPropagation(), true /* fromUserInput */,
+ true /* isDirectManipulation */, 0 /* deltaGranularity*/,
+ m_deltaConsumedForScrollSequence);
if (m_previousGestureScrolledNode) {
// The ScrollState needs to know what the current
// native scrolling element is, so that for an

Powered by Google App Engine
This is Rietveld 408576698