diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 18:07:58 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-04-06 18:07:58 +0000 |
commit | 3d6d015cdee0c90403c57e5c03f59507e8963e97 (patch) | |
tree | 5f87d2a088de1f697a97eda0067aa00f352add7f /webkit/glue/plugins | |
parent | 790788ac7de91db6f349a0ecd1c98fd240b73ca2 (diff) | |
download | chromium_src-3d6d015cdee0c90403c57e5c03f59507e8963e97.zip chromium_src-3d6d015cdee0c90403c57e5c03f59507e8963e97.tar.gz chromium_src-3d6d015cdee0c90403c57e5c03f59507e8963e97.tar.bz2 |
On sites like hulu.com while playing a video the cursor would not disappear if it was within the bounds of the plugin. This was because of the
SetCursorPatch for the flash plugin in Windows. The plugin periodically calls SetCursor and we only allow this call in the context of a HandleEvent
for a mouse event. This results in the SetCursor attempt by the plugin to fail. The reason we do this is to prevent annoying flicker if the plugin
in the background tab keeps changing the cursor.
Fix is to set the cursor only if has changed.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=33549
Bug=33549
Review URL: http://codereview.chromium.org/1576020
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43731 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_win.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_win.cc b/webkit/glue/plugins/webplugin_delegate_impl_win.cc index ad31021..c898519 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_win.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_win.cc @@ -1285,8 +1285,13 @@ HCURSOR WINAPI WebPluginDelegateImpl::SetCursorPatch(HCURSOR cursor) { // instantiated on the plugin thread. This causes annoying cursor flicker // when the mouse is moved on a foreground tab, with a windowless plugin // instance in a background tab. We just ignore the call here. - if (!g_current_plugin_instance) - return GetCursor(); + if (!g_current_plugin_instance) { + HCURSOR current_cursor = GetCursor(); + if (current_cursor != cursor) { + SetCursor(cursor); + } + return current_cursor; + } if (!g_current_plugin_instance->IsWindowless()) { return SetCursor(cursor); |