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

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

Issue 2726623002: Fixed two-finger pan filtering with 'touch-action: pan-x pan-y'. (Closed)
Patch Set: Dave's comments. Created 3 years, 9 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 | content/browser/renderer_host/input/touch_action_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_action_filter.h
diff --git a/content/browser/renderer_host/input/touch_action_filter.h b/content/browser/renderer_host/input/touch_action_filter.h
index 34e32d5abbf11b53d7775928ef56e052bcb883d2..7296c1fbc3a0815b7d17d0fa5b039acd019d7140 100644
--- a/content/browser/renderer_host/input/touch_action_filter.h
+++ b/content/browser/renderer_host/input/touch_action_filter.h
@@ -20,11 +20,13 @@ namespace content {
// each touch point.
// For details see the touch-action design doc at http://goo.gl/KcKbxQ.
class CONTENT_EXPORT TouchActionFilter {
-public:
+ public:
TouchActionFilter();
- // Returns true if the supplied gesture event should be dropped based on
- // the current touch-action state.
+ // Returns true if the supplied gesture event should be dropped based on the
+ // current touch-action state. Otherwise returns false, and possibly modifies
+ // the event's directional parameters to make the event compatible with
+ // the effective touch-action.
bool FilterGestureEvent(blink::WebGestureEvent* gesture_event);
// Called when a set-touch-action message is received from the renderer
@@ -39,18 +41,12 @@ public:
TouchAction allowed_touch_action() const { return allowed_touch_action_; }
- // Return the intersection of two TouchAction values.
- static TouchAction Intersect(TouchAction ta1, TouchAction ta2);
+ private:
+ bool ShouldSuppressManipulation(const blink::WebGestureEvent&);
+ bool FilterManipulationEventAndResetState();
-private:
- bool ShouldSuppressScroll(const blink::WebGestureEvent& gesture_event);
- bool FilterScrollEndingGesture();
-
- // Whether GestureScroll events should be discarded due to touch-action.
- bool drop_scroll_gesture_events_;
-
- // Whether GesturePinch events should be discarded due to touch-action.
- bool drop_pinch_gesture_events_;
+ // Whether scroll and pinch gestures should be discarded due to touch-action.
+ bool suppress_manipulation_events_;
// Whether a tap ending event in this sequence should be discarded because a
// previous GestureTapUnconfirmed event was turned into a GestureTap.
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_action_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698