Index: content/browser/renderer_host/input/mouse_wheel_event_queue.cc |
diff --git a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc |
index 113fb42dfd9320b48cc975863a8423fe7ec313cf..0d92d81583175a3b6dd5283d9166ad93c27ad320 100644 |
--- a/content/browser/renderer_host/input/mouse_wheel_event_queue.cc |
+++ b/content/browser/renderer_host/input/mouse_wheel_event_queue.cc |
@@ -278,8 +278,17 @@ void MouseWheelEventQueue::OnGestureScrollEvent( |
gesture_event.event.type == |
blink::WebInputEvent::GestureFlingStart)) { |
scrolling_device_ = blink::WebGestureDeviceUninitialized; |
- if (scroll_end_timer_.IsRunning()) |
- scroll_end_timer_.Reset(); |
+ if (scroll_end_timer_.IsRunning()) { |
+ if (enable_scroll_latching_) { |
+ // Don't send the pending ScrollEnd if a fling is happening. |
+ // The next wheel event will still need a ScrollBegin. |
+ scroll_end_timer_.Stop(); |
+ needs_scroll_begin_ = true; |
+ needs_scroll_end_ = false; |
+ } else { |
+ scroll_end_timer_.Reset(); |
+ } |
+ } |
} |
} |