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

Unified Diff: content/child/fling_animator_impl_android.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: content/child/fling_animator_impl_android.cc
diff --git a/content/child/fling_animator_impl_android.cc b/content/child/fling_animator_impl_android.cc
index 235f920b48f1cecf757c86ed5c79dd75956deb61..19b3761d4800451187aad00533c393cb8637835f 100644
--- a/content/child/fling_animator_impl_android.cc
+++ b/content/child/fling_animator_impl_android.cc
@@ -72,17 +72,15 @@ bool FlingAnimatorImpl::apply(double /* time */,
return false;
}
- target->notifyCurrentFlingVelocity(blink::WebFloatSize(
- scroller_.GetCurrVelocityX(), scroller_.GetCurrVelocityY()));
-
gfx::PointF current_position(scroller_.GetCurrX(), scroller_.GetCurrY());
gfx::Vector2dF scroll_amount(current_position - last_position_);
last_position_ = current_position;
// scrollBy() could delete this curve if the animation is over, so don't touch
// any member variables after making that call.
- target->scrollBy(blink::WebFloatSize(scroll_amount));
- return true;
+ return target->scrollBy(blink::WebFloatSize(scroll_amount),
+ blink::WebFloatSize(scroller_.GetCurrVelocityX(),
+ scroller_.GetCurrVelocityY()));
}
FlingAnimatorImpl* FlingAnimatorImpl::CreateAndroidGestureCurve(
« no previous file with comments | « content/browser/android/in_process/synchronous_input_event_filter.cc ('k') | content/child/touch_fling_gesture_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698