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

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: Removed checking GEF's queue back when it is empty in 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 40daee5e2f48e3151186847cced5922360742c8b..ae14917d73d5d1517b18553e352b4da437b80bda 100644
--- a/content/browser/renderer_host/gesture_event_filter.cc
+++ b/content/browser/renderer_host/gesture_event_filter.cc
@@ -133,6 +133,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;
@@ -209,6 +211,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);
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698