Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Issue 11492: Fix Silverlight windowless plugin painting issues. This fixes the following... (Closed)

Created:
12 years, 1 month ago by ananta
Modified:
9 years, 6 months ago
Reviewers:
jam
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=5816

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+34 lines, -9 lines) Patch
M chrome/plugin/webplugin_proxy.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/plugin/webplugin_proxy.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 5 chunks +22 lines, -6 lines 0 comments Download
M webkit/glue/webplugin_impl.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M webkit/glue/webplugin_impl.cc View 1 chunk +1 line, -1 line 0 comments Download
M webkit/port/bindings/v8/v8_np_utils.cpp View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download

Messages

Total messages: 10 (0 generated)
ananta
12 years, 1 month ago (2008-11-19 21:34:23 UTC) #1
jam
http://codereview.chromium.org/11492/diff/1/6 File chrome/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/11492/diff/1/6#newcode101 Line 101: return; I'm wondering if instead of adding this ...
12 years, 1 month ago (2008-11-19 22:36:47 UTC) #2
ananta
Replies below:- On 2008/11/19 22:36:47, John Abd-El-Malek wrote: > http://codereview.chromium.org/11492/diff/1/6 > File chrome/plugin/webplugin_proxy.cc (right): > ...
12 years, 1 month ago (2008-11-19 23:52:12 UTC) #3
jam
http://codereview.chromium.org/11492/diff/202/17 File chrome/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/11492/diff/202/17#newcode97 Line 97: damaged_rect_ = damaged_rect_.Union(rect); instead of writing this line ...
12 years, 1 month ago (2008-11-20 02:44:10 UTC) #4
ananta
On 2008/11/20 02:44:10, John Abd-El-Malek wrote: > http://codereview.chromium.org/11492/diff/202/17 > File chrome/plugin/webplugin_proxy.cc (right): > > http://codereview.chromium.org/11492/diff/202/17#newcode97 ...
12 years, 1 month ago (2008-11-20 05:44:19 UTC) #5
jam
http://codereview.chromium.org/11492/diff/404/407 File chrome/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/11492/diff/404/407#newcode302 Line 302: // Send over any pending invalidates. can you ...
12 years, 1 month ago (2008-11-20 21:03:38 UTC) #6
ananta
On 2008/11/20 21:03:38, John Abd-El-Malek wrote: > http://codereview.chromium.org/11492/diff/404/407 > File chrome/plugin/webplugin_proxy.cc (right): > > http://codereview.chromium.org/11492/diff/404/407#newcode302 ...
12 years, 1 month ago (2008-11-20 23:10:20 UTC) #7
jam
lgtm http://codereview.chromium.org/11492/diff/229/46 File chrome/plugin/webplugin_proxy.cc (right): http://codereview.chromium.org/11492/diff/229/46#newcode306 Line 306: if (delegate_->windowless() && !clip_rect.IsEmpty() && shouldn't this ...
12 years, 1 month ago (2008-11-21 00:26:06 UTC) #8
ananta
On 2008/11/21 00:26:06, John Abd-El-Malek wrote: > lgtm > > http://codereview.chromium.org/11492/diff/229/46 > File chrome/plugin/webplugin_proxy.cc (right): ...
12 years, 1 month ago (2008-11-21 02:37:57 UTC) #9
jam
12 years, 1 month ago (2008-11-21 02:57:44 UTC) #10
lgtm

http://codereview.chromium.org/11492/diff/64/66
File chrome/plugin/webplugin_proxy.cc (right):

http://codereview.chromium.org/11492/diff/64/66#newcode304
Line 304: InvalidateRect(damaged_rect_);
nit: i think you need brace brackets here

Powered by Google App Engine
This is Rietveld 408576698