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

Side by Side Diff: content/browser/renderer_host/input/web_touch_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: Fix test name. 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/browser/renderer_host/input/web_touch_event_traits.h"
6
7 #include "base/logging.h"
8
9 using blink::WebInputEvent;
10 using blink::WebTouchEvent;
11
12 namespace content {
13
14 bool WebTouchEventTraits::IsTouchSequenceStart(const WebTouchEvent& event) {
15 if (event.type != WebInputEvent::TouchStart)
16 return false;
17 DCHECK(event.touchesLength);
18 if (!event.touchesLength)
19 return false;
20 for (size_t i = 0; i < event.touchesLength; i++) {
21 if (event.touches[i].state != blink::WebTouchPoint::StatePressed)
22 return false;
23 }
24 return true;
25 }
26
27 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/input/web_touch_event_traits.h ('k') | content/content_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698