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

Unified Diff: webkit/glue/fling_animator_impl_android.cc

Issue 11778080: Fix member variable order in WebGestureCurve implementations (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add comments Created 7 years, 11 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 | « no previous file | webkit/glue/touch_fling_gesture_curve.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/glue/fling_animator_impl_android.cc
diff --git a/webkit/glue/fling_animator_impl_android.cc b/webkit/glue/fling_animator_impl_android.cc
index b4ba4478160c3fd461925009d79b5ebc45cb805c..bac4e91434cb4b9f343ed9cc7bcd47e414764e94 100644
--- a/webkit/glue/fling_animator_impl_android.cc
+++ b/webkit/glue/fling_animator_impl_android.cc
@@ -107,9 +107,11 @@ bool FlingAnimatorImpl::apply(double time,
gfx::Point current_position = GetCurrentPosition();
gfx::Vector2d diff(current_position - last_position_);
+ last_position_ = current_position;
WebKit::WebPoint scroll_amount(diff.x(), diff.y());
+ // scrollBy() could delete this curve if the animation is over, so don't touch
+ // any member variables after making that call.
target->scrollBy(scroll_amount);
- last_position_ = current_position;
return true;
}
« no previous file with comments | « no previous file | webkit/glue/touch_fling_gesture_curve.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698