Make the Silverlight CAOpenGLLayer opaque if we know the plug-in contents is opaque to reduce blending
Created attachment 157273 [details] Patch
Comment on attachment 157273 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=157273&action=review > Source/WebKit2/Shared/Plugins/PluginQuirks.h:48 > + // NPPVpluginTransparentBool, so we'll always force it unless the plug-in has a "background" > + // attribute that specifies a opaque color. > + MakeOpaqueUnlessTransparentSilverlightBackgroundAttributeExists, It might be worth noting in this comment that the docs say "a null value for the Background property of the Silverlight plug-in is interpreted as the named color White.", so no colorValue param means opaque. > Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp:557 > + if (backgroundValue == "#000000") > + return false; This is fragile, as it would break if the content changed. Sucks that these aren't CSS colors :(
(In reply to comment #2) > (From update of attachment 157273 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=157273&action=review > > > Source/WebKit2/Shared/Plugins/PluginQuirks.h:48 > > + // NPPVpluginTransparentBool, so we'll always force it unless the plug-in has a "background" > > + // attribute that specifies a opaque color. > > + MakeOpaqueUnlessTransparentSilverlightBackgroundAttributeExists, > > It might be worth noting in this comment that the docs say "a null value for the Background property of the Silverlight plug-in is interpreted as the named color White.", so no colorValue param means opaque. > Good idea. Fixed! > > Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp:557 > > + if (backgroundValue == "#000000") > > + return false; > > This is fragile, as it would break if the content changed. Sucks that these aren't CSS colors :( I agree. I'll do the more extensive color parsing in a followup patch. Thanks for the review!
Committed r125081: <http://trac.webkit.org/changeset/125081>