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

Unified Diff: ui/events/gesture_detection/gesture_provider.cc

Issue 660173002: Type conversion fixes, ui/ edition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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/event.cc ('k') | ui/events/gesture_detection/velocity_tracker.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gesture_detection/gesture_provider.cc
diff --git a/ui/events/gesture_detection/gesture_provider.cc b/ui/events/gesture_detection/gesture_provider.cc
index 6925c6cdca20c61827e8c3a237381781cd37dc14..cee464787c15bb9baea57f3bfc1744bc5120aa04 100644
--- a/ui/events/gesture_detection/gesture_provider.cc
+++ b/ui/events/gesture_detection/gesture_provider.cc
@@ -281,12 +281,12 @@ class GestureProvider::GestureListenerImpl : public ScaleGestureListener,
if (!scroll_event_sent_) {
// Remove the touch slop region from the first scroll event to avoid a
// jump.
- double distance =
+ float distance =
std::sqrt(distance_x * distance_x + distance_y * distance_y);
- double epsilon = 1e-3;
+ float epsilon = 1e-3f;
if (distance > epsilon) {
- double ratio =
- std::max(0.,
+ float ratio =
+ std::max(0.f,
distance - config_.gesture_detector_config.touch_slop) /
distance;
distance_x *= ratio;
« no previous file with comments | « ui/events/event.cc ('k') | ui/events/gesture_detection/velocity_tracker.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698