diff options
author | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 05:22:12 +0000 |
---|---|---|
committer | qinmin@chromium.org <qinmin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-02-08 05:22:12 +0000 |
commit | 751ab65da9518c7d6b71580ac11e10315dcf36af (patch) | |
tree | b76fb807f8127a4bd41b8e2bdb23f70f0444dcc1 /webkit | |
parent | 8e6b6eef4df11ff990e32e150bceb3f6903e4e7e (diff) | |
download | chromium_src-751ab65da9518c7d6b71580ac11e10315dcf36af.zip chromium_src-751ab65da9518c7d6b71580ac11e10315dcf36af.tar.gz chromium_src-751ab65da9518c7d6b71580ac11e10315dcf36af.tar.bz2 |
Don't handle GestureTap events in WebViewPlugin
If we forward the GestureTap event to WebView, it will be converted to mouse events. And the click event will open a link if there is one.
However, the parent frame has no idea about this. So it will convert the gestureTap event again and pass the mouse events to WebViewPlugin. Thus causing a link to be clicked twice.
BUG=162140
Review URL: https://chromiumcodereview.appspot.com/12226064
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@181434 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/plugins/webview_plugin.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/webkit/plugins/webview_plugin.cc b/webkit/plugins/webview_plugin.cc index a9af016..975365b 100644 --- a/webkit/plugins/webview_plugin.cc +++ b/webkit/plugins/webview_plugin.cc @@ -162,6 +162,11 @@ bool WebViewPlugin::acceptsInputEvents() { bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, WebCursorInfo& cursor) { + // For tap events, don't handle them. They will be converted to + // mouse events later and passed to here. + if (event.type == WebInputEvent::GestureTap) + return false; + if (event.type == WebInputEvent::ContextMenu) { if (delegate_) { const WebMouseEvent& mouse_event = @@ -173,6 +178,7 @@ bool WebViewPlugin::handleInputEvent(const WebInputEvent& event, current_cursor_ = cursor; bool handled = web_view_->handleInputEvent(event); cursor = current_cursor_; + return handled; } |