diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-15 17:05:13 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-01-15 17:05:13 +0000 |
commit | 01938c95315cec08d8bfed833e02374626ee9961 (patch) | |
tree | 820f9ca4ecf55fdba83bfa5d8b8f825aa36bd570 | |
parent | 404fea64f95074d4ace5551e695dbfc1e691f495 (diff) | |
download | chromium_src-01938c95315cec08d8bfed833e02374626ee9961.zip chromium_src-01938c95315cec08d8bfed833e02374626ee9961.tar.gz chromium_src-01938c95315cec08d8bfed833e02374626ee9961.tar.bz2 |
Always eat mouse clicks on plugins on the Mac
Not all plugins reliably report whether they have handled events; other Mac browsers don't allow clicks to "fall through" plugins (see for example WebNetscapePluginEventHandlerCarbon::mouseDown, which logs but discards the return value), so we'll do the same.
BUG=31358
TEST=Double-click in a plugin; it should not get a selection highlight.
Review URL: http://codereview.chromium.org/549067
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36361 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index abbd400..a0cecf5 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -767,6 +767,14 @@ bool WebPluginDelegateImpl::HandleInputEvent(const WebInputEvent& event, } } + if (WebInputEventIsWebMouseEvent(event)) { + // Plugins are not good about giving accurate information about whether or + // not they handled events, and other browsers on the Mac generally ignore + // the return value. We may need to expand this to other input types, but + // we'll need to be careful about things like Command-keys. + ret = true; + } + #ifndef NP_NO_CARBON if (instance()->event_model() == NPEventModelCarbon && instance()->drawing_model() == NPDrawingModelCoreGraphics) |