diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 20:59:51 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-24 20:59:51 +0000 |
commit | 2a7b9180e8aba079c7b434db8668948aa0871a4d (patch) | |
tree | c6f198d73775317c8fe81c1c1fbec0cac1b77a12 /webkit | |
parent | a8911fe76daddfa7222bec70847a031bbc26bd99 (diff) | |
download | chromium_src-2a7b9180e8aba079c7b434db8668948aa0871a4d.zip chromium_src-2a7b9180e8aba079c7b434db8668948aa0871a4d.tar.gz chromium_src-2a7b9180e8aba079c7b434db8668948aa0871a4d.tar.bz2 |
Fix drag event filtering in Mac plugins
BUG=39193
TEST=Drags in plugins should work. Drags starting outside plugins should still be filtered.
Review URL: http://codereview.chromium.org/1308001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42531 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index 54ae151..3a6155d 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -1110,10 +1110,12 @@ static bool EventIsRelatedToDrag(const WebInputEvent& event, int drag_buttons) { (drag_buttons & WebInputEvent::MiddleButtonDown)) || (mouse_event->button == WebMouseEvent::ButtonRight && (drag_buttons & WebInputEvent::RightButtonDown))); - case WebInputEvent::MouseMove: case WebInputEvent::MouseEnter: - case WebInputEvent::MouseLeave: return (event.modifiers & WebEventButtonModifierMask()) != 0; + case WebInputEvent::MouseLeave: + case WebInputEvent::MouseMove: + return (drag_buttons && + drag_buttons == (event.modifiers & WebEventButtonModifierMask())); default: return false; } |