summaryrefslogtreecommitdiffstats
path: root/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
diff options
context:
space:
mode:
authorstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 23:57:50 +0000
committerstuartmorgan@chromium.org <stuartmorgan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-04-14 23:57:50 +0000
commita3edf84415da5b5085364762f6ce0625ffd0b2d7 (patch)
tree10643a0da2fc96ca856c4dfe6eb41532a8a697a1 /webkit/glue/plugins/webplugin_delegate_impl_mac.mm
parente390e92f0270823f947a3468c13c6e0817358aac (diff)
downloadchromium_src-a3edf84415da5b5085364762f6ce0625ffd0b2d7.zip
chromium_src-a3edf84415da5b5085364762f6ce0625ffd0b2d7.tar.gz
chromium_src-a3edf84415da5b5085364762f6ce0625ffd0b2d7.tar.bz2
Fix offscren invalidation in windowless plugins
Fixes two related issues: - An invalidate that was entirely off screen, but for a plugin that was partial on-screen, would not trigger a paint when the damaged area was scrolled back into view (all platforms). - When a Mac plugin's container became visible, damaged regions were not repainted (Mac only). BUG=41383 TEST=See bug. Review URL: http://codereview.chromium.org/1629018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@44582 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins/webplugin_delegate_impl_mac.mm')
-rw-r--r--webkit/glue/plugins/webplugin_delegate_impl_mac.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
index 7f33a52..a2ee61d 100644
--- a/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
+++ b/webkit/glue/plugins/webplugin_delegate_impl_mac.mm
@@ -688,6 +688,13 @@ void WebPluginDelegateImpl::SetContainerVisibility(bool is_visible) {
PluginVisibilityChanged();
WindowlessSetWindow(true);
}
+
+ // When the plugin become visible, send an empty invalidate. If there were any
+ // pending invalidations this will trigger a paint event for the damaged
+ // region, and if not it's a no-op. This is necessary since higher levels
+ // that would normally do this weren't responsible for the clip_rect_ change).
+ if (!clip_rect_.IsEmpty())
+ instance()->webplugin()->InvalidateRect(gfx::Rect());
}
// Update the size of the IOSurface to match the current size of the plug-in,