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

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

Issue 572853005: Allow synthetic Tap gestures without a preceding TapDown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | content/common/input/gesture_event_stream_validator_unittest.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 b95a674541df1958e44fbf2b6b823758568abed6..eccdbe0079f362d4392fe93365b88f4563cfbdcf 100644
--- a/content/common/input/gesture_event_stream_validator.cc
+++ b/content/common/input/gesture_event_stream_validator.cc
@@ -62,13 +62,19 @@ bool GestureEventStreamValidator::Validate(const blink::WebGestureEvent& event,
error_msg->append("Missing tap end event\n");
waiting_for_tap_end_ = true;
break;
- case WebInputEvent::GestureTap:
+ case WebInputEvent::GestureTapUnconfirmed:
+ if (!waiting_for_tap_end_)
+ error_msg->append("Missing TapDown event before TapUnconfirmed\n");
+ break;
case WebInputEvent::GestureTapCancel:
if (!waiting_for_tap_end_)
- error_msg->append("Missing GestureTapDown event\n");
+ error_msg->append("Missing TapDown event before TapCancel\n");
waiting_for_tap_end_ = false;
break;
+ case WebInputEvent::GestureTap:
case WebInputEvent::GestureDoubleTap:
+ // Both Tap and DoubleTap gestures may be synthetically inserted, and do
+ // not require a preceding TapDown.
tdresser 2014/09/16 18:03:46 Can this ever happen on Aura? We don't do tap dis
jdduke (slow) 2014/09/16 19:00:46 You tell me :)
waiting_for_tap_end_ = false;
break;
default:
« no previous file with comments | « no previous file | content/common/input/gesture_event_stream_validator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698