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

Unified Diff: ui/events/gestures/gesture_sequence.cc

Issue 189583007: Ensure Multi-finger tap generates both GestureScrollBegin and GestureScrollEnd. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Perform fix in all required locations. Created 6 years, 9 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 | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_sequence.cc
diff --git a/ui/events/gestures/gesture_sequence.cc b/ui/events/gestures/gesture_sequence.cc
index 5ee5d5e53fbe6204b204c0755773fd60bf4fbd1c..6b77ad246daafc1bb20242b91a5d9b5115beb3d3 100644
--- a/ui/events/gestures/gesture_sequence.cc
+++ b/ui/events/gestures/gesture_sequence.cc
@@ -633,6 +633,9 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
case GST_PENDING_TWO_FINGER_TAP_FIRST_RELEASED:
case GST_PENDING_TWO_FINGER_TAP_SECOND_RELEASED:
TwoFingerTouchReleased(event, point, gestures.get());
+ AppendScrollGestureBegin(
+ point, point.first_touch_position(), gestures.get());
+ scroll_type_ = ST_FREE;
set_state(GS_SCROLL);
sadrul 2014/03/10 03:54:52 It may make sense to have a 'TransitionToScrollSta
tdresser 2014/03/10 12:36:39 Done. Named "StartRailFreeScroll," to indicate tha
break;
case GST_PENDING_TWO_FINGER_TAP_FIRST_MOVED:
@@ -648,6 +651,8 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
case GST_PENDING_TWO_FINGER_TAP_SECOND_RELEASED_HANDLED:
case GST_PENDING_TWO_FINGER_TAP_FIRST_CANCELLED:
case GST_PENDING_TWO_FINGER_TAP_SECOND_CANCELLED:
+ AppendScrollGestureBegin(
+ point, point.first_touch_position(), gestures.get());
scroll_type_ = ST_FREE;
set_state(GS_SCROLL);
break;
@@ -661,16 +666,20 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
case GST_PENDING_TWO_FINGER_TAP_NO_PINCH_FIRST_RELEASED:
case GST_PENDING_TWO_FINGER_TAP_NO_PINCH_SECOND_RELEASED:
TwoFingerTouchReleased(event, point, gestures.get());
- // We transit into GS_SCROLL even though the touch move can be
- // consumed and no scroll should happen. crbug.com/240399.
+ // We transition into GS_SCROLL even though the touch move can be consumed
+ // and no scroll should happen. crbug.com/240399.
+ AppendScrollGestureBegin(
+ point, point.first_touch_position(), gestures.get());
set_state(GS_SCROLL);
break;
case GST_PENDING_TWO_FINGER_TAP_NO_PINCH_FIRST_RELEASED_HANDLED:
case GST_PENDING_TWO_FINGER_TAP_NO_PINCH_SECOND_RELEASED_HANDLED:
case GST_PENDING_TWO_FINGER_TAP_NO_PINCH_FIRST_CANCELLED:
case GST_PENDING_TWO_FINGER_TAP_NO_PINCH_SECOND_CANCELLED:
- // We transit into GS_SCROLL even though the touch move can be
- // consumed and no scroll should happen. crbug.com/240399.
+ // We transition into GS_SCROLL even though the touch move can be consumed
+ // and no scroll should happen. crbug.com/240399.
+ AppendScrollGestureBegin(
+ point, point.first_touch_position(), gestures.get());
scroll_type_ = ST_FREE;
set_state(GS_SCROLL);
break;
@@ -687,8 +696,10 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
case GST_PENDING_PINCH_SECOND_RELEASED:
case GST_PENDING_PINCH_FIRST_CANCELLED:
case GST_PENDING_PINCH_SECOND_CANCELLED:
- // We transit into GS_SCROLL even though the touch move can be
- // consumed and no scroll should happen. crbug.com/240399.
+ // We transition into GS_SCROLL even though the touch move can be consumed
+ // and no scroll should happen. crbug.com/240399.
+ AppendScrollGestureBegin(
+ point, point.first_touch_position(), gestures.get());
scroll_type_ = ST_FREE;
set_state(GS_SCROLL);
break;
@@ -700,8 +711,10 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
case GST_PENDING_PINCH_NO_PINCH_SECOND_RELEASED:
case GST_PENDING_PINCH_NO_PINCH_FIRST_CANCELLED:
case GST_PENDING_PINCH_NO_PINCH_SECOND_CANCELLED:
- // We transit into GS_SCROLL even though the touch move can be
- // consumed and no scroll should happen. crbug.com/240399.
+ // We transition into GS_SCROLL even though the touch move can be consumed
+ // and no scroll should happen. crbug.com/240399.
+ AppendScrollGestureBegin(
+ point, point.first_touch_position(), gestures.get());
scroll_type_ = ST_FREE;
set_state(GS_SCROLL);
break;
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698