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

Unified Diff: ui/events/gestures/gesture_provider_aura.cc

Issue 393953012: Eager Gesture Recognition on Aura (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Refactor based on Jared's comments. Created 6 years, 5 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
Index: ui/events/gestures/gesture_provider_aura.cc
diff --git a/ui/events/gestures/gesture_provider_aura.cc b/ui/events/gestures/gesture_provider_aura.cc
index 7485cda70e9fad124277642a8c685ecd0f9f3648..9fe6ba192ae76c4be5c03d4cee716d2f7b846dbf 100644
--- a/ui/events/gestures/gesture_provider_aura.cc
+++ b/ui/events/gestures/gesture_provider_aura.cc
@@ -28,6 +28,14 @@ bool GestureProviderAura::OnTouchEvent(const TouchEvent& event) {
if (event.touch_id() != pointer_state_.GetPointerId(i))
continue;
pointer_id_is_active = true;
+
+ // If this is a touchmove event, and it isn't different from the last
+ // event, ignore it.
+ if (event.type() == ET_TOUCH_MOVED &&
+ event.x() == pointer_state_.GetX(i) &&
+ event.y() == pointer_state_.GetY(i)) {
+ return false;
+ }
break;
}

Powered by Google App Engine
This is Rietveld 408576698