summaryrefslogtreecommitdiffstats
path: root/ui/base
diff options
context:
space:
mode:
authorvarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 22:29:00 +0000
committervarunjain@chromium.org <varunjain@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-10 22:29:00 +0000
commit0fc1e9df6f1231bfd7ba63ab4ab3edb645a1ed17 (patch)
treee9646f71140b66c46b846235021e2a1509af7c0b /ui/base
parent6b757ce2647a9570d090011fc1c66153d349b492 (diff)
downloadchromium_src-0fc1e9df6f1231bfd7ba63ab4ab3edb645a1ed17.zip
chromium_src-0fc1e9df6f1231bfd7ba63ab4ab3edb645a1ed17.tar.gz
chromium_src-0fc1e9df6f1231bfd7ba63ab4ab3edb645a1ed17.tar.bz2
Plumg long press gesture event. Also fix bug in gesture sequence where point
count becomes negative. BUG=102196 TEST=none Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=136373 Review URL: https://chromiumcodereview.appspot.com/10384057 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@136415 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/base')
-rw-r--r--ui/base/gestures/gesture_point.cc1
-rw-r--r--ui/base/gestures/gesture_sequence.cc7
2 files changed, 5 insertions, 3 deletions
diff --git a/ui/base/gestures/gesture_point.cc b/ui/base/gestures/gesture_point.cc
index a9426d25..2533f424 100644
--- a/ui/base/gestures/gesture_point.cc
+++ b/ui/base/gestures/gesture_point.cc
@@ -60,7 +60,6 @@ void GesturePoint::UpdateForTap() {
// Update the tap-position and time, and reset every other state.
last_tap_time_ = last_touch_time_;
last_tap_position_ = last_touch_position_;
- Reset();
}
void GesturePoint::UpdateForScroll() {
diff --git a/ui/base/gestures/gesture_sequence.cc b/ui/base/gestures/gesture_sequence.cc
index 319713c..4898f64 100644
--- a/ui/base/gestures/gesture_sequence.cc
+++ b/ui/base/gestures/gesture_sequence.cc
@@ -306,8 +306,11 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
if (point.point_id() > old_point.point_id())
point.set_point_id(point.point_id() - 1);
}
- old_point.Reset();
- --point_count_;
+ if (old_point.in_use()) {
+ old_point.Reset();
+ --point_count_;
+ DCHECK_GE(point_count_, 0);
+ }
}
return gestures.release();