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

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

Issue 1805063003: Handle gesture scroll events on scrollbars from Touchpad. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_regression_6
Patch Set: Add comment Created 4 years, 9 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 | « no previous file | third_party/WebKit/Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 3931b98fea8f8b8daeb2f8a700da9927d97d1f2b..43f74d7534f7f2bb0981829d3fda12e2cc84b10c 100644
--- a/third_party/WebKit/Source/core/input/EventHandler.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandler.cpp
@@ -1946,11 +1946,12 @@ WebInputEventResult EventHandler::handleGestureEventInFrame(const GestureEventWi
const PlatformGestureEvent& gestureEvent = targetedEvent.event();
if (scrollbar) {
- bool eventSwallowed = scrollbar->gestureEvent(gestureEvent);
- if (gestureEvent.type() == PlatformEvent::GestureTapDown && eventSwallowed)
- m_scrollbarHandlingScrollGesture = scrollbar;
- if (eventSwallowed)
+ bool shouldUpdateCapture = false;
+ if (scrollbar->gestureEvent(gestureEvent, &shouldUpdateCapture)) {
+ if (shouldUpdateCapture)
+ m_scrollbarHandlingScrollGesture = scrollbar;
return WebInputEventResult::HandledSuppressed;
+ }
}
if (eventTarget) {
@@ -2022,14 +2023,13 @@ WebInputEventResult EventHandler::handleGestureScrollEvent(const PlatformGesture
}
if (scrollbar) {
- bool eventSwallowed = scrollbar->gestureEvent(gestureEvent);
- if (gestureEvent.type() == PlatformEvent::GestureScrollEnd
- || gestureEvent.type() == PlatformEvent::GestureFlingStart
- || !eventSwallowed) {
- m_scrollbarHandlingScrollGesture = nullptr;
- }
- if (eventSwallowed)
+ bool shouldUpdateCapture = false;
+ if (scrollbar->gestureEvent(gestureEvent, &shouldUpdateCapture)) {
+ if (shouldUpdateCapture)
+ m_scrollbarHandlingScrollGesture = scrollbar;
return WebInputEventResult::HandledSuppressed;
+ }
+ m_scrollbarHandlingScrollGesture = nullptr;
}
if (eventTarget) {
« no previous file with comments | « no previous file | third_party/WebKit/Source/platform/scroll/Scrollbar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698