Force Flash and Silverlight plugins to use opaque (windowless) mode when rendering off-screen (issue #214).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@230 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-05-10 15:55:18 +00:00
parent 82a5bb1259
commit 092c4e4a9f
1 changed files with 8 additions and 3 deletions

View File

@ -564,7 +564,7 @@ WebPlugin* BrowserWebViewDelegate::createPlugin(
"application/x-silverlight", false); "application/x-silverlight", false);
if (flash || silverlight) { if (flash || silverlight) {
// Force Flash and Silverlight plugins to use opaque (windowless) mode. // Force Flash and Silverlight plugins to use windowless mode.
DCHECK(params.attributeNames.size() == params.attributeValues.size()); DCHECK(params.attributeNames.size() == params.attributeValues.size());
size_t size = params.attributeNames.size(); size_t size = params.attributeNames.size();
@ -575,8 +575,13 @@ WebPlugin* BrowserWebViewDelegate::createPlugin(
new_values[i] = params.attributeValues[i]; new_values[i] = params.attributeValues[i];
} }
new_names[size] = "wmode"; if (flash) {
new_values[size] = "opaque"; new_names[size] = "wmode";
new_values[size] = "opaque";
} else if (silverlight) {
new_names[size] = "windowless";
new_values[size] = "true";
}
WebPluginParams new_params = params; WebPluginParams new_params = params;
new_params.attributeNames.swap(new_names); new_params.attributeNames.swap(new_names);