Chromium Code Reviews| Index: content/browser/renderer_host/input/input_router_impl.cc |
| diff --git a/content/browser/renderer_host/input/input_router_impl.cc b/content/browser/renderer_host/input/input_router_impl.cc |
| index e6ddcd9ed7f0604b966f382d39266f4c7ed7f984..aee5c790312e7dc4df10be8465c4e4c8bca47332 100644 |
| --- a/content/browser/renderer_host/input/input_router_impl.cc |
| +++ b/content/browser/renderer_host/input/input_router_impl.cc |
| @@ -83,6 +83,7 @@ InputRouterImpl::InputRouterImpl(IPC::Sender* sender, |
| current_ack_source_(ACK_SOURCE_NONE), |
| flush_requested_(false), |
| active_renderer_fling_count_(0), |
| + touch_scroll_started_sent_(false), |
| wheel_event_queue_(this, |
| UseGestureBasedWheelScrolling(), |
| kDefaultWheelScrollTransactionMs), |
| @@ -161,8 +162,18 @@ void InputRouterImpl::SendGestureEvent( |
| wheel_event_queue_.OnGestureScrollEvent(gesture_event); |
| if (gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchscreen) { |
| - if (gesture_event.event.type == blink::WebInputEvent::GestureScrollBegin) |
| + if (gesture_event.event.type == blink::WebInputEvent::GestureScrollBegin) { |
| + touch_scroll_started_sent_ = false; |
| + } else if(!touch_scroll_started_sent_ |
| + && gesture_event.event.type == |
| + blink::WebInputEvent::GestureScrollUpdate) { |
| + // A touch scroll hasn't really started until the first |
| + // GestureScrollUpdate event. Eg. if the page consumes all touchmoves |
| + // then no scrolling really ever occurs (even though we still send |
| + // GestureScrollBegin). |
| touch_event_queue_.PrependTouchScrollNotification(); |
|
mustaq
2016/05/24 15:54:05
Originally when PrependTouchScrollNotification() w
Rick Byers
2016/05/24 20:29:21
No, in the common case the first GestureScrollUpda
|
| + touch_scroll_started_sent_ = true; |
| + } |
| touch_event_queue_.OnGestureScrollEvent(gesture_event); |
| } |