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

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

Issue 1383633002: Don't throttle touch events on resent GestureScrollUpdates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ignore re-sent GestureScrollUpdates. Created 5 years, 3 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 35b1657048ba5635cf1ffbba8c353f8687b94359..aeaf5aeffdf07048ffbb0ecfb46e15f411b853d7 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -636,8 +636,10 @@ void TouchEventQueue::OnGestureScrollEvent(
return;
}
- if (gesture_event.event.type == blink::WebInputEvent::GestureScrollUpdate)
+ if (gesture_event.event.type == blink::WebInputEvent::GestureScrollUpdate &&
+ gesture_event.event.resendingPluginId == -1) {
send_touch_events_async_ = true;
+ }
}
void TouchEventQueue::OnGestureEventAck(
@@ -648,10 +650,13 @@ void TouchEventQueue::OnGestureEventAck(
// gesture event (or even part of the current sequence). Worst case, the
// delay in updating the absorption state will result in minor UI glitches.
// A valid |pending_async_touchmove_| will be flushed when the next event is
- // forwarded.
- if (event.event.type == blink::WebInputEvent::GestureScrollUpdate)
+ // forwarded. Scroll updates that are being resent from a GuestView are
+ // ignored.
+ if (event.event.type == blink::WebInputEvent::GestureScrollUpdate &&
+ event.event.resendingPluginId == -1) {
send_touch_events_async_ = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED);
}
tdresser 2015/10/01 13:55:05 Indentation looks a little off here.
wjmaclean 2015/10/01 14:01:03 Done.
+}
void TouchEventQueue::OnHasTouchEventHandlers(bool has_handlers) {
DCHECK(!dispatching_touch_ack_);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698