Bug 1038604 - Rename disableMCB to allowMixedContent. r=dao

This commit is contained in:
Trishul Goel 2014-07-16 22:03:15 +02:00
Родитель 315cc9a5fd
Коммит e3a2c2e2fb
5 изменённых файлов: 15 добавлений и 15 удалений

Просмотреть файл

@ -5137,14 +5137,14 @@ function handleLinkClick(event, href, linkNode) {
// if the mixedContentChannel is present and the referring URI passes
// a same origin check with the target URI, we can preserve the users
// decision of disabling MCB on a page for it's child tabs.
var persistDisableMCBInChildTab = false;
var persistAllowMixedContentInChildTab = false;
if (where == "tab" && gBrowser.docShell.mixedContentChannel) {
const sm = Services.scriptSecurityManager;
try {
var targetURI = makeURI(href);
sm.checkSameOriginURI(referrerURI, targetURI, false);
persistDisableMCBInChildTab = true;
persistAllowMixedContentInChildTab = true;
}
catch (e) { }
}
@ -5152,7 +5152,7 @@ function handleLinkClick(event, href, linkNode) {
urlSecurityCheck(href, doc.nodePrincipal);
openLinkIn(href, where, { referrerURI: referrerURI,
charset: doc.characterSet,
disableMCB: persistDisableMCBInChildTab});
allowMixedContent: persistAllowMixedContentInChildTab });
event.preventDefault();
return true;
}

Просмотреть файл

@ -857,14 +857,14 @@ nsContextMenu.prototype = {
// if the mixedContentChannel is present and the referring URI passes
// a same origin check with the target URI, we can preserve the users
// decision of disabling MCB on a page for it's child tabs.
var persistDisableMCBInChildTab = false;
var persistAllowMixedContentInChildTab = false;
if (this.browser.docShell && this.browser.docShell.mixedContentChannel) {
const sm = Services.scriptSecurityManager;
try {
var targetURI = this.linkURI;
sm.checkSameOriginURI(referrerURI, targetURI, false);
persistDisableMCBInChildTab = true;
persistAllowMixedContentInChildTab = true;
}
catch (e) { }
}
@ -872,7 +872,7 @@ nsContextMenu.prototype = {
openLinkIn(this.linkURL, "tab",
{ charset: doc.characterSet,
referrerURI: referrerURI,
disableMCB: persistDisableMCBInChildTab});
allowMixedContent: persistAllowMixedContentInChildTab });
},
// open URL in current tab

Просмотреть файл

@ -1284,7 +1284,7 @@
<![CDATA[
var aFromExternal;
var aRelatedToCurrent;
var aDisableMCB;
var aAllowMixedContent;
var aSkipAnimation;
if (arguments.length == 2 &&
typeof arguments[1] == "object" &&
@ -1297,7 +1297,7 @@
aAllowThirdPartyFixup = params.allowThirdPartyFixup;
aFromExternal = params.fromExternal;
aRelatedToCurrent = params.relatedToCurrent;
aDisableMCB = params.disableMCB;
aAllowMixedContent = params.allowMixedContent;
aSkipAnimation = params.skipAnimation;
}
@ -1313,7 +1313,7 @@
fromExternal: aFromExternal,
relatedToCurrent: aRelatedToCurrent,
skipAnimation: aSkipAnimation,
disableMCB: aDisableMCB});
allowMixedContent: aAllowMixedContent });
if (!bgLoad)
this.selectedTab = tab;
@ -1472,7 +1472,7 @@
var aFromExternal;
var aRelatedToCurrent;
var aSkipAnimation;
var aDisableMCB;
var aAllowMixedContent;
if (arguments.length == 2 &&
typeof arguments[1] == "object" &&
!(arguments[1] instanceof Ci.nsIURI)) {
@ -1485,7 +1485,7 @@
aFromExternal = params.fromExternal;
aRelatedToCurrent = params.relatedToCurrent;
aSkipAnimation = params.skipAnimation;
aDisableMCB = params.disableMCB;
aAllowMixedContent = params.allowMixedContent;
}
// if we're adding tabs, we're past interrupt mode, ditch the owner
@ -1656,7 +1656,7 @@
}
if (aFromExternal)
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FROM_EXTERNAL;
if (aDisableMCB)
if (aAllowMixedContent)
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_MIXED_CONTENT;
try {
b.loadURIWithFlags(aURI, flags, aReferrerURI, aCharset, aPostData);

Просмотреть файл

@ -8,7 +8,7 @@ add_task(function* checkIdentityOfAboutSupport() {
allowThirdPartyFixup: false,
relatedToCurrent: false,
skipAnimation: true,
disableMCB: false
allowMixedContent: false
});
yield promiseTabLoaded(tab);

Просмотреть файл

@ -214,7 +214,7 @@ function openLinkIn(url, where, params) {
var aCharset = params.charset;
var aReferrerURI = params.referrerURI;
var aRelatedToCurrent = params.relatedToCurrent;
var aDisableMCB = params.disableMCB;
var aAllowMixedContent = params.allowMixedContent;
var aInBackground = params.inBackground;
var aDisallowInheritPrincipal = params.disallowInheritPrincipal;
var aInitiatingDoc = params.initiatingDoc;
@ -337,7 +337,7 @@ function openLinkIn(url, where, params) {
allowThirdPartyFixup: aAllowThirdPartyFixup,
relatedToCurrent: aRelatedToCurrent,
skipAnimation: aSkipTabAnimation,
disableMCB: aDisableMCB});
allowMixedContent: aAllowMixedContent });
break;
}