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

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

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a comment. Created 4 years, 7 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 bcf4ce64f20edc2ee1288acea7c8d73797347bed..f6ecff5782a02bb3d7b7be11c23ab7f1d505abc0 100644
--- a/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
+++ b/ui/events/gesture_detection/touch_disposition_gesture_filter.cc
@@ -33,7 +33,8 @@ GestureEventData CreateGesture(EventType type,
packet.raw_touch_location().y(),
1,
gfx::RectF(packet.touch_location(), gfx::SizeF()),
- flags);
+ flags,
+ 0U);
}
enum RequiredTouches {
@@ -187,8 +188,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;
@@ -197,13 +198,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();
}
@@ -304,8 +305,11 @@ void TouchDispositionGestureFilter::FilterAndSendPacket(
}
void TouchDispositionGestureFilter::SendGesture(
- const GestureEventData& event,
+ const GestureEventData& original_event,
const GestureEventDataPacket& packet_being_sent) {
+ GestureEventData event(original_event);
dtapuska 2016/06/03 15:02:11 Wouldn't it make more sense to set the touch_event
mustaq 2016/06/03 20:34:45 Good catch, thanks. I originally got confused with
+ 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()) {

Powered by Google App Engine
This is Rietveld 408576698