diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 19:14:50 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-31 19:14:50 +0000 |
commit | cd557923b2a5dafb6d49ac8e3b597e3793fc0874 (patch) | |
tree | 1b1d4e4893088c57872aa13f2c8bdc6a190f3fe0 /webkit/glue/plugins | |
parent | 612a2ca54f460ddf58f3bbcf6c399ec16bf0d315 (diff) | |
download | chromium_src-cd557923b2a5dafb6d49ac8e3b597e3793fc0874.zip chromium_src-cd557923b2a5dafb6d49ac8e3b597e3793fc0874.tar.gz chromium_src-cd557923b2a5dafb6d49ac8e3b597e3793fc0874.tar.bz2 |
linux: don't call NPP_SetWindow if the width/height is <= 0
This follows what Mozilla does, see https://bugzilla.mozilla.org/show_bug.cgi?id=108347
This fixes the gmail+flash = 100% CPU.
BUG=16844
Review URL: http://codereview.chromium.org/159689
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22165 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r-- | webkit/glue/plugins/webplugin_delegate_impl_gtk.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index d107a6d..0e394ce 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -315,6 +315,15 @@ void WebPluginDelegateImpl::WindowedSetWindow() { return; } + // See https://bugzilla.mozilla.org/show_bug.cgi?id=108347 + // If we call NPP_SetWindow with a <= 0 width or height, problems arise in + // Flash (and possibly other plugins). + // TODO(piman): the Mozilla code suggests that for the Java plugin, we should + // still call NPP_SetWindow in that case. We need to verify that. + if (window_rect_.width() <= 0 || window_rect_.height() <= 0) { + return; + } + instance()->set_window_handle(windowed_handle_); DCHECK(!instance()->windowless()); |