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

Unified Diff: ui/gfx/android/scroller.cc

Issue 136173004: Early terminate flings when scrolling impossible (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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
Index: ui/gfx/android/scroller.cc
diff --git a/ui/gfx/android/scroller.cc b/ui/gfx/android/scroller.cc
index 96658b221feffbbcb4b9f47d8b6376e47c22a0ab..4a44741f52e86b85f92ec1e8102f1a881f3bfb0f 100644
--- a/ui/gfx/android/scroller.cc
+++ b/ui/gfx/android/scroller.cc
@@ -276,6 +276,9 @@ bool Scroller::ComputeScrollOffset(base::TimeTicks time) {
if (finished_)
return false;
+ if (time == curr_time_)
+ return true;
+
base::TimeDelta time_passed = time - start_time_;
if (time_passed < base::TimeDelta()) {

Powered by Google App Engine
This is Rietveld 408576698