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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: content/common/input/web_input_event_traits.cc
diff --git a/content/common/input/web_input_event_traits.cc b/content/common/input/web_input_event_traits.cc
index 3ef17e7ac718de655d96a226cb265fd8feed1dc1..0326bb0a574e35d6b2bf14ea7c02dcf62c1aa2cc 100644
--- a/content/common/input/web_input_event_traits.cc
+++ b/content/common/input/web_input_event_traits.cc
@@ -339,4 +339,16 @@ bool WebInputEventTraits::IgnoresAckDisposition(
return false;
}
+bool WebInputEventTraits::IsNewTouchSequence(const WebTouchEvent& event) {
+ if (event.type != WebInputEvent::TouchStart)
+ return false;
+ 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.
+ return false;
+ for (size_t i = 0; i < event.touchesLength; i++) {
+ if (event.touches[i].state != blink::WebTouchPoint::StatePressed)
+ return false;
+ }
+ return true;
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698