зеркало из https://github.com/mozilla/pjs.git
Bug 295582 Clean up after bug 281988 p=jklippl@xtux.org r=me sr=jag a=bsmedberg
This commit is contained in:
Родитель
63e2852a00
Коммит
81cf8e53fe
|
@ -144,21 +144,19 @@
|
|||
}
|
||||
var href;
|
||||
if (linkNode) {
|
||||
href = new XPCNativeWrapper(linkNode, "href").href;
|
||||
href = linkNode.href;
|
||||
} else {
|
||||
// Try simple XLink
|
||||
linkNode = target;
|
||||
while (linkNode) {
|
||||
if (linkNode.nodeType == Node.ELEMENT_NODE) {
|
||||
var wrapper = new XPCNativeWrapper(linkNode, "getAttributeNS()");
|
||||
href = wrapper.getAttributeNS("http://www.w3.org/1999/xlink", "href");
|
||||
href = linkNode.getAttributeNS("http://www.w3.org/1999/xlink", "href");
|
||||
break;
|
||||
}
|
||||
linkNode = linkNode.parentNode;
|
||||
}
|
||||
if (href && href != "") {
|
||||
var baseURI = new XPCNativeWrapper(linkNode, "baseURI").baseURI;
|
||||
href = makeURLAbsolute(baseURI, href);
|
||||
href = makeURLAbsolute(linkNode.baseURI, href);
|
||||
}
|
||||
}
|
||||
return href;
|
||||
|
|
|
@ -45,9 +45,7 @@ function isContentFrame(aFocusedWindow)
|
|||
if (!aFocusedWindow)
|
||||
return false;
|
||||
|
||||
var focusedTop = new XPCNativeWrapper(aFocusedWindow, 'top').top;
|
||||
|
||||
return (focusedTop == window.content);
|
||||
return (aFocusedWindow.top == window.content);
|
||||
}
|
||||
|
||||
function urlSecurityCheck(url, doc)
|
||||
|
@ -68,7 +66,7 @@ function urlSecurityCheck(url, doc)
|
|||
function getContentFrameURI(aFocusedWindow)
|
||||
{
|
||||
var contentFrame = isContentFrame(aFocusedWindow) ? aFocusedWindow : window.content;
|
||||
return new XPCNativeWrapper(contentFrame, "location").location.href;
|
||||
return contentFrame.location.href;
|
||||
}
|
||||
|
||||
function getReferrer(doc)
|
||||
|
|
|
@ -441,9 +441,7 @@ nsContextMenu.prototype = {
|
|||
// initialize popupURL
|
||||
const IOS = Components.classes["@mozilla.org/network/io-service;1"]
|
||||
.getService(CI.nsIIOService);
|
||||
var opener = new XPCNativeWrapper(window.content, "opener").opener;
|
||||
var location = new XPCNativeWrapper(opener, "location").location;
|
||||
this.popupURL = IOS.newURI(location.href, null, null);
|
||||
this.popupURL = IOS.newURI(window.content.opener.location.href, null, null);
|
||||
|
||||
// but cancel if it's an unsuitable URL
|
||||
const PM = Components.classes["@mozilla.org/PopupWindowManager;1"]
|
||||
|
@ -651,8 +649,7 @@ nsContextMenu.prototype = {
|
|||
|
||||
// Let's try to unescape it using a character set
|
||||
try {
|
||||
var ownerDocument = new XPCNativeWrapper(this.target, "ownerDocument").ownerDocument;
|
||||
var characterSet = new XPCNativeWrapper(ownerDocument, "characterSet").characterSet;
|
||||
var characterSet = this.target.ownerDocument.characterSet;
|
||||
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
|
||||
.getService(Components.interfaces.nsITextToSubURI);
|
||||
addresses = textToSubURI.unEscapeURIForUI(characterSet, addresses);
|
||||
|
|
Загрузка…
Ссылка в новой задаче