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

Unified Diff: content/common/input/gesture_event_stream_validator.cc

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert more tests (related to CL) to use Touchscreen. Created 5 years, 2 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 | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/input/gesture_event_stream_validator.cc
diff --git a/content/common/input/gesture_event_stream_validator.cc b/content/common/input/gesture_event_stream_validator.cc
index 6ea29de25ac8536fd054b45af307ee58dc5cdebe..9bdea8a481fe9bc7e8d1b91040b856e634ffa85c 100644
--- a/content/common/input/gesture_event_stream_validator.cc
+++ b/content/common/input/gesture_event_stream_validator.cc
@@ -100,6 +100,13 @@ bool GestureEventStreamValidator::Validate(const blink::WebGestureEvent& event,
default:
break;
}
+ // TODO(wjmaclean): At some future point we may wish to consider adding a
+ // 'continuity check', requiring that all events between an initial tap-down
+ // and whatever terminates the sequence to have the same source device type,
+ // and that touchpad gestures are only found on ScrollEvents.
+ if (event.sourceDevice == blink::WebGestureDeviceUninitialized)
+ error_msg->append("Gesture event source is uninitialized.\n");
+
return error_msg->empty();
}
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698