| 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 {
|
|
|