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

Side by Side Diff: content/common/input/web_input_event_traits.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: 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 unified diff | Download patch | Annotate | Revision Log
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 <bitset> 7 #include <bitset>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 10
(...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 case WebInputEvent::MouseEnter: 332 case WebInputEvent::MouseEnter:
333 case WebInputEvent::MouseLeave: 333 case WebInputEvent::MouseLeave:
334 case WebInputEvent::ContextMenu: 334 case WebInputEvent::ContextMenu:
335 return true; 335 return true;
336 default: 336 default:
337 break; 337 break;
338 } 338 }
339 return false; 339 return false;
340 } 340 }
341 341
342 bool WebInputEventTraits::IsNewTouchSequence(const WebTouchEvent& event) {
343 if (event.type != WebInputEvent::TouchStart)
344 return false;
345 if (!event.touchesLength)
Rick Byers 2014/02/18 22:01:15 This case should never happen, right? Maybe DHCEC
tdresser 2014/02/20 18:37:56 Done.
346 return false;
347 for (size_t i = 0; i < event.touchesLength; i++) {
348 if (event.touches[i].state != blink::WebTouchPoint::StatePressed)
349 return false;
350 }
351 return true;
352 }
353
342 } // namespace content 354 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698