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

Unified Diff: content/browser/frame_host/render_widget_host_view_guest.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
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/frame_host/render_widget_host_view_guest.cc
diff --git a/content/browser/frame_host/render_widget_host_view_guest.cc b/content/browser/frame_host/render_widget_host_view_guest.cc
index c7ef31b53cee8d0843133d6b67ab3e008c0a8250..c564a282faf1ba75e4fa1c4396ec09666219e4fe 100644
--- a/content/browser/frame_host/render_widget_host_view_guest.cc
+++ b/content/browser/frame_host/render_widget_host_view_guest.cc
@@ -13,6 +13,7 @@
#include "content/common/frame_messages.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/host_shared_bitmap_manager.h"
+#include "content/common/input/web_touch_event_traits.h"
#include "content/common/view_messages.h"
#include "content/common/webplugin_geometry.h"
#include "content/public/common/content_switches.h"
@@ -531,8 +532,12 @@ void RenderWidgetHostViewGuest::DispatchCancelTouchEvent(
return;
blink::WebTouchEvent cancel_event;
- cancel_event.type = blink::WebInputEvent::TouchCancel;
- cancel_event.timeStampSeconds = event->time_stamp().InSecondsF();
+ // TODO(rbyers): This event has no touches in it. Don't we need to know what
+ // touches are currently active in order to cancel them all properly?
+ WebTouchEventTraits::ResetType(blink::WebInputEvent::TouchCancel,
+ event->time_stamp().InSecondsF(),
+ &cancel_event);
+
host_->ForwardTouchEventWithLatencyInfo(cancel_event, *event->latency());
}
« no previous file with comments | « no previous file | content/browser/renderer_host/input/input_router_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698