Index: content/renderer/input/main_thread_event_queue.cc |
diff --git a/content/renderer/input/main_thread_event_queue.cc b/content/renderer/input/main_thread_event_queue.cc |
index 772d3be1c6bc31a979561586ac353b966ba1780a..5fe5bff6786ccd2049a3735d2c9cca77ccac7d09 100644 |
--- a/content/renderer/input/main_thread_event_queue.cc |
+++ b/content/renderer/input/main_thread_event_queue.cc |
@@ -41,7 +41,8 @@ MainThreadEventQueue::MainThreadEventQueue( |
: routing_id_(routing_id), |
client_(client), |
is_flinging_(false), |
- main_task_runner_(main_task_runner) {} |
+ main_task_runner_(main_task_runner), |
+ waiting_for_first_touch_move_(false) {} |
MainThreadEventQueue::~MainThreadEventQueue() {} |
@@ -77,6 +78,21 @@ bool MainThreadEventQueue::HandleEvent( |
touch_event.dispatchType = |
blink::WebInputEvent::ListenersNonBlockingPassive; |
} |
+ if (is_flinging_ && |
dtapuska
2016/08/10 14:47:42
does |is_flinging_| change after the touch start?
|
+ touch_event.dispatchType == blink::WebInputEvent::Blocking) { |
+ bool touch_start_or_first_touch_move = false; |
+ if (event->type == blink::WebInputEvent::TouchStart) { |
+ waiting_for_first_touch_move_ = true; |
+ touch_start_or_first_touch_move = true; |
+ } else if (event->type == blink::WebInputEvent::TouchMove) { |
+ touch_start_or_first_touch_move = waiting_for_first_touch_move_; |
+ waiting_for_first_touch_move_ = false; |
+ } |
+ if (touch_start_or_first_touch_move) { |
+ touch_event.dispatchType = |
+ blink::WebInputEvent::ListenersForcedNonBlockingPassiveDueToFling; |
+ } |
+ } |
} |
if (is_wheel && non_blocking) { |
// Adjust the |dispatchType| on the event since the compositor |