| 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) {
|
|
|