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

Side by Side Diff: content/common/input/web_input_event_traits.cc

Issue 78263003: Ignore TouchCancel ack dispositions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: REbase Created 7 years 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/input/web_input_event_traits.h" 5 #include "content/common/input/web_input_event_traits.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 8
9 using blink::WebGestureEvent; 9 using blink::WebGestureEvent;
10 using blink::WebInputEvent; 10 using blink::WebInputEvent;
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 } 278 }
279 279
280 void WebInputEventTraits::Coalesce(const WebInputEvent& event_to_coalesce, 280 void WebInputEventTraits::Coalesce(const WebInputEvent& event_to_coalesce,
281 WebInputEvent* event) { 281 WebInputEvent* event) {
282 DCHECK(event); 282 DCHECK(event);
283 Apply(WebInputEventCoalesce(), event->type, event_to_coalesce, event); 283 Apply(WebInputEventCoalesce(), event->type, event_to_coalesce, event);
284 } 284 }
285 285
286 bool WebInputEventTraits::IgnoresAckDisposition( 286 bool WebInputEventTraits::IgnoresAckDisposition(
287 blink::WebInputEvent::Type type) { 287 blink::WebInputEvent::Type type) {
288 return type == WebInputEvent::GestureTapDown || 288 switch (type) {
289 type == WebInputEvent::GestureShowPress || 289 case WebInputEvent::GestureTapDown:
290 type == WebInputEvent::GestureTapCancel || 290 case WebInputEvent::GestureShowPress:
291 type == WebInputEvent::GesturePinchBegin || 291 case WebInputEvent::GestureTapCancel:
292 type == WebInputEvent::GesturePinchEnd || 292 case WebInputEvent::GesturePinchBegin:
293 type == WebInputEvent::GestureScrollBegin || 293 case WebInputEvent::GesturePinchEnd:
294 type == WebInputEvent::GestureScrollEnd; 294 case WebInputEvent::GestureScrollBegin:
295 case WebInputEvent::GestureScrollEnd:
296 case WebInputEvent::TouchCancel:
297 return true;
298 default:
299 break;
300 }
301 return false;
295 } 302 }
296 303
297 } // namespace content 304 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698