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

Unified Diff: ui/app_list/contents_view.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/app_list/contents_view.cc
diff --git a/ui/app_list/contents_view.cc b/ui/app_list/contents_view.cc
index 4b4bc77d1ab650f010faee05a53127c18847d68d..2ad98879a2c80538ac7cd49f6ddcf92db86d0403 100644
--- a/ui/app_list/contents_view.cc
+++ b/ui/app_list/contents_view.cc
@@ -204,13 +204,14 @@ ui::GestureStatus ContentsView::OnGestureEvent(
pagination_model_->EndScroll();
return ui::GESTURE_STATUS_CONSUMED;
case ui::ET_SCROLL_FLING_START: {
+ pagination_model_->EndScroll();
if (fabs(event.details().velocity_x()) > kMinHorizVelocityToSwitchPage) {
+ pagination_model_->ResetTransitionAnimation();
pagination_model_->SelectPageRelative(
event.details().velocity_x() < 0 ? 1 : -1,
true);
- return ui::GESTURE_STATUS_CONSUMED;
}
- break;
+ return ui::GESTURE_STATUS_CONSUMED;
}
default:
break;

Powered by Google App Engine
This is Rietveld 408576698