summaryrefslogtreecommitdiffstats
path: root/webkit/glue/webplugin_impl.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 03:01:12 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-11-21 03:01:12 +0000
commitd142f02d6c7c04082749efc6b1a4f794f4764dee (patch)
tree637ededa63abd4df7c471841252d070e1c232a17 /webkit/glue/webplugin_impl.h
parentaea0852a5bbcc1001a1f2a3bfc6ad19993f19e26 (diff)
downloadchromium_src-d142f02d6c7c04082749efc6b1a4f794f4764dee.zip
chromium_src-d142f02d6c7c04082749efc6b1a4f794f4764dee.tar.gz
chromium_src-d142f02d6c7c04082749efc6b1a4f794f4764dee.tar.bz2
Fix Silverlight windowless plugin painting issues. This fixes the
following issues:- 1. http://code.google.com/p/chromium/issues/detail?id=4272 2. http://code.google.com/p/chromium/issues/detail?id=301 (Partially) The fixes are as below:- 1. Silverlight in the NPP_HandleEvent call for WM_PAINT, calls NPN_GetProperty for a bunch of properties like pageXOffset, pageYOffset, etc. It expects these properties to have integer types on return. We always return double. Firefox returns integer for these properties. Added a check in the conversion to NPVariant function in v8 to check for whether the value is an integer and return the intger type. 2. When the windowless plugin calls NPN_InvalidateRect we ask the plugin to paint in the same call, which the Silverlight plugin does not like. It relies on the fact that browsers would initiate invalidation asynchronously and eventually paint. This is a perfectly legal assumption. The Flash plugin does work if we synchronously ask it to paint. However other plugins could have similar issues. I verified with worldofwarcraft.com to see if the async paint has any sideeffects and there were none. 3.If the Silverlight plugin is not visible initially as on msdn.microsoft.com, it does not paint. This occurs because the plugin expects proper paints to come from the browser. It does not invalidate itself in UpdateGeometry as Flash. The plugin widget on msdn is not dynamic. It does call NPN_InvalidateRect initially when it is not visible. We don't send the call to the renderer as the plugin is not visible. To workaround this we now track the damaged rect even if the rect does not intersect the clipping rect of the plugin. In a geometry update if the plugin is visible, we send over the accumulated damaged rect to the renderer. The Silverlight plugin instance on msdn.microsoft.com does not work correctly even with these fixes. However it paints correctly. R=jam Bug=4272,301 Review URL: http://codereview.chromium.org/11492 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5816 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/webplugin_impl.h')
-rw-r--r--webkit/glue/webplugin_impl.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/webkit/glue/webplugin_impl.h b/webkit/glue/webplugin_impl.h
index e16f1b6..3cc60ed 100644
--- a/webkit/glue/webplugin_impl.h
+++ b/webkit/glue/webplugin_impl.h
@@ -305,7 +305,8 @@ class WebPluginImpl : public WebPlugin,
WebPluginDelegate* delegate_;
bool force_geometry_update_;
bool visible_;
- // Set when we receive the first paint notification for the plugin widget.
+ // Set when we receive the first paint notification for a windowed
+ // plugin widget.
bool received_first_paint_notification_;
WebPluginContainer* widget_;