diff options
author | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 18:12:13 +0000 |
---|---|---|
committer | stuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-08-05 18:12:13 +0000 |
commit | 2232994678ec89c06624afee2ae213953b69c208 (patch) | |
tree | deb00a984f3072883a824ef207b8f7c194a075ad /webkit | |
parent | f128af4416a16b249e1404d9abe9b6bacd1cd726 (diff) | |
download | chromium_src-2232994678ec89c06624afee2ae213953b69c208.zip chromium_src-2232994678ec89c06624afee2ae213953b69c208.tar.gz chromium_src-2232994678ec89c06624afee2ae213953b69c208.tar.bz2 |
Remove the coordinate hack for zoomed plugin pages on the Mac.
Now that the underlying bug is fixed, the relative coordinates can be trusted regardless of zoom level.
BUG=51078
TEST=Mouseovers should still work in all plugins on the Mac.
Review URL: http://codereview.chromium.org/3072026
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_mac.mm | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm index efa6bdd..98bafa4 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm +++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm @@ -497,12 +497,6 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( if (WebInputEvent::isMouseEventType(event.type) || event.type == WebInputEvent::MouseWheel) { - // Ideally we would compute the content origin from the web event using the - // code below as a safety net for missed content area location changes. - // Because of <http://crbug.com/9996>, however, only globalX/Y are right if - // the page has been zoomed, so for now the coordinates we get aren't - // trustworthy enough to use for corrections. -#if PLUGIN_SCALING_FIXED // Check our plugin location before we send the event to the plugin, just // in case we somehow missed a plugin frame change. const WebMouseEvent* mouse_event = @@ -517,7 +511,6 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( << content_origin; SetContentAreaOrigin(content_origin); } -#endif current_windowless_cursor_.GetCursorInfo(cursor_info); } @@ -593,25 +586,6 @@ bool WebPluginDelegateImpl::PlatformHandleInputEvent( } } -#ifndef PLUGIN_SCALING_FIXED - // Because of <http://crbug.com/9996>, the non-global coordinates we get for - // zoomed pages are wrong. As a temporary hack around that bug, override the - // coordinates we are given with ones computed based on our knowledge of where - // the plugin is on screen. We only need to do this for Cocoa, since Carbon - // only uses the global coordinates. - if (instance()->event_model() == NPEventModelCocoa && - (WebInputEvent::isMouseEventType(event.type) || - event.type == WebInputEvent::MouseWheel)) { - const WebMouseEvent* mouse_event = - static_cast<const WebMouseEvent*>(&event); - NPCocoaEvent* cocoa_event = static_cast<NPCocoaEvent*>(plugin_event); - cocoa_event->data.mouse.pluginX = - mouse_event->globalX - content_area_origin_.x() - window_rect_.x(); - cocoa_event->data.mouse.pluginY = - mouse_event->globalY - content_area_origin_.y() - window_rect_.y(); - } -#endif - // Send the plugin the event. scoped_ptr<NPAPI::ScopedCurrentPluginEvent> event_scope(NULL); if (instance()->event_model() == NPEventModelCocoa) { |