258185 don't send referrer when pressing shift+enter in the location bar

r=neil sr=jag a=dveditz


git-svn-id: svn://10.0.0.236/trunk@205833 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
cbiesinger%web.de 2006-07-29 05:43:49 +00:00
parent 04a7aa1229
commit c9a0a4ab4b
3 changed files with 8 additions and 8 deletions

View File

@ -246,7 +246,8 @@
saveModifier = saveModifier ? event.shiftKey : event.altKey;
if (saveModifier) { // if saveModifier is down
saveURL(href, linkNode ? gatherTextUnder(linkNode) : "");
saveURL(href, linkNode ? gatherTextUnder(linkNode) : "",
"SaveLinkTitle", false, getReferrer(document));
return true;
}
if (event.altKey) // if alt is down

View File

@ -307,9 +307,8 @@ const SAVETYPE_TEXT_ONLY = 0x02;
* @param aChosenData If non-null this contains an instance of object AutoChosen
* (see below) which holds pre-determined data so that the user does not
* need to be prompted for a target filename.
* @param aReferrer the referrer URI object (not URL string) to use. If this
* is null, the URI of the currently focused content (non-chrome)
* document in this window will be used.
* @param aReferrer the referrer URI object (not URL string) to use, or null
if no referrer should be sent.
*/
function internalSave(aURL, aDocument, aDefaultFileName, aContentDisposition,
aContentType, aShouldBypassCache, aFilePickerTitleKey,
@ -424,9 +423,9 @@ function internalSave(aURL, aDocument, aDefaultFileName, aContentDisposition,
tr.init((aChosenData ? aChosenData.uri : source),
persistArgs.target, "", null, null, persist);
persist.progressListener = tr;
var referer = aReferrer || getReferrer(document);
persist.saveURI((aChosenData ? aChosenData.uri : source),
null, referer, persistArgs.postData, null, persistArgs.target);
null, aReferrer, persistArgs.postData, null,
persistArgs.target);
}
}

View File

@ -618,14 +618,14 @@ nsContextMenu.prototype = {
},
// Save URL of clicked-on link.
saveLink : function () {
saveURL( this.linkURL(), this.linkText(), null, true, null,
saveURL( this.linkURL(), this.linkText(), null, true,
getReferrer(document) );
},
// Save URL of clicked-on image.
saveImage : function () {
// Note: getReferrer wants our chrome document, not the actual
// target document; it handles getting that itself.
saveImageURL( this.imageURL, null, "SaveImageTitle", false, null,
saveImageURL( this.imageURL, null, "SaveImageTitle", false,
getReferrer(document) );
},
// Generate email address and put it on clipboard.