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

Unified Diff: ui/events/blink/blink_event_util.cc

Issue 1120293003: Make sure send one WebTouchEvent ack per ui::TouchEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/blink/blink_event_util.cc
diff --git a/ui/events/blink/blink_event_util.cc b/ui/events/blink/blink_event_util.cc
index 35c307efea919f6e6a9d022a8820bdabad173a56..3039bdd18022a5b862758b026a07fce5903621be 100644
--- a/ui/events/blink/blink_event_util.cc
+++ b/ui/events/blink/blink_event_util.cc
@@ -53,11 +53,15 @@ WebTouchPoint::State ToWebTouchPointState(const MotionEvent& event,
case MotionEvent::ACTION_DOWN:
return WebTouchPoint::StatePressed;
case MotionEvent::ACTION_MOVE:
- return WebTouchPoint::StateMoved;
+ return static_cast<int>(pointer_index) == event.GetActionIndex()
tdresser 2015/05/04 20:39:37 GetActionIndex is only valid if |GetAction()| retu
+ ? WebTouchPoint::StateMoved
+ : WebTouchPoint::StateStationary;
case MotionEvent::ACTION_UP:
return WebTouchPoint::StateReleased;
case MotionEvent::ACTION_CANCEL:
- return WebTouchPoint::StateCancelled;
+ return static_cast<int>(pointer_index) == event.GetActionIndex()
+ ? WebTouchPoint::StateCancelled
+ : WebTouchPoint::StateStationary;
case MotionEvent::ACTION_POINTER_DOWN:
return static_cast<int>(pointer_index) == event.GetActionIndex()
? WebTouchPoint::StatePressed
« no previous file with comments | « no previous file | ui/events/gesture_detection/motion_event_generic.cc » ('j') | ui/events/gestures/motion_event_aura.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698