diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 00:34:55 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-07 00:34:55 +0000 |
commit | 56fcc3f051d030df1195fc543b93fca550b4e8e0 (patch) | |
tree | a6b3dab85957beb109c1d34e68dc1f0c2a6b6435 /webkit/glue/plugins | |
parent | 37095fe7d4408ba30977c59f6f3cb7f985ba34f0 (diff) | |
download | chromium_src-56fcc3f051d030df1195fc543b93fca550b4e8e0.zip chromium_src-56fcc3f051d030df1195fc543b93fca550b4e8e0.tar.gz chromium_src-56fcc3f051d030df1195fc543b93fca550b4e8e0.tar.bz2 |
linux: fix windowless Flash when scrolling
Apparently on linux windowless Flash needs a paint after a NPP_SetWindow, otherwise it cancels its timer to do InvalidateRect.
Also in this change: WebKit calls WebPluginImpl::setFrameRect at each paint, even if the rects haven't changed. That used to always send a message to the plugin process, which is unnecessary (that case is always a no-op in the WebPluginDelegateImpl), so I fixed that too.
BUG=18423
Review URL: http://codereview.chromium.org/159907
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22702 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, 8 insertions, 1 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc index 0e394ce..eb9f963 100644 --- a/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc +++ b/webkit/glue/plugins/webplugin_delegate_impl_gtk.cc @@ -74,7 +74,8 @@ WebPluginDelegateImpl::WebPluginDelegateImpl( if (instance_->mime_type() == "application/x-shockwave-flash") { // Flash is tied to Firefox's whacky behavior with windowless plugins. See // comments in WindowlessPaint - quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW; + quirks_ |= PLUGIN_QUIRK_WINDOWLESS_OFFSET_WINDOW_TO_DRAW + | PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW; } } @@ -616,6 +617,12 @@ void WebPluginDelegateImpl::WindowlessSetWindow(bool force_set_window) { NPError err = instance()->NPP_SetWindow(&window_); DCHECK(err == NPERR_NO_ERROR); + if (quirks_ & PLUGIN_QUIRK_WINDOWLESS_INVALIDATE_AFTER_SET_WINDOW) { + // After a NPP_SetWindow, Flash cancels its timer that generates the + // invalidates until it gets a paint event, but doesn't explicitly call + // NPP_InvalidateRect. + plugin_->InvalidateRect(clip_rect_); + } } void WebPluginDelegateImpl::SetFocus() { |