Chromium Code Reviews| Index: content/browser/android/content_view_core_impl.cc |
| diff --git a/content/browser/android/content_view_core_impl.cc b/content/browser/android/content_view_core_impl.cc |
| index b2c2f7a48d3e0e0017b025b7cd27d20ff7018ad9..4697f6b00858eda59fe55c580a22713cff2d7c28 100644 |
| --- a/content/browser/android/content_view_core_impl.cc |
| +++ b/content/browser/android/content_view_core_impl.cc |
| @@ -1028,11 +1028,17 @@ void ContentViewCoreImpl::FlingCancel(JNIEnv* env, jobject obj, jlong time_ms) { |
| void ContentViewCoreImpl::SingleTap(JNIEnv* env, jobject obj, jlong time_ms, |
| jfloat x, jfloat y) { |
| - WebGestureEvent event = MakeGestureEvent( |
| + // Tap gestures should always be preceded by a TapDown, ensuring consistency |
| + // with the touch-based gesture detection pipeline. |
| + WebGestureEvent tap_down_event = MakeGestureEvent( |
| + WebInputEvent::GestureTapDown, time_ms, x, y); |
|
Rick Byers
2014/11/17 22:55:24
What about GestureShowPress? Shouldn't Tap always
jdduke (slow)
2014/11/17 23:45:21
Hmm, you tell me :) I believe we insert ShowPress
Zeeshan Qureshi
2014/11/17 23:49:06
I believe Tap is only fired when the finger lifts?
jdduke (slow)
2014/11/17 23:52:20
Well, I think we still want the delay before activ
|
| + tap_down_event.data.tap.tapCount = 1; |
| + SendGestureEvent(tap_down_event); |
| + |
| + WebGestureEvent tap_event = MakeGestureEvent( |
| WebInputEvent::GestureTap, time_ms, x, y); |
| - event.data.tap.tapCount = 1; |
| - |
| - SendGestureEvent(event); |
| + tap_event.data.tap.tapCount = 1; |
| + SendGestureEvent(tap_event); |
| } |
| void ContentViewCoreImpl::DoubleTap(JNIEnv* env, jobject obj, jlong time_ms, |