Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Side by Side Diff: content/renderer/input/render_widget_input_handler.cc

Issue 2557153002: Fix issues related to a continuous event getting coalesced with a discrete event. (Closed)
Patch Set: Fix nits Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « content/renderer/input/main_thread_event_queue_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/input/render_widget_input_handler.h" 5 #include "content/renderer/input/render_widget_input_handler.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 delegate_->ObserveGestureEventAndResult( 390 delegate_->ObserveGestureEventAndResult(
391 gesture_event, 391 gesture_event,
392 event_overscroll ? event_overscroll->latest_overscroll_delta 392 event_overscroll ? event_overscroll->latest_overscroll_delta
393 : gfx::Vector2dF(), 393 : gfx::Vector2dF(),
394 processed != WebInputEventResult::NotHandled); 394 processed != WebInputEventResult::NotHandled);
395 } 395 }
396 } 396 }
397 397
398 TRACE_EVENT_SYNTHETIC_DELAY_END("blink.HandleInputEvent"); 398 TRACE_EVENT_SYNTHETIC_DELAY_END("blink.HandleInputEvent");
399 399
400 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN) { 400 if (dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN ||
401 dispatch_type == DISPATCH_TYPE_NON_BLOCKING_NOTIFY_MAIN) {
401 // |non_blocking| means it was ack'd already by the InputHandlerProxy 402 // |non_blocking| means it was ack'd already by the InputHandlerProxy
402 // so let the delegate know the event has been handled. 403 // so let the delegate know the event has been handled.
403 delegate_->NotifyInputEventHandled(input_event.type, ack_result); 404 delegate_->NotifyInputEventHandled(input_event.type, ack_result);
404 } 405 }
405 406
406 if ((dispatch_type == DISPATCH_TYPE_BLOCKING || 407 if ((dispatch_type == DISPATCH_TYPE_BLOCKING ||
407 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) { 408 dispatch_type == DISPATCH_TYPE_BLOCKING_NOTIFY_MAIN)) {
408 std::unique_ptr<InputEventAck> response(new InputEventAck( 409 std::unique_ptr<InputEventAck> response(new InputEventAck(
409 InputEventAckSource::MAIN_THREAD, input_event.type, ack_result, 410 InputEventAckSource::MAIN_THREAD, input_event.type, ack_result,
410 swap_latency_info, std::move(event_overscroll), 411 swap_latency_info, std::move(event_overscroll),
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
470 // it can be bundled in the event ack. 471 // it can be bundled in the event ack.
471 if (handling_event_overscroll_) { 472 if (handling_event_overscroll_) {
472 *handling_event_overscroll_ = std::move(params); 473 *handling_event_overscroll_ = std::move(params);
473 return; 474 return;
474 } 475 }
475 476
476 delegate_->OnDidOverscroll(*params); 477 delegate_->OnDidOverscroll(*params);
477 } 478 }
478 479
479 } // namespace content 480 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/main_thread_event_queue_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698