diff options
author | tdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-13 16:52:19 +0000 |
---|---|---|
committer | tdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-09-13 16:52:19 +0000 |
commit | e5506b6c740536833f57eb42bda37fa51f33d2bb (patch) | |
tree | 9d4c0886efa99a4b88a2a3d1da3a0e434bfefd57 /ui/base/gestures/gesture_sequence.h | |
parent | 9ec17d87cc46a73eff0f7235a623c1ecd449fb64 (diff) | |
download | chromium_src-e5506b6c740536833f57eb42bda37fa51f33d2bb.zip chromium_src-e5506b6c740536833f57eb42bda37fa51f33d2bb.tar.gz chromium_src-e5506b6c740536833f57eb42bda37fa51f33d2bb.tar.bz2 |
If a touchmove event which would normally begin a scroll is consumed
then no scroll events are fired for that active touch point, but a tap
cancel is fired.
Specifically, this ensures that no tap will be fired in the following case:
- touch down
- move a great distance but have JavaScript consume all the move events
- touch up back near the original touch down point
In addition, scroll will now not occur in the following situation:
- touch down
- move such that a scroll would begin but have javascript consume the move events
- move around without javascript consuming the events
With the current implementation, if an additional touch point is added, the
original touch point regains the ability to handle move events.
BUG=146397
TEST=GestureRecognizerTest.GestureEventConsumedTouchMoveCanFireTapCancel
Review URL: https://chromiumcodereview.appspot.com/23919003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@223062 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base/gestures/gesture_sequence.h')
-rw-r--r-- | ui/base/gestures/gesture_sequence.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ui/base/gestures/gesture_sequence.h b/ui/base/gestures/gesture_sequence.h index 9aff570..41dc009 100644 --- a/ui/base/gestures/gesture_sequence.h +++ b/ui/base/gestures/gesture_sequence.h @@ -19,6 +19,7 @@ class GestureEvent; enum GestureState { GS_NO_GESTURE, GS_PENDING_SYNTHETIC_CLICK, + GS_PENDING_SYNTHETIC_CLICK_NO_SCROLL, GS_SCROLL, GS_PINCH, GS_PENDING_TWO_FINGER_TAP, @@ -171,6 +172,10 @@ class UI_EXPORT GestureSequence { const GesturePoint& point, Gestures* gestures); + void TwoFingerTapOrPinch(const TouchEvent& event, + const GesturePoint& point, + Gestures* gestures); + void StopLongPressTimerIfRequired(const TouchEvent& event); // Current state of gesture recognizer. |