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

Unified Diff: content/browser/renderer_host/input/input_router_config_helper.cc

Issue 2542453003: Suppress LongPress/Tap, and TwoFingerTap when TapDown cancels a fling. (Closed)
Patch Set: clarification comments added. Created 4 years 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: content/browser/renderer_host/input/input_router_config_helper.cc
diff --git a/content/browser/renderer_host/input/input_router_config_helper.cc b/content/browser/renderer_host/input/input_router_config_helper.cc
index 53aaee3f8800c06d437dbbe1be75a8147c05596e..a41f0ecea59ce11f6700ab7140a4ed05cce896e9 100644
--- a/content/browser/renderer_host/input/input_router_config_helper.cc
+++ b/content/browser/renderer_host/input/input_router_config_helper.cc
@@ -49,9 +49,16 @@ GestureEventQueue::Config GetGestureEventQueueConfig() {
config.touchscreen_tap_suppression_config.max_cancel_to_down_time =
base::TimeDelta::FromMilliseconds(
gesture_config->fling_max_cancel_to_down_time_in_ms());
+
+ // Tap suppression controller forwards the stashed tapDown and drops the rest
+ // of the stashed events when the tapDownTimer expires. If a fling cancel ack
+ // with |processed = false| arrives before the timer expiration, all stashed
+ // events will be forwarded. The timer is used to avoid waiting for an
+ // arbitrarily late fling cancel ack. Its delay should be large enough for
+ // a long press to get stashed and forwarded if needed.
config.touchscreen_tap_suppression_config.max_tap_gap_time =
base::TimeDelta::FromMilliseconds(
- gesture_config->long_press_time_in_ms());
+ gesture_config->long_press_time_in_ms() + 50);
config.touchpad_tap_suppression_config.enabled =
gesture_config->fling_touchpad_tap_suppression_enabled();

Powered by Google App Engine
This is Rietveld 408576698