bug 239472: Page Info -> media -> Save As... doesn't work

r=db48x, sr=jag


git-svn-id: svn://10.0.0.236/trunk@171120 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
db48x%yahoo.com
2005-03-23 21:37:44 +00:00
parent 05bec3a40e
commit 1863ea36b1

View File

@@ -155,9 +155,9 @@ const kSaveAsType_Text = 2; // Save document, converting to plain text.
// - A linked document using Save Link As...
// - A linked document using Alt-click Save Link As...
//
function saveURL(aURL, aFileName, aFilePickerTitleKey, aShouldBypassCache, aSkipPrompt)
function saveURL(aURL, aFileName, aFilePickerTitleKey, aShouldBypassCache, aSkipPrompt, aReferrer)
{
saveInternal(aURL, null, aFileName, aFilePickerTitleKey, aShouldBypassCache, aSkipPrompt);
saveInternal(aURL, null, aFileName, aFilePickerTitleKey, aShouldBypassCache, aSkipPrompt, aReferrer);
}
function saveDocument(aDocument, aSkipPrompt)
@@ -172,7 +172,8 @@ function saveDocument(aDocument, aSkipPrompt)
function saveInternal(aURL, aDocument,
aFileName, aFilePickerTitleKey,
aShouldBypassCache, aSkipPrompt)
aShouldBypassCache, aSkipPrompt,
aReferrer)
{
if (aSkipPrompt == undefined)
aSkipPrompt = false;
@@ -183,7 +184,8 @@ function saveInternal(aURL, aDocument,
filePickerTitle: aFilePickerTitleKey,
document: aDocument,
bypassCache: aShouldBypassCache,
window: window
window: window,
referrer: aReferrer
};
var sniffer = new nsHeaderSniffer(aURL, foundHeaderInfo, data, aSkipPrompt);
}
@@ -292,7 +294,8 @@ function foundHeaderInfo(aSniffer, aData, aSkipPrompt)
persistArgs.contentType, encodingFlags, kWrapColumn);
} else {
dl.init(source, persistArgs.target, null, null, null, persist);
persist.saveURI(source, null, getReferrer(document), persistArgs.postData, null, persistArgs.target);
var referrer = aData.referrer || getReferrer(document)
persist.saveURI(source, null, referrer, persistArgs.postData, null, persistArgs.target);
}
}