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

Unified Diff: content/browser/renderer_host/input/touch_action_filter.cc

Issue 171283002: Always reset touch action at the beginning of a new gesture sequence (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test name. Created 6 years, 10 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: content/browser/renderer_host/input/touch_action_filter.cc
diff --git a/content/browser/renderer_host/input/touch_action_filter.cc b/content/browser/renderer_host/input/touch_action_filter.cc
index eea8082cf90a8e9357d79ed71d983fd5d08256c1..7add9e105f806ccf4be50d1a29815182bdcf936c 100644
--- a/content/browser/renderer_host/input/touch_action_filter.cc
+++ b/content/browser/renderer_host/input/touch_action_filter.cc
@@ -118,7 +118,6 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
}
bool TouchActionFilter::FilterScrollEndingGesture() {
- allowed_touch_action_ = TOUCH_ACTION_AUTO;
DCHECK(!drop_pinch_gesture_events_);
if (drop_scroll_gesture_events_) {
drop_scroll_gesture_events_ = false;
@@ -142,6 +141,12 @@ void TouchActionFilter::OnSetTouchAction(TouchAction touch_action) {
allowed_touch_action_ = Intersect(allowed_touch_action_, touch_action);
}
+void TouchActionFilter::ResetTouchAction() {
+ DCHECK(!drop_scroll_gesture_events_);
+ DCHECK(!drop_pinch_gesture_events_);
+ allowed_touch_action_ = TOUCH_ACTION_AUTO;
+}
+
bool TouchActionFilter::ShouldSuppressScroll(
const blink::WebGestureEvent& gesture_event) {
DCHECK_EQ(gesture_event.type, WebInputEvent::GestureScrollBegin);

Powered by Google App Engine
This is Rietveld 408576698