Chromium Code Reviews| 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 10629f5593e3e5a7028b56e02a181aa9e221a275..2a0acffe9574d8aa4cc891654cf1a1baa2e0273d 100644 |
| --- a/content/renderer/input/main_thread_event_queue.cc |
| +++ b/content/renderer/input/main_thread_event_queue.cc |
| @@ -30,21 +30,33 @@ bool MainThreadEventQueue::HandleEvent( |
| : DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN; |
| if (event->type == blink::WebInputEvent::MouseWheel) { |
| + PendingMouseWheelEvent modified_dispatch_type_event = |
| + PendingMouseWheelEvent( |
| + *static_cast<const blink::WebMouseWheelEvent*>(event), latency, |
| + dispatch_type); |
| + |
| + // Adjust the |dispatchType| on the event since it was |
| + // adjusted by the compositor. |
|
tdresser
2016/04/20 13:20:10
Maybe "since the compositor determined all event l
dtapuska
2016/04/20 14:03:23
Done.
|
| + if (non_blocking) { |
| + modified_dispatch_type_event.event.dispatchType = |
| + blink::WebInputEvent::ListenersNonBlockingPassive; |
| + } |
| + |
| if (wheel_events_.state() == WebInputEventQueueState::ITEM_PENDING) { |
| - wheel_events_.Queue(PendingMouseWheelEvent( |
| - *static_cast<const blink::WebMouseWheelEvent*>(event), latency, |
| - dispatch_type)); |
| + wheel_events_.Queue(modified_dispatch_type_event); |
| } else { |
| if (non_blocking) { |
| wheel_events_.set_state(WebInputEventQueueState::ITEM_PENDING); |
| - client_->SendEventToMainThread(routing_id_, event, latency, |
| - dispatch_type); |
| + client_->SendEventToMainThread(routing_id_, |
| + &modified_dispatch_type_event.event, |
| + latency, dispatch_type); |
| } else { |
| // If there is nothing in the event queue and the event is |
| // blocking pass the |original_dispatch_type| to avoid |
| // having the main thread call us back as an optimization. |
| - client_->SendEventToMainThread(routing_id_, event, latency, |
| - original_dispatch_type); |
| + client_->SendEventToMainThread(routing_id_, |
| + &modified_dispatch_type_event.event, |
| + latency, original_dispatch_type); |
| } |
| } |
| } else if (blink::WebInputEvent::isTouchEventType(event->type)) { |