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

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

Issue 247433003: Mark touchcancel events as uncancelable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Clean up and add tests Created 6 years, 8 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/browser/renderer_host/input/web_input_event_util.cc
diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc
index 8bce2c641c8100189214c7cb8687a4bfc76f029d..4271d9af4f64af6350169674461890a3a8b8f8df 100644
--- a/content/browser/renderer_host/input/web_input_event_util.cc
+++ b/content/browser/renderer_host/input/web_input_event_util.cc
@@ -5,6 +5,7 @@
#include "content/browser/renderer_host/input/web_input_event_util.h"
#include "base/strings/string_util.h"
+#include "content/common/input/web_touch_event_traits.h"
#include "ui/events/gesture_detection/gesture_event_data.h"
#include "ui/events/gesture_detection/motion_event.h"
@@ -216,11 +217,10 @@ blink::WebTouchEvent CreateWebTouchEventFromMotionEvent(
const ui::MotionEvent& event) {
blink::WebTouchEvent result;
- result.type = ToWebInputEventType(event.GetAction());
- DCHECK(WebInputEvent::isTouchEventType(result.type));
-
- result.timeStampSeconds =
- (event.GetEventTime() - base::TimeTicks()).InSecondsF();
+ WebTouchEventTraits::ResetType(&result,
+ ToWebInputEventType(event.GetAction()),
jdduke (slow) 2014/04/23 21:55:47 Yeah, could you run "git cl format" on the patch?
Rick Byers 2014/04/23 23:15:35 Done.
+ (event.GetEventTime() - base::TimeTicks()).InSecondsF(),
+ WebTouchEventTraits::IGNORE_TOUCHES_STATE);
result.touchesLength =
std::min(event.GetPointerCount(),

Powered by Google App Engine
This is Rietveld 408576698