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

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

Issue 1565013002: Don't send touch events to windows like menus when the touch occurs outside the menu bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Restore DCHECK Created 4 years, 11 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/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 5a9e75247eea5b6519d51b928e51eef1bedbe77e..05e9db71167e9f8cd279e47f165a444906ecba65 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
@@ -168,14 +168,19 @@ TouchDispositionGestureFilter::OnGesturePacket(
return SUCCESS;
}
- // Check the packet's unique_touch_event_id is valid and unique.
+ // Check the packet's unique_touch_event_id is valid and unique with the
+ // exception of TOUCH_TIMEOUT packets which have the unique_touch_event_id_
+ // of 0. |TOUCH_TIMEOUT| packets don't wait for an ack, they are dispatched
+ // as soon as they reach the head of the queue, in |SendAckedEvents|.
if (!Tail().empty()) {
- DCHECK_NE(packet.unique_touch_event_id(),
- Tail().back().unique_touch_event_id());
+ DCHECK((packet.gesture_source() == GestureEventDataPacket::TOUCH_TIMEOUT)
+ || (packet.unique_touch_event_id() !=
+ Tail().back().unique_touch_event_id()));
}
if (!Head().empty()) {
DCHECK_NE(packet.unique_touch_event_id(),
Head().front().unique_touch_event_id());
+
}
Tail().push(packet);

Powered by Google App Engine
This is Rietveld 408576698