Bug 875454 - Rework handling of per-site plugin permissions in objectloadingcontent such that users can disable or enable plugins per-site no matter what their "global" permission is (currently only plugins marked click-to-activate globally honor per-site overrides). Also change the pageInfo UI such that "use default" is separate from the explicit click-to-play setting. r=jschoenick/jaws

This commit is contained in:
Benjamin Smedberg
2013-06-11 10:58:43 -04:00
parent 2e11f79384
commit 885ffdf469
15 changed files with 200 additions and 229 deletions

View File

@@ -1790,13 +1790,6 @@ nsNPAPIPluginInstance::CheckJavaC2PJSObjectQuirk(uint16_t paramCount,
return;
}
bool isClickToPlay;
nsAutoCString mimeType(mMIMEType);
rv = pluginHost->IsPluginClickToPlayForType(mimeType, &isClickToPlay);
if (NS_FAILED(rv) || !isClickToPlay) {
return;
}
nsPluginTag* pluginTag = pluginHost->TagForPlugin(mPlugin);
if (!pluginTag ||
!pluginTag->mIsJavaPlugin) {
@@ -1807,10 +1800,10 @@ nsNPAPIPluginInstance::CheckJavaC2PJSObjectQuirk(uint16_t paramCount,
bool haveCodeParam = false;
bool isCodeParamEmpty = true;
for (uint16_t i = 0; i < paramCount; ++i) {
if (PL_strcasecmp(paramNames[i], "code") == 0) {
for (uint16_t i = paramCount; i > 0; --i) {
if (PL_strcasecmp(paramNames[i - 1], "code") == 0) {
haveCodeParam = true;
if (strlen(paramValues[i]) > 0) {
if (strlen(paramValues[i - 1]) > 0) {
isCodeParamEmpty = false;
}
break;