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

Unified Diff: content/browser/renderer_host/input/touch_event_queue.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/touch_event_queue.cc
diff --git a/content/browser/renderer_host/input/touch_event_queue.cc b/content/browser/renderer_host/input/touch_event_queue.cc
index 8662f4a293c8245bd13d60f79fbf0041b3850ad5..7bdae28c9ddf166708b56a8e4abc95408288b2a4 100644
--- a/content/browser/renderer_host/input/touch_event_queue.cc
+++ b/content/browser/renderer_host/input/touch_event_queue.cc
@@ -9,7 +9,7 @@
#include "base/debug/trace_event.h"
#include "base/stl_util.h"
#include "content/browser/renderer_host/input/timeout_monitor.h"
-#include "content/browser/renderer_host/input/web_touch_event_traits.h"
+#include "content/common/input/web_touch_event_traits.h"
#include "content/public/common/content_switches.h"
#include "ui/gfx/geometry/point_f.h"
@@ -31,9 +31,11 @@ typedef std::vector<TouchEventWithLatencyInfo> WebTouchEventWithLatencyList;
TouchEventWithLatencyInfo ObtainCancelEventForTouchEvent(
const TouchEventWithLatencyInfo& event_to_cancel) {
TouchEventWithLatencyInfo event = event_to_cancel;
- event.event.type = WebInputEvent::TouchCancel;
- for (size_t i = 0; i < event.event.touchesLength; i++)
- event.event.touches[i].state = WebTouchPoint::StateCancelled;
+ WebTouchEventTraits::ResetType(&event.event,
+ WebInputEvent::TouchCancel,
+ // FIXME: Shouldn't we use a fresh timestamp?
+ event.event.timeStampSeconds,
jdduke (slow) 2014/04/23 21:55:47 Nah, I don't think it matters at this point.
Rick Byers 2014/04/23 23:15:35 Why? Shouldn't an app be able to see that a timeo
jdduke (slow) 2014/04/23 23:29:49 I think we're monotonically non-decreasing, and I
+ WebTouchEventTraits::RESET_TOUCHES_STATE);
return event;
}

Powered by Google App Engine
This is Rietveld 408576698