summaryrefslogtreecommitdiffstats
path: root/webkit
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-06 18:07:58 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-06 18:07:58 +0000
commit3d6d015cdee0c90403c57e5c03f59507e8963e97 (patch)
tree5f87d2a088de1f697a97eda0067aa00f352add7f /webkit
parent790788ac7de91db6f349a0ecd1c98fd240b73ca2 (diff)
downloadchromium_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')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_win.cc9
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);