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

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

Issue 197273003: Add support for touch-action: manipulation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move validation to IPC layer Created 6 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_unittest.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.cc
diff --git a/content/browser/renderer_host/input/touch_action_filter.cc b/content/browser/renderer_host/input/touch_action_filter.cc
index 80c85c3b91c9a44695f079a518e6de6757345e5c..94d5e3ea556a1eeb96b5175d5ebbabf8b5fecc8a 100644
--- a/content/browser/renderer_host/input/touch_action_filter.cc
+++ b/content/browser/renderer_host/input/touch_action_filter.cc
@@ -61,10 +61,13 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
case WebInputEvent::GesturePinchBegin:
DCHECK(!drop_pinch_gesture_events_);
- if (allowed_touch_action_ == TOUCH_ACTION_AUTO) {
+ if (allowed_touch_action_ == TOUCH_ACTION_AUTO ||
+ allowed_touch_action_ & TOUCH_ACTION_PINCH_ZOOM) {
// Pinch events are always bracketed by scroll events, and the W3C
// standard touch-action provides no way to disable scrolling without
- // also disabling pinching.
+ // also disabling pinching (validated by the IPC ENUM traits).
+ DCHECK(allowed_touch_action_ == TOUCH_ACTION_AUTO ||
+ allowed_touch_action_ == TOUCH_ACTION_MANIPULATION);
DCHECK(!drop_scroll_gesture_events_);
} else {
drop_pinch_gesture_events_ = true;
« no previous file with comments | « no previous file | content/browser/renderer_host/input/touch_action_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698