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

Unified Diff: content/browser/renderer_host/gesture_event_filter.cc

Issue 11361150: Suppress sending mousedown / mouseup when in fling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added unit tests Created 8 years, 1 month 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/gesture_event_filter.cc
diff --git a/content/browser/renderer_host/gesture_event_filter.cc b/content/browser/renderer_host/gesture_event_filter.cc
index 7b06e811dc9d492d1c4a52575353a69be2e6257d..c924553f50fe4daeea3f97ed1bdca26254b86124 100644
--- a/content/browser/renderer_host/gesture_event_filter.cc
+++ b/content/browser/renderer_host/gesture_event_filter.cc
@@ -128,6 +128,8 @@ bool GestureEventFilter::ShouldForwardForTapDeferral(
if (!ShouldDiscardFlingCancelEvent(gesture_event)) {
coalesced_gesture_events_.push_back(gesture_event);
fling_in_progress_ = false;
+ tap_suppression_controller_->GestureFlingCancel(
+ gesture_event.timeStampSeconds);
return ShouldHandleEventNow();
}
return false;
@@ -204,6 +206,8 @@ void GestureEventFilter::Reset() {
void GestureEventFilter::ProcessGestureAck(bool processed, int type) {
DCHECK_EQ(coalesced_gesture_events_.front().type, type);
coalesced_gesture_events_.pop_front();
+ if (type == WebInputEvent::GestureFlingCancel)
+ tap_suppression_controller_->GestureFlingCancelAck(processed);
if (!coalesced_gesture_events_.empty()) {
WebGestureEvent next_gesture_event = coalesced_gesture_events_.front();
render_widget_host_->ForwardGestureEventImmediately(next_gesture_event);

Powered by Google App Engine
This is Rietveld 408576698