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

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

Issue 10826209: gestures: Generate only either scroll-end or fling-start events at the end of a scroll gesture. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win-fix Created 8 years, 4 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
Index: ui/base/gestures/gesture_sequence.cc
diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc
index b52babb2b6a6ea0780a751ea9e40ba43f5a2397e..2f9b15465fc72db03f827f3146926e6dde4b97ce 100644
--- a/ui/base/gestures/gesture_sequence.cc
+++ b/ui/base/gestures/gesture_sequence.cc
@@ -642,15 +642,6 @@ void GestureSequence::AppendScrollGestureEnd(const GesturePoint& point,
else if (scroll_type_ == ST_VERTICAL)
railed_x_velocity = 0;
- // TODO(rjkroege): It is conceivable that we could suppress sending the
- // GestureScrollEnd if it is immediately followed by a GestureFlingStart.
- gestures->push_back(CreateGestureEvent(
- GestureEventDetails(ui::ET_GESTURE_SCROLL_END, 0, 0),
- location,
- flags_,
- base::Time::FromDoubleT(point.last_touch_time()),
- 1 << point.touch_id()));
-
if (railed_x_velocity != 0 || railed_y_velocity != 0) {
// TODO(sad|rjkroege): fling-curve is currently configured to work well with
// touchpad scroll-events. This curve needs to be adjusted to work correctly
@@ -666,6 +657,13 @@ void GestureSequence::AppendScrollGestureEnd(const GesturePoint& point,
flags_,
base::Time::FromDoubleT(point.last_touch_time()),
1 << point.touch_id()));
+ } else {
+ gestures->push_back(CreateGestureEvent(
+ GestureEventDetails(ui::ET_GESTURE_SCROLL_END, 0, 0),
+ location,
+ flags_,
+ base::Time::FromDoubleT(point.last_touch_time()),
+ 1 << point.touch_id()));
}
}

Powered by Google App Engine
This is Rietveld 408576698