Bug 1312242 - Provide a default bgcolor flash var. Addresses a background transparency problem with transparent flash and async painting. r=aklotz

MozReview-Commit-ID: KEzb1vkkNXG
This commit is contained in:
Jim Mathies 2016-11-04 12:57:15 -05:00
parent 0a787f4951
commit bb379754c1

View File

@ -2731,6 +2731,17 @@ PluginModuleParent::NPP_NewInternal(NPMIMEType pluginType, NPP instance,
values.AppendElement(opaqueAttributeValue);
}
}
// Update the flashvar bgcolor if it's not set, fixes a rendering problem with
// async plugin painting and transparent flash.
if (supportsAsyncRender) {
NS_NAMED_LITERAL_CSTRING(bgcolorAttributeName, "bgcolor");
NS_NAMED_LITERAL_CSTRING(bgcolorAttributeDefault, "#FFFFFF");
if (!names.Contains(bgcolorAttributeName)) {
names.AppendElement(bgcolorAttributeName);
values.AppendElement(bgcolorAttributeDefault);
}
}
#endif
}