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

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: avi CR feedback 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..611ee4d1a43501f6ac1862f99a6283e26da3d2f7 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(
+ ToWebInputEventType(event.GetAction()),
+ (event.GetEventTime() - base::TimeTicks()).InSecondsF(),
+ &result);
result.touchesLength =
std::min(event.GetPointerCount(),

Powered by Google App Engine
This is Rietveld 408576698