зеркало из https://github.com/mozilla/gecko-dev.git
Fix XLink handling in page info. Bug 286949, patch by Christian Schmidt
<bugzilla.mozilla.org@chsc.dk>, r=db48x, sr=neil
This commit is contained in:
Родитель
cb31692afe
Коммит
fdb5ed5105
|
@ -584,13 +584,16 @@ function grabAll(elem)
|
|||
addImage(elem.data, gStrings.mediaObject, getValueText(elem), elem, false);
|
||||
else if (elem instanceof nsIEmbedElement)
|
||||
addImage(elem.src, gStrings.mediaEmbed, "", elem, false);
|
||||
else
|
||||
if (elem.hasAttributeNS(XLinkNS, "href"))
|
||||
linkView.addRow([getValueText(elem),
|
||||
ioService.newURI(elem.getAttributeNS(XLinkNS, "href"), null, elem.baseURI).spec,
|
||||
gStrings.linkX,
|
||||
""]);
|
||||
|
||||
else if (elem.hasAttributeNS(XLinkNS, "href")) {
|
||||
var ioService = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(Components.interfaces.nsIIOService);
|
||||
url = elem.getAttributeNS(XLinkNS, "href");
|
||||
try {
|
||||
var baseURI = ioService.newURI(elem.baseURI, elem.ownerDocument.characterSet, null);
|
||||
url = ioService.newURI(href, elem.ownerDocument.characterSet, baseURI).spec;
|
||||
} catch (e) {}
|
||||
linkView.addRow([getValueText(elem), url, gStrings.linkX, ""]);
|
||||
}
|
||||
return NodeFilter.FILTER_ACCEPT;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче