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..886d75a60d25e46f6e8f5161355a198006ae467c 100644 |
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc |
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc |
@@ -168,14 +168,18 @@ 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. |
tdresser
2016/01/14 15:35:40
Add to this comment something along the lines of:
ananta
2016/01/14 20:09:30
Done.
|
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()); |
+ DCHECK((packet.gesture_source() == GestureEventDataPacket::TOUCH_TIMEOUT) |
+ || (packet.unique_touch_event_id() != |
+ Head().front().unique_touch_event_id())); |
tdresser
2016/01/14 15:35:40
I don't think we should ever reach this code with
ananta
2016/01/14 20:09:30
No. I just changed the DCHECK for consistency. The
tdresser
2016/01/14 20:14:10
Yeah, it makes sense that the first would fire. Le
ananta
2016/01/14 20:21:14
Done.
|
} |
Tail().push(packet); |