Bug 1133201 - part 2 - don't send referrer information when opening new windows via context menu; r=Gijs,mconley

Part 1 fixed sending referrer information when opening a plain text
"link" in a new tab through the context menu.  This patch fixes the same
problem, but for the case of opening in a new window, since we take
slightly different paths through |openLinkIn| for tabs vs. windows.
This commit is contained in:
Nathan Froyd 2015-02-17 16:17:06 -05:00
parent 5c8d497188
commit da1dc90f92
2 changed files with 4 additions and 4 deletions

View File

@ -672,8 +672,8 @@ let ClickEventHandler = {
event.preventDefault(); // Need to prevent the pageload.
}
}
json.noReferrer = BrowserUtils.linkHasNoReferrer(node)
}
json.noReferrer = BrowserUtils.linkHasNoReferrer(node)
sendAsyncMessage("Content:Click", json);
return;

View File

@ -231,7 +231,7 @@ function openLinkIn(url, where, params) {
"where == 'save' but without initiatingDoc. See bug 814264.");
return;
}
saveURL(url, null, null, true, null, aReferrerURI, aInitiatingDoc);
saveURL(url, null, null, true, null, aNoReferrer ? null : aReferrerURI, aInitiatingDoc);
return;
}
const Cc = Components.classes;
@ -265,7 +265,7 @@ function openLinkIn(url, where, params) {
sa.AppendElement(wuri);
sa.AppendElement(charset);
sa.AppendElement(aReferrerURI);
sa.AppendElement(aNoReferrer ? null : aReferrerURI);
sa.AppendElement(aPostData);
sa.AppendElement(allowThirdPartyFixupSupports);
@ -327,7 +327,7 @@ function openLinkIn(url, where, params) {
if (aDisallowInheritPrincipal && !(uriObj && uriObj.schemeIs("javascript")))
flags |= Ci.nsIWebNavigation.LOAD_FLAGS_DISALLOW_INHERIT_OWNER;
w.gBrowser.loadURIWithFlags(url, flags, aReferrerURI, null, aPostData);
w.gBrowser.loadURIWithFlags(url, flags, aNoReferrer ? null : aReferrerURI, null, aPostData);
break;
case "tabshifted":
loadInBackground = !loadInBackground;