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

Unified Diff: ui/base/gestures/gesture_sequence.cc

Issue 10831043: gesture recognizer: Fix computing the bounding box of the rectangles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 | « ui/base/gestures/gesture_point.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/gestures/gesture_sequence.cc
diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc
index c5825800e214d8b8cb664c0fb757b1fb55f5b643..1cf4cba9d66523eb8051ad23ce5bd6184410dfed 100644
--- a/ui/base/gestures/gesture_sequence.cc
+++ b/ui/base/gestures/gesture_sequence.cc
@@ -671,8 +671,9 @@ void GestureSequence::AppendScrollGestureEnd(const GesturePoint& point,
void GestureSequence::AppendScrollGestureUpdate(const GesturePoint& point,
const gfx::Point& location,
Gestures* gestures) {
- int dx = location.x() - bounding_box_last_center_.x();
- int dy = location.y() - bounding_box_last_center_.y();
+ gfx::Point current_center = bounding_box_.CenterPoint();
+ int dx = current_center.x() - bounding_box_last_center_.x();
+ int dy = current_center.y() - bounding_box_last_center_.y();
if (dx == 0 && dy == 0)
return;
if (scroll_type_ == ST_HORIZONTAL)
« no previous file with comments | « ui/base/gestures/gesture_point.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698