diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 19:07:37 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 19:07:37 +0000 |
commit | 4087b4152b3525bffa7b8cb22a04a81827d7e88d (patch) | |
tree | 2740c10273a635aa2ab31db097a9049ad888ba9a /webkit | |
parent | 2dac19b5d381ed5230fe0bc3f96b6476b1150ddd (diff) | |
download | chromium_src-4087b4152b3525bffa7b8cb22a04a81827d7e88d.zip chromium_src-4087b4152b3525bffa7b8cb22a04a81827d7e88d.tar.gz chromium_src-4087b4152b3525bffa7b8cb22a04a81827d7e88d.tar.bz2 |
Move forcing the return of NPP_HandleEvent to be true on Win/Linux to webplugin_delegate_impl so that it doesn't happen for Pepper plugins.
BUG=25183
Review URL: http://codereview.chromium.org/669145
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 9 | ||||
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_win.cc | 12 |
2 files changed, 21 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 2f0948b..23f4143 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -20,6 +20,8 @@ #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" +// TODO(jabdelmalek): remove me once two sided patch lands +#include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" #include "webkit/glue/webplugin.h" #include "webkit/glue/plugins/gtk_plugin_container.h" #include "webkit/glue/plugins/plugin_constants_win.h" @@ -696,6 +698,13 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( } bool ret = instance()->NPP_HandleEvent(&np_event) != 0; + // TODO(jabdelmalek): remove the ifdef, and include, once the WebKit side + // lands. +#ifdef WEBPLUGINCONTAINER_DOESNT_MODIFY_HANDLED + // Flash always returns false, even when the event is handled. + ret = true; +#endif + #if 0 if (event->event == WM_MOUSEMOVE) { // Snag a reference to the current cursor ASAP in case the plugin modified diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc index a02dd44..a11fc40 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc @@ -18,6 +18,8 @@ #include "base/win_util.h" #include "skia/ext/platform_canvas.h" #include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h" +// TODO(jabdelmalek): remove me once two sided patch lands +#include "third_party/WebKit/WebKit/chromium/public/WebPluginContainer.h" #include "webkit/default_plugin/plugin_impl.h" #include "webkit/glue/plugins/plugin_constants_win.h" #include "webkit/glue/plugins/plugin_instance.h" @@ -1144,6 +1146,16 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( bool ret = instance()->NPP_HandleEvent(&np_event) != 0; + // TODO(jabdelmalek): remove the ifdef, and include, once the WebKit side + // lands. +#ifdef WEBPLUGINCONTAINER_DOESNT_MODIFY_HANDLED + // Flash and SilverLight always return false, even when they swallow the + // event. Flash does this because it passes the event to its window proc, + // which is supposed to return 0 if an event was handled. There are few + // exceptions, such as IME, where it sometimes returns true. + ret = true; +#endif + if (np_event.event == WM_MOUSEMOVE) { // Snag a reference to the current cursor ASAP in case the plugin modified // it. There is a nasty race condition here with the multiprocess browser |