mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 00:55:37 +00:00
Bug 129535 -- get filenames from the right places in some edge cases.
r=law, sr=alecf, a=asa
This commit is contained in:
parent
0395071b0e
commit
b3ed775d6a
@ -149,7 +149,7 @@
|
||||
break;
|
||||
}
|
||||
if (linkNode) {
|
||||
handleLinkClick(event, linkNode.href);
|
||||
handleLinkClick(event, linkNode.href, linkNode);
|
||||
return true;
|
||||
} else {
|
||||
// Try simple XLink
|
||||
@ -164,7 +164,7 @@
|
||||
}
|
||||
if (href && href != "") {
|
||||
href = makeURLAbsolute(target.baseURI,href);
|
||||
handleLinkClick(event, href);
|
||||
handleLinkClick(event, href, null);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -178,7 +178,7 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
function handleLinkClick(event, href)
|
||||
function handleLinkClick(event, href, linkNode)
|
||||
{
|
||||
var theTab, loadInBackground;
|
||||
switch (event.button) {
|
||||
@ -214,7 +214,7 @@
|
||||
saveModifier = saveModifier ? event.shiftKey : event.altKey;
|
||||
|
||||
if (saveModifier) { // if saveModifier is down
|
||||
saveURL(href, gatherTextUnder(event.target));
|
||||
saveURL(href, linkNode ? gatherTextUnder(linkNode) : "");
|
||||
return true;
|
||||
}
|
||||
if (event.altKey) // if alt is down
|
||||
|
@ -258,7 +258,8 @@ function foundHeaderInfo(aSniffer, aData)
|
||||
// should be.
|
||||
var defaultFileName = getDefaultFileName(aData.fileName,
|
||||
aSniffer.suggestedFileName,
|
||||
aSniffer.uri);
|
||||
aSniffer.uri,
|
||||
aData.document);
|
||||
var defaultExtension = getDefaultExtension(defaultFileName, aSniffer.uri, contentType);
|
||||
fp.defaultExtension = defaultExtension;
|
||||
fp.defaultString = getNormalizedLeafName(defaultFileName, defaultExtension);
|
||||
|
Loading…
Reference in New Issue
Block a user