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

Unified Diff: ui/events/gestures/motion_event_aura.cc

Issue 873283003: Invalid press events don't create multiple pointers with the same id. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test. Created 5 years, 11 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
« no previous file with comments | « no previous file | ui/events/gestures/motion_event_aura_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/gestures/motion_event_aura.cc
diff --git a/ui/events/gestures/motion_event_aura.cc b/ui/events/gestures/motion_event_aura.cc
index 2f532e7f325f6ad0e9f5d211bdba2707ca89834f..a2ac480a658c7b4a37ef66171f97199df58ccec6 100644
--- a/ui/events/gestures/motion_event_aura.cc
+++ b/ui/events/gestures/motion_event_aura.cc
@@ -82,12 +82,18 @@ bool MotionEventAura::OnTouch(const TouchEvent& touch) {
bool pointer_id_is_active = index != -1;
if (touch.type() == ET_TOUCH_PRESSED && pointer_id_is_active) {
- // Ignore touch press events if we already believe the pointer is down.
-
- // TODO(tdresser): this should return false (or NOTREACHED());
- // however, there is at least one case where we need to allow a
- // touch press from a currently used touch id. See
+ // TODO(tdresser): This should return false (or NOTREACHED()), and
+ // ignore the touch; however, there is at least one case where we
+ // need to allow a touch press from a currently used touch id. See
// crbug.com/446852 for details.
+
+ // Update the existing touch location. See crbug.com/450880 for an
+ // example of why this is necessary.
+ UpdateTouch(touch);
jdduke (slow) 2015/01/26 17:16:19 I guess the alternative is cancelling the previous
tdresser 2015/01/26 17:48:03 Done.
+ UpdateCachedAction(touch);
+ set_flags(touch.flags());
+ set_event_time(touch.time_stamp() + base::TimeTicks());
+ return true;
} else if (touch.type() != ET_TOUCH_PRESSED && !pointer_id_is_active) {
// We could have an active touch stream transfered to us, resulting in touch
// move or touch up events without associated touch down events. Ignore
« no previous file with comments | « no previous file | ui/events/gestures/motion_event_aura_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698