summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/webplugin_delegate_proxy.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:41:59 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-24 22:41:59 +0000
commit9a0d91236e8557d37498f002254a6a5427ebf842 (patch)
treea4d64897ccf21e860d1fe8f786f0f2c55481a7ee /chrome/renderer/webplugin_delegate_proxy.cc
parent6531594abea873c883782041fea5d126507497e1 (diff)
downloadchromium_src-9a0d91236e8557d37498f002254a6a5427ebf842.zip
chromium_src-9a0d91236e8557d37498f002254a6a5427ebf842.tar.gz
chromium_src-9a0d91236e8557d37498f002254a6a5427ebf842.tar.bz2
Fix transparent Silverlight plugins.
BUG=36691 Review URL: http://codereview.chromium.org/660007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@39943 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/webplugin_delegate_proxy.cc')
-rw-r--r--chrome/renderer/webplugin_delegate_proxy.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/chrome/renderer/webplugin_delegate_proxy.cc b/chrome/renderer/webplugin_delegate_proxy.cc
index a743a3f..4157a1f 100644
--- a/chrome/renderer/webplugin_delegate_proxy.cc
+++ b/chrome/renderer/webplugin_delegate_proxy.cc
@@ -268,9 +268,15 @@ bool WebPluginDelegateProxy::Initialize(const GURL& url,
params.arg_names = arg_names;
params.arg_values = arg_values;
params.host_render_view_routing_id = render_view_->routing_id();
+
+ bool flash =
+ LowerCaseEqualsASCII(mime_type_, "application/x-shockwave-flash");
+ bool silverlight =
+ StartsWithASCII(mime_type_, "application/x-silverlight", false);
for (size_t i = 0; i < arg_names.size(); ++i) {
- if (LowerCaseEqualsASCII(arg_names[i], "wmode") &&
- LowerCaseEqualsASCII(arg_values[i], "transparent")) {
+ if ((flash && LowerCaseEqualsASCII(arg_names[i], "wmode") &&
+ LowerCaseEqualsASCII(arg_values[i], "transparent")) ||
+ (silverlight && LowerCaseEqualsASCII(arg_names[i], "background"))) {
transparent_ = true;
}
}