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

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

Issue 1971273002: Touch Action could cause wheel gestures to be filtered. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make test separate Created 4 years, 7 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_action_filter.cc
diff --git a/content/browser/renderer_host/input/touch_action_filter.cc b/content/browser/renderer_host/input/touch_action_filter.cc
index 75523f1e7c2d63ff68125cf808e5d3e0abc9a243..e8f23354bd6a27e205fc3d3cad77030a70268ff8 100644
--- a/content/browser/renderer_host/input/touch_action_filter.cc
+++ b/content/browser/renderer_host/input/touch_action_filter.cc
@@ -36,6 +36,9 @@ TouchActionFilter::TouchActionFilter() :
}
bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
+ if (gesture_event->sourceDevice != blink::WebGestureDeviceTouchscreen)
+ return false;
+
// Filter for allowable touch actions first (eg. before the TouchEventQueue
// can decide to send a touch cancel event).
switch (gesture_event->type) {
@@ -61,8 +64,6 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
break;
case WebInputEvent::GestureFlingStart:
- if (gesture_event->sourceDevice != blink::WebGestureDeviceTouchscreen)
- break;
// Touchscreen flings should always have non-zero velocity.
DCHECK(gesture_event->data.flingStart.velocityX ||
gesture_event->data.flingStart.velocityY);

Powered by Google App Engine
This is Rietveld 408576698