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

Unified Diff: ui/aura/gestures/gesture_sequence.cc

Issue 9318010: Tweak the aura gesture recognizer slightly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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 | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/gestures/gesture_sequence.cc
diff --git a/ui/aura/gestures/gesture_sequence.cc b/ui/aura/gestures/gesture_sequence.cc
index d383623a58e99a4647893f1f87f9949c7a78bf1d..630a9fbf9d232940a10577d98d8711563e0b1318 100644
--- a/ui/aura/gestures/gesture_sequence.cc
+++ b/ui/aura/gestures/gesture_sequence.cc
@@ -99,7 +99,7 @@ GestureSequence::Gestures* GestureSequence::ProcessTouchEventForGesture(
}
void GestureSequence::Reset() {
- state_ = GS_NO_GESTURE;
+ set_state(GS_NO_GESTURE);
for (int i = 0; i < point_count_; ++i)
points_[i].Reset();
}
@@ -196,6 +196,7 @@ bool GestureSequence::Click(const TouchEvent& event,
AppendClickGestureEvent(point, gestures);
if (point.IsInDoubleClickWindow(event))
AppendDoubleClickGestureEvent(point, gestures);
+ set_state(GS_NO_GESTURE);
return true;
}
return false;
@@ -218,6 +219,8 @@ bool GestureSequence::InClickOrScroll(const TouchEvent& event,
bool GestureSequence::InScroll(const TouchEvent& event,
const GesturePoint& point, Gestures* gestures) {
+ if (!point.DidScroll(event))
+ return false;
AppendScrollGestureUpdate(point, gestures);
return true;
}
@@ -242,7 +245,6 @@ bool GestureSequence::ScrollEnd(const TouchEvent& event,
point.y_velocity());
else
AppendScrollGestureEnd(point, gestures, 0.f, 0.f);
- set_state(GS_NO_GESTURE);
Reset();
return false;
}
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698