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

Side by Side Diff: ui/events/gesture_detection/gesture_configuration.cc

Issue 1778063002: Eliminate pinch drift by removing touch radius from span calculation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Shrink minimum scale span. Created 4 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "build/build_config.h" 5 #include "build/build_config.h"
6 #include "ui/events/gesture_detection/gesture_configuration.h" 6 #include "ui/events/gesture_detection/gesture_configuration.h"
7 7
8 namespace ui { 8 namespace ui {
9 namespace { 9 namespace {
10 10
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 max_time_between_double_click_in_ms_(700), 46 max_time_between_double_click_in_ms_(700),
47 max_touch_down_duration_for_click_in_ms_(800), 47 max_touch_down_duration_for_click_in_ms_(800),
48 max_touch_move_in_pixels_for_click_(15), 48 max_touch_move_in_pixels_for_click_(15),
49 min_distance_for_pinch_scroll_in_pixels_(20), 49 min_distance_for_pinch_scroll_in_pixels_(20),
50 min_fling_velocity_(30.0f), 50 min_fling_velocity_(30.0f),
51 min_gesture_bounds_length_(0), 51 min_gesture_bounds_length_(0),
52 min_pinch_update_span_delta_(0), 52 min_pinch_update_span_delta_(0),
53 // If this is too small, we currently can get single finger pinch zoom. 53 // If this is too small, we currently can get single finger pinch zoom.
54 // See crbug.com/357237 for details. 54 // See crbug.com/357237 for details.
55 min_scaling_span_in_pixels_(125), 55 min_scaling_span_in_pixels_(125),
56 // The default value of min_scaling_touch_major_ is 2 * default_radius_.
57 min_scaling_touch_major_(50),
58 min_swipe_velocity_(20), 56 min_swipe_velocity_(20),
59 // TODO(jdduke): Disable and remove entirely when issues with intermittent 57 // TODO(jdduke): Disable and remove entirely when issues with intermittent
60 // scroll end detection on the Pixel are resolved, crbug.com/353702. 58 // scroll end detection on the Pixel are resolved, crbug.com/353702.
61 #if defined(OS_CHROMEOS) 59 #if defined(OS_CHROMEOS)
62 scroll_debounce_interval_in_ms_(30), 60 scroll_debounce_interval_in_ms_(30),
63 #else 61 #else
64 scroll_debounce_interval_in_ms_(0), 62 scroll_debounce_interval_in_ms_(0),
65 #endif 63 #endif
66 semi_long_press_time_in_ms_(400), 64 semi_long_press_time_in_ms_(400),
67 show_press_delay_in_ms_(150), 65 show_press_delay_in_ms_(150),
68 // The default value of span_slop_ is 66 // The default value of span_slop_ is
69 // 2 * max_touch_move_in_pixels_for_click_. 67 // 2 * max_touch_move_in_pixels_for_click_.
70 span_slop_(30), 68 span_slop_(30),
71 swipe_enabled_(false), 69 swipe_enabled_(false),
72 tab_scrub_activation_delay_in_ms_(200), 70 tab_scrub_activation_delay_in_ms_(200),
73 two_finger_tap_enabled_(false), 71 two_finger_tap_enabled_(false),
74 velocity_tracker_strategy_(VelocityTracker::Strategy::STRATEGY_DEFAULT) { 72 velocity_tracker_strategy_(VelocityTracker::Strategy::STRATEGY_DEFAULT) {
75 } 73 }
76 74
77 GestureConfiguration::~GestureConfiguration() { 75 GestureConfiguration::~GestureConfiguration() {
78 } 76 }
79 77
80 } // namespace ui 78 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_configuration.h ('k') | ui/events/gesture_detection/gesture_configuration_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698