diff options
author | iyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-04 21:02:47 +0000 |
---|---|---|
committer | iyengar@google.com <iyengar@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-09-04 21:02:47 +0000 |
commit | ae39b72585254eab92c5b9668bdb491a3ee2c3f8 (patch) | |
tree | 7c2963e43322f5d033ecbb5338b23c8aebcff92a | |
parent | 42a9ab0deed87ec463c7fd49e7d206380c9ee0cb (diff) | |
download | chromium_src-ae39b72585254eab92c5b9668bdb491a3ee2c3f8.zip chromium_src-ae39b72585254eab92c5b9668bdb491a3ee2c3f8.tar.gz chromium_src-ae39b72585254eab92c5b9668bdb491a3ee2c3f8.tar.bz2 |
Fixes the following bugs reported with the Silverlight plugin:-
http://code.google.com/p/chromium/issues/detail?id=248
http://code.google.com/p/chromium/issues/detail?id=666
The basic issue here was that the plugin would not paint correctly.
The URLs mentioned in this bug load windowed silverlight plugin instances,
which invoke the NPN_InvalidateRect API to paint. We send over the rects
to the renderer, however these don't generate paints as the plugin is
windowed. A peek at Safari's webkit implementation revealed that they
merely invoke the InvalidateRect windows API in this context.
The fix is to emulate this behavior.
Review URL: http://codereview.chromium.org/431
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1735 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | webkit/glue/plugins/plugin_host.cc | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/webkit/glue/plugins/plugin_host.cc b/webkit/glue/plugins/plugin_host.cc index 6da1986..a5e6573 100644 --- a/webkit/glue/plugins/plugin_host.cc +++ b/webkit/glue/plugins/plugin_host.cc @@ -173,6 +173,16 @@ void PluginHost::InvalidateRect(NPP id, NPRect* invalidRect) { DCHECK(plugin.get() != NULL); if (plugin.get() && plugin->webplugin()) { + if (!plugin->windowless()) { + RECT rect = {0}; + rect.left = invalidRect->left; + rect.right = invalidRect->right; + rect.top = invalidRect->top; + rect.bottom = invalidRect->bottom; + ::InvalidateRect(plugin->window_handle(), &rect, FALSE); + return; + } + if (plugin->throttle_invalidate()) { // We need to track plugin invalidates on a per instance basis. ThrottledInvalidates plugin_instance_invalidates; |