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

Unified Diff: ui/events/gesture_detection/touch_disposition_gesture_filter.cc

Issue 680413006: Re-enable Eager Gesture Recognition on Aura (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix out of order ack problem. Created 6 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: ui/events/gesture_detection/touch_disposition_gesture_filter.cc
diff --git a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
index 564d014a4c5f94c28a7bd9a72be4ec1c8c84d594..b1ea1a7a74365bc9801f4c643705e818eb6bc304 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
@@ -207,6 +207,19 @@ void TouchDispositionGestureFilter::OnTouchEventAck(bool event_consumed) {
FilterAndSendPacket(packet);
}
DCHECK(touch_packet_for_current_ack_handled);
+
+ // If the next event is invalid, treat it as though we just
+ // received a "consumed" ack for the event.
+ if (!sequence.empty() && sequence.back().marked_to_ignore())
+ OnTouchEventAck(true);
+}
+
+void TouchDispositionGestureFilter::IgnoreLastTouchEvent() {
+ DCHECK(!Tail().empty());
+ if (Tail().size() == 1)
+ OnTouchEventAck(true);
+ else
+ Tail().back().mark_to_ignore();
}
bool TouchDispositionGestureFilter::IsEmpty() const {

Powered by Google App Engine
This is Rietveld 408576698