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 69b5afab025393d06b2082b8006430a89051e0a5..e55d4b31e7a8d0b44caec049ba5742bd47ac7f60 100644 |
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc |
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc |
@@ -30,6 +30,18 @@ GestureEventData CreateGesture(EventType type, |
packet.touch_location().x(), packet.touch_location().y(), |
packet.raw_touch_location().x(), packet.raw_touch_location().y(), 1, |
gfx::RectF(packet.touch_location(), gfx::SizeF()), flags); |
+ return GestureEventData(details, |
+ motion_event_id, |
+ primary_tool_type, |
+ packet.timestamp(), |
+ packet.touch_location().x(), |
+ packet.touch_location().y(), |
+ packet.raw_touch_location().x(), |
+ packet.raw_touch_location().y(), |
+ 1, |
+ gfx::RectF(packet.touch_location(), gfx::SizeF()), |
+ flags, |
+ 0U); |
} |
enum RequiredTouches { |
@@ -183,8 +195,8 @@ TouchDispositionGestureFilter::OnGesturePacket( |
return SUCCESS; |
} |
-void TouchDispositionGestureFilter::OnTouchEventAck(uint32_t unique_event_id, |
- bool event_consumed) { |
+void TouchDispositionGestureFilter::OnTouchEventAck( |
+ uint32_t unique_touch_event_id, bool event_consumed) { |
// Spurious asynchronous acks should not trigger a crash. |
if (IsEmpty() || (Head().empty() && sequences_.size() == 1)) |
return; |
@@ -193,13 +205,13 @@ void TouchDispositionGestureFilter::OnTouchEventAck(uint32_t unique_event_id, |
PopGestureSequence(); |
if (!Tail().empty() && |
- Tail().back().unique_touch_event_id() == unique_event_id) { |
+ Tail().back().unique_touch_event_id() == unique_touch_event_id) { |
Tail().back().Ack(event_consumed); |
if (sequences_.size() == 1 && Tail().size() == 1) |
SendAckedEvents(); |
} else { |
DCHECK(!Head().empty()); |
- DCHECK_EQ(Head().front().unique_touch_event_id(), unique_event_id); |
+ DCHECK_EQ(Head().front().unique_touch_event_id(), unique_touch_event_id); |
Head().front().Ack(event_consumed); |
SendAckedEvents(); |
} |
@@ -300,8 +312,11 @@ void TouchDispositionGestureFilter::FilterAndSendPacket( |
} |
void TouchDispositionGestureFilter::SendGesture( |
- const GestureEventData& event, |
+ const GestureEventData& original_event, |
const GestureEventDataPacket& packet_being_sent) { |
+ GestureEventData event(original_event); |
+ event.unique_touch_event_id = packet_being_sent.unique_touch_event_id(); |
+ |
// TODO(jdduke): Factor out gesture stream reparation code into a standalone |
// utility class. |
switch (event.type()) { |