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

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

Issue 2613533003: Tap suppression controller forwards the next TapCancel when the stashed TapDown is forwarded. (Closed)
Patch Set: Created 3 years, 12 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 | « content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc
diff --git a/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc b/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc
index 45d52128ee86a6db2ecc9bedf03ba0428c3680e0..cdc966d42747a47ff6390e4a13357b5b6c886b4f 100644
--- a/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc
+++ b/content/browser/renderer_host/input/touchscreen_tap_suppression_controller.cc
@@ -33,6 +33,7 @@ bool TouchscreenTapSuppressionController::FilterTapEvent(
const GestureEventWithLatencyInfo& event) {
switch (event.event.type) {
case WebInputEvent::GestureTapDown:
+ forward_next_tap_cancel_ = false;
if (!controller_.ShouldDeferTapDown())
return false;
stashed_tap_down_.reset(new GestureEventWithLatencyInfo(event));
@@ -58,6 +59,8 @@ bool TouchscreenTapSuppressionController::FilterTapEvent(
return !!stashed_tap_down_;
case WebInputEvent::GestureTapCancel:
+ return !forward_next_tap_cancel_ && controller_.ShouldSuppressTapEnd();
+
case WebInputEvent::GestureTap:
case WebInputEvent::GestureDoubleTap:
case WebInputEvent::GestureLongTap:
@@ -94,6 +97,7 @@ void TouchscreenTapSuppressionController::ForwardStashedTapDown() {
gesture_event_queue_->ForwardGestureEvent(*tap_down);
stashed_show_press_.reset();
stashed_long_press_.reset();
+ forward_next_tap_cancel_ = true;
}
} // namespace content
« no previous file with comments | « content/browser/renderer_host/input/touchscreen_tap_suppression_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698