Bug 1246907 - Open link in a Container Tab - in the context menu, r=Gijs
This commit is contained in:
@@ -144,9 +144,11 @@ nsContextMenu.prototype = {
|
||||
|
||||
var shouldShow = this.onSaveableLink || isMailtoInternal || this.onPlainTextLink;
|
||||
var isWindowPrivate = PrivateBrowsingUtils.isWindowPrivate(window);
|
||||
var showContainers = Services.prefs.getBoolPref("privacy.userContext.enabled");
|
||||
this.showItem("context-openlink", shouldShow && !isWindowPrivate);
|
||||
this.showItem("context-openlinkprivate", shouldShow);
|
||||
this.showItem("context-openlinkintab", shouldShow);
|
||||
this.showItem("context-openlinkinusercontext-menu", shouldShow && showContainers);
|
||||
this.showItem("context-openlinkincurrent", this.onPlainTextLink);
|
||||
this.showItem("context-sep-open", shouldShow);
|
||||
},
|
||||
@@ -960,7 +962,7 @@ nsContextMenu.prototype = {
|
||||
},
|
||||
|
||||
// Open linked-to URL in a new tab.
|
||||
openLinkInTab: function() {
|
||||
openLinkInTab: function(event) {
|
||||
urlSecurityCheck(this.linkURL, this.principal);
|
||||
let referrerURI = gContextMenuContentData.documentURIObject;
|
||||
|
||||
@@ -981,6 +983,7 @@ nsContextMenu.prototype = {
|
||||
|
||||
let params = this._openLinkInParameters({
|
||||
allowMixedContent: persistAllowMixedContentInChildTab,
|
||||
userContextId: event.target.getAttribute('usercontextid'),
|
||||
});
|
||||
openLinkIn(this.linkURL, "tab", params);
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user