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

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

Issue 2126323002: Add support for touch-action: pinch-zoom. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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/common/input_messages.h » ('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 e8f23354bd6a27e205fc3d3cad77030a70268ff8..e2a8e69e863a1517a13076ef37dbec127eaebf5b 100644
--- a/content/browser/renderer_host/input/touch_action_filter.cc
+++ b/content/browser/renderer_host/input/touch_action_filter.cc
@@ -88,16 +88,8 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
case WebInputEvent::GesturePinchBegin:
DCHECK(!drop_pinch_gesture_events_);
- if (allowed_touch_action_ & TOUCH_ACTION_PINCH_ZOOM) {
- // Pinch events are always bracketed by scroll events, and the W3C
Rick Byers 2016/07/07 21:09:14 Ah crap, I forgot about this comment I left. I th
- // standard touch-action provides no way to disable scrolling without
- // 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;
- }
+ drop_pinch_gesture_events_ =
+ (allowed_touch_action_ & TOUCH_ACTION_PINCH_ZOOM) != 0;
return drop_pinch_gesture_events_;
case WebInputEvent::GesturePinchUpdate:
@@ -108,7 +100,6 @@ bool TouchActionFilter::FilterGestureEvent(WebGestureEvent* gesture_event) {
drop_pinch_gesture_events_ = false;
return true;
}
- DCHECK(!drop_scroll_gesture_events_);
break;
// The double tap gesture is a tap ending event. If a double tap gesture is
« no previous file with comments | « no previous file | content/common/input_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698