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

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

Issue 16114003: Don't send touch move to renderer while scrolling (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: use ScrollBegin instead of ScrollUpdate as the indication of stop sending touch move & rebase Created 7 years, 4 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/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 c1675b9952dc78f817446561167db94f8440c7a4..e22c05d0f80ff504cdbcdd8408c55dd3b030bb06 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -91,7 +91,8 @@ class CoalescedWebTouchEvent {
TouchEventQueue::TouchEventQueue(TouchEventQueueClient* client)
: client_(client),
- dispatching_touch_ack_(false) {
+ dispatching_touch_ack_(false),
+ no_touch_move_to_renderer_(false) {
DCHECK(client);
}
@@ -212,6 +213,10 @@ bool TouchEventQueue::ShouldForwardToRenderer(
if (event.type == WebKit::WebInputEvent::TouchStart)
return true;
+ if (event.type == WebKit::WebInputEvent::TouchMove &&
+ no_touch_move_to_renderer_)
+ return false;
+
for (unsigned int i = 0; i < event.touchesLength; ++i) {
const WebKit::WebTouchPoint& point = event.touches[i];
// If a point has been stationary, then don't take it into account.

Powered by Google App Engine
This is Rietveld 408576698