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

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

Issue 510793003: Remove ui::TouchEvent -> blink::WebTouchEvent conversion methods. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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/gestures/motion_event_aura.cc
diff --git a/ui/events/gestures/motion_event_aura.cc b/ui/events/gestures/motion_event_aura.cc
index bfe3321bed42f0972e1430cc80ca67c64677c202..7e894dd7417c60a145cc0a1812a24deedd532096 100644
--- a/ui/events/gestures/motion_event_aura.cc
+++ b/ui/events/gestures/motion_event_aura.cc
@@ -82,8 +82,10 @@ MotionEvent::Action MotionEventAura::GetAction() const {
}
int MotionEventAura::GetActionIndex() const {
- DCHECK(cached_action_ == ACTION_POINTER_DOWN ||
- cached_action_ == ACTION_POINTER_UP);
+ if (cached_action_ != ACTION_POINTER_DOWN &&
+ cached_action_ != ACTION_POINTER_UP) {
+ return -1;
+ }
DCHECK_GE(cached_action_index_, 0);
DCHECK_LT(cached_action_index_, static_cast<int>(pointer_count_));
return cached_action_index_;

Powered by Google App Engine
This is Rietveld 408576698