Bug 1277765 - No referrer when a link is opened by middle-click or the context menu and containers are involved, r=mconley
This commit is contained in:
@@ -955,8 +955,17 @@ nsContextMenu.prototype = {
|
||||
referrerURI: gContextMenuContentData.documentURIObject,
|
||||
referrerPolicy: gContextMenuContentData.referrerPolicy,
|
||||
noReferrer: this.linkHasNoReferrer };
|
||||
for (let p in extra)
|
||||
for (let p in extra) {
|
||||
params[p] = extra[p];
|
||||
}
|
||||
|
||||
// If we want to change userContextId, we must be sure that we don't
|
||||
// propagate the referrer.
|
||||
if ("userContextId" in params &&
|
||||
params.userContextId != this.principal.originAttributes.userContextId) {
|
||||
params.noReferrer = true;
|
||||
}
|
||||
|
||||
return params;
|
||||
},
|
||||
|
||||
@@ -998,10 +1007,6 @@ nsContextMenu.prototype = {
|
||||
userContextId: parseInt(event.target.getAttribute('usercontextid'))
|
||||
};
|
||||
|
||||
if (params.userContextId != this.principal.originAttributes.userContextId) {
|
||||
params.noReferrer = true;
|
||||
}
|
||||
|
||||
openLinkIn(this.linkURL, "tab", this._openLinkInParameters(params));
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user