Index: content/browser/renderer_host/input/touch_disposition_gesture_filter.cc |
diff --git a/content/browser/renderer_host/input/touch_disposition_gesture_filter.cc b/content/browser/renderer_host/input/touch_disposition_gesture_filter.cc |
index 36de573810acd82f49292c4dc797bc485433b556..869565429b71d3a50744e245a659e68f70f8feb6 100644 |
--- a/content/browser/renderer_host/input/touch_disposition_gesture_filter.cc |
+++ b/content/browser/renderer_host/input/touch_disposition_gesture_filter.cc |
@@ -105,7 +105,8 @@ TouchDispositionGestureFilter::TouchDispositionGestureFilter( |
TouchDispositionGestureFilterClient* client) |
: client_(client), |
needs_tap_ending_event_(false), |
- needs_fling_ending_event_(false) { |
+ needs_fling_ending_event_(false), |
+ needs_scroll_ending_event_(false) { |
DCHECK(client_); |
} |
@@ -212,10 +213,15 @@ void TouchDispositionGestureFilter::SendGesture(const WebGestureEvent& event) { |
case WebInputEvent::GestureScrollBegin: |
CancelTapIfNecessary(); |
CancelFlingIfNecessary(); |
+ needs_scroll_ending_event_ = true; |
+ break; |
+ case WebInputEvent::GestureScrollEnd: |
+ needs_scroll_ending_event_ = false; |
break; |
case WebInputEvent::GestureFlingStart: |
CancelFlingIfNecessary(); |
needs_fling_ending_event_ = true; |
+ needs_scroll_ending_event_ = false; |
break; |
case WebInputEvent::GestureFlingCancel: |
needs_fling_ending_event_ = false; |
@@ -242,6 +248,14 @@ void TouchDispositionGestureFilter::CancelFlingIfNecessary() { |
DCHECK(!needs_fling_ending_event_); |
} |
+void TouchDispositionGestureFilter::EndScrollIfNecessary() { |
+ if (!needs_scroll_ending_event_) |
+ return; |
+ |
+ SendGesture(CreateGesture(WebInputEvent::GestureScrollEnd)); |
+ DCHECK(!needs_scroll_ending_event_); |
+} |
+ |
// TouchDispositionGestureFilter::GestureSequence |
TouchDispositionGestureFilter::GestureSequence::GestureHandlingState:: |