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

Unified Diff: ui/base/gestures/gesture_point.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: stress 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
Index: ui/base/gestures/gesture_point.cc
diff --git a/ui/base/gestures/gesture_point.cc b/ui/base/gestures/gesture_point.cc
index 77988ff29616e8e5ddf9c8d5c9195d8a7063c198..29b3d5a257b5b02043218127d2374130e4613f2e 100644
--- a/ui/base/gestures/gesture_point.cc
+++ b/ui/base/gestures/gesture_point.cc
@@ -187,7 +187,10 @@ void GesturePoint::UpdateEnclosingRectangle(const TouchEvent& event) {
event.GetLocation().y() - radius,
radius * 2,
radius * 2);
- enclosing_rect_ = enclosing_rect_.Union(rect);
+ if (IsInClickWindow(event))
+ enclosing_rect_ = enclosing_rect_.Union(rect);
+ else
+ enclosing_rect_ = rect;
}
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698