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

Unified Diff: content/browser/renderer_host/input/input_router_impl.cc

Issue 1800143002: Notify Blink about start of gesture scroll through a queued event. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignored ack mismatch. Created 4 years, 8 months 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 side-by-side diff with in-line comments
Download patch
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 4f020675f6c9dede08ec957b15b5cd726d461bf5..19006e1cc5a5455fa31c6fef5383184b3029769d 100644
--- a/content/browser/renderer_host/input/input_router_impl.cc
+++ b/content/browser/renderer_host/input/input_router_impl.cc
@@ -158,8 +158,11 @@ void InputRouterImpl::SendGestureEvent(
wheel_event_queue_.OnGestureScrollEvent(gesture_event);
- if (gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchscreen)
+ if (gesture_event.event.sourceDevice == blink::WebGestureDeviceTouchscreen) {
+ if (gesture_event.event.type == blink::WebInputEvent::GestureScrollBegin)
+ touch_event_queue_.PrependTouchScrollNotification();
touch_event_queue_.OnGestureScrollEvent(gesture_event);
+ }
gesture_event_queue_.QueueEvent(gesture_event);
}
@@ -365,20 +368,21 @@ void InputRouterImpl::OfferToHandlers(const WebInputEvent& input_event,
return;
// Touch events should always indicate in the event whether they are
- // cancelable (respect ACK disposition) or not except touchmove.
+ // cancelable (respect ACK disposition) or not, except touchmove and
+ // touchscollstarted.
bool should_block = WebInputEventTraits::ShouldBlockEventStream(input_event);
+ if (WebInputEvent::isTouchEventType(input_event.type) &&
+ input_event.type != WebInputEvent::TouchMove &&
+ input_event.type != WebInputEvent::TouchScrollStarted) {
+ const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event);
+ DCHECK_EQ(should_block, touch.cancelable);
+ }
OfferToRenderer(input_event, latency_info,
should_block
? InputEventDispatchType::DISPATCH_TYPE_BLOCKING
: InputEventDispatchType::DISPATCH_TYPE_NON_BLOCKING);
- if (WebInputEvent::isTouchEventType(input_event.type) &&
- input_event.type != WebInputEvent::TouchMove) {
- const WebTouchEvent& touch = static_cast<const WebTouchEvent&>(input_event);
- DCHECK_EQ(should_block, touch.cancelable);
- }
-
// Generate a synthetic ack if the event was sent so it doesn't block.
if (!should_block) {
ProcessInputEventAck(

Powered by Google App Engine
This is Rietveld 408576698