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

Unified Diff: ui/events/gestures/gesture_recognizer_impl.cc

Issue 630003003: Change GestureConfiguration types to be consistent with each other and with the (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Really fix compile Created 6 years, 2 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/events/gestures/gesture_provider_aura.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/gesture_recognizer_impl.cc
diff --git a/ui/events/gestures/gesture_recognizer_impl.cc b/ui/events/gestures/gesture_recognizer_impl.cc
index 5f6cfda3e3f4560e07e3c8dc29ac2b61b6901717..9f6eb3ee073b3a894f04a2c52710954591ff439a 100644
--- a/ui/events/gestures/gesture_recognizer_impl.cc
+++ b/ui/events/gestures/gesture_recognizer_impl.cc
@@ -91,12 +91,12 @@ GestureConsumer* GestureRecognizerImpl::GetTargetForGestureEvent(
GestureConsumer* GestureRecognizerImpl::GetTargetForLocation(
const gfx::PointF& location, int source_device_id) {
- const int max_distance =
+ const float max_distance =
GestureConfiguration::max_separation_for_gesture_touches_in_pixels();
gfx::PointF closest_point;
int closest_touch_id = 0;
- float closest_distance_squared = std::numeric_limits<float>::infinity();
+ double closest_distance_squared = std::numeric_limits<double>::infinity();
std::map<GestureConsumer*, GestureProviderAura*>::iterator i;
for (i = consumer_gesture_provider_.begin();
@@ -109,7 +109,7 @@ GestureConsumer* GestureRecognizerImpl::GetTargetForLocation(
gfx::PointF point(pointer_state.GetX(j), pointer_state.GetY(j));
// Relative distance is all we need here, so LengthSquared() is
// appropriate, and cheaper than Length().
- float distance_squared = (point - location).LengthSquared();
+ double distance_squared = (point - location).LengthSquared();
if (distance_squared < closest_distance_squared) {
closest_point = point;
closest_touch_id = pointer_state.GetPointerId(j);
« no previous file with comments | « ui/events/gestures/gesture_provider_aura.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698