Bug 1877001 - Allow view-image to open a data: URI by setting a flag on the loadinfo. r=frg
This commit is contained in:
Родитель
6237f9b65d
Коммит
9b102c5cce
|
@ -1086,6 +1086,7 @@ nsContextMenu.prototype = {
|
|||
Ci.nsIScriptSecurityManager.DISALLOW_SCRIPT);
|
||||
openUILinkIn(this.mediaURL, where,
|
||||
{ referrerURI: doc.documentURIObject,
|
||||
forceAllowDataURI: true,
|
||||
triggeringPrincipal: this.target.nodePrincipal,
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1478,6 +1478,7 @@ function openLinkIn(url, where, params)
|
|||
params.referrerPolicy : Ci.nsIHttpChannel.REFERRER_POLICY_UNSET);
|
||||
var aRelatedToCurrent = params.relatedToCurrent;
|
||||
var aAllowMixedContent = params.allowMixedContent;
|
||||
var aForceAllowDataURI = params.forceAllowDataURI;
|
||||
var aInBackground = params.inBackground;
|
||||
var aAvoidBrowserFocus = params.avoidBrowserFocus;
|
||||
var aDisallowInheritPrincipal = params.disallowInheritPrincipal;
|
||||
|
@ -1607,6 +1608,9 @@ function openLinkIn(url, where, params)
|
|||
if (aDisallowInheritPrincipal) {
|
||||
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
|
||||
}
|
||||
if (aForceAllowDataURI) {
|
||||
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_FORCE_ALLOW_DATA_URI;
|
||||
}
|
||||
|
||||
if (aForceAboutBlankViewerInCurrent) {
|
||||
w.gBrowser.selectedBrowser.createAboutBlankContentViewer(aPrincipal);
|
||||
|
|
Загрузка…
Ссылка в новой задаче