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..0633bd385f83923e75d8b5b5d5e5e5ecdfd2bde6 100644 |
--- a/content/common/input/gesture_event_stream_validator.cc |
+++ b/content/common/input/gesture_event_stream_validator.cc |
@@ -100,6 +100,15 @@ 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. |
+ if (event.sourceDevice == blink::WebGestureDeviceTouchpad && |
+ !WebInputEvent::isGestureScrollEventType(event.type)) { |
+ error_msg->append( |
jdduke (slow)
2015/10/19 18:15:38
Hmm, I was thinking something even more basic, lik
wjmaclean
2015/10/19 18:58:49
Done.
|
+ "Touchpad device should only be used for scroll events.\n"); |
+ } |
+ |
return error_msg->empty(); |
} |