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

Unified Diff: content/renderer/browser_plugin/browser_plugin.cc

Issue 2101663002: Send synthetic GestureTapDown to focus BrowserPlugin (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address suggestions. Created 4 years, 6 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 | « content/browser/frame_host/render_widget_host_view_guest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/browser_plugin/browser_plugin.cc
diff --git a/content/renderer/browser_plugin/browser_plugin.cc b/content/renderer/browser_plugin/browser_plugin.cc
index 3a01dac287360e1c0c5d3bb155aac0e32e021e05..75d15c837cc3f8fddb32c19cad62b2d8b60d3bc7 100644
--- a/content/renderer/browser_plugin/browser_plugin.cc
+++ b/content/renderer/browser_plugin/browser_plugin.cc
@@ -429,8 +429,14 @@ blink::WebInputEventResult BrowserPlugin::handleInputEvent(
if (blink::WebInputEvent::isGestureEventType(event.type)) {
auto gesture_event = static_cast<const blink::WebGestureEvent&>(event);
- if (gesture_event.resendingPluginId == browser_plugin_instance_id_)
- return blink::WebInputEventResult::NotHandled;
+ DCHECK(blink::WebInputEvent::GestureTapDown == event.type ||
+ gesture_event.resendingPluginId == browser_plugin_instance_id_);
+
+ // We shouldn't be forwarding GestureEvents to the Guest anymore. Indicate
+ // we handled this only if it's a non-resent event.
+ return gesture_event.resendingPluginId == browser_plugin_instance_id_
+ ? blink::WebInputEventResult::NotHandled
+ : blink::WebInputEventResult::HandledApplication;
}
if (event.type == blink::WebInputEvent::ContextMenu)
« no previous file with comments | « content/browser/frame_host/render_widget_host_view_guest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698