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

Unified Diff: webkit/support/web_gesture_curve_mock.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 | « webkit/glue/touch_fling_gesture_curve.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/support/web_gesture_curve_mock.cc
diff --git a/webkit/support/web_gesture_curve_mock.cc b/webkit/support/web_gesture_curve_mock.cc
index 00e635850d2c96987f49662d80d5a3ab1f741021..43fe5cc0ff1e43031c60dee7231223489589e541 100644
--- a/webkit/support/web_gesture_curve_mock.cc
+++ b/webkit/support/web_gesture_curve_mock.cc
@@ -22,7 +22,9 @@ bool WebGestureCurveMock::apply(double time,
WebKit::WebSize displacement(velocity_.x * time, velocity_.y * time);
WebKit::WebPoint increment(displacement.width - cumulative_scroll_.width,
displacement.height - cumulative_scroll_.height);
- target->scrollBy(increment);
cumulative_scroll_ = displacement;
+ // scrollBy() could delete this curve if the animation is over, so don't
+ // touch any member variables after making that call.
+ target->scrollBy(increment);
return true;
}
« no previous file with comments | « webkit/glue/touch_fling_gesture_curve.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698