зеркало из 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;
|
var href;
|
||||||
if (linkNode) {
|
if (linkNode) {
|
||||||
href = new XPCNativeWrapper(linkNode, "href").href;
|
href = linkNode.href;
|
||||||
} else {
|
} else {
|
||||||
// Try simple XLink
|
// Try simple XLink
|
||||||
linkNode = target;
|
linkNode = target;
|
||||||
while (linkNode) {
|
while (linkNode) {
|
||||||
if (linkNode.nodeType == Node.ELEMENT_NODE) {
|
if (linkNode.nodeType == Node.ELEMENT_NODE) {
|
||||||
var wrapper = new XPCNativeWrapper(linkNode, "getAttributeNS()");
|
href = linkNode.getAttributeNS("http://www.w3.org/1999/xlink", "href");
|
||||||
href = wrapper.getAttributeNS("http://www.w3.org/1999/xlink", "href");
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
linkNode = linkNode.parentNode;
|
linkNode = linkNode.parentNode;
|
||||||
}
|
}
|
||||||
if (href && href != "") {
|
if (href && href != "") {
|
||||||
var baseURI = new XPCNativeWrapper(linkNode, "baseURI").baseURI;
|
href = makeURLAbsolute(linkNode.baseURI, href);
|
||||||
href = makeURLAbsolute(baseURI, href);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return href;
|
return href;
|
||||||
|
|
|
@ -45,9 +45,7 @@ function isContentFrame(aFocusedWindow)
|
||||||
if (!aFocusedWindow)
|
if (!aFocusedWindow)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
var focusedTop = new XPCNativeWrapper(aFocusedWindow, 'top').top;
|
return (aFocusedWindow.top == window.content);
|
||||||
|
|
||||||
return (focusedTop == window.content);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function urlSecurityCheck(url, doc)
|
function urlSecurityCheck(url, doc)
|
||||||
|
@ -68,7 +66,7 @@ function urlSecurityCheck(url, doc)
|
||||||
function getContentFrameURI(aFocusedWindow)
|
function getContentFrameURI(aFocusedWindow)
|
||||||
{
|
{
|
||||||
var contentFrame = isContentFrame(aFocusedWindow) ? aFocusedWindow : window.content;
|
var contentFrame = isContentFrame(aFocusedWindow) ? aFocusedWindow : window.content;
|
||||||
return new XPCNativeWrapper(contentFrame, "location").location.href;
|
return contentFrame.location.href;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getReferrer(doc)
|
function getReferrer(doc)
|
||||||
|
|
|
@ -441,9 +441,7 @@ nsContextMenu.prototype = {
|
||||||
// initialize popupURL
|
// initialize popupURL
|
||||||
const IOS = Components.classes["@mozilla.org/network/io-service;1"]
|
const IOS = Components.classes["@mozilla.org/network/io-service;1"]
|
||||||
.getService(CI.nsIIOService);
|
.getService(CI.nsIIOService);
|
||||||
var opener = new XPCNativeWrapper(window.content, "opener").opener;
|
this.popupURL = IOS.newURI(window.content.opener.location.href, null, null);
|
||||||
var location = new XPCNativeWrapper(opener, "location").location;
|
|
||||||
this.popupURL = IOS.newURI(location.href, null, null);
|
|
||||||
|
|
||||||
// but cancel if it's an unsuitable URL
|
// but cancel if it's an unsuitable URL
|
||||||
const PM = Components.classes["@mozilla.org/PopupWindowManager;1"]
|
const PM = Components.classes["@mozilla.org/PopupWindowManager;1"]
|
||||||
|
@ -651,8 +649,7 @@ nsContextMenu.prototype = {
|
||||||
|
|
||||||
// Let's try to unescape it using a character set
|
// Let's try to unescape it using a character set
|
||||||
try {
|
try {
|
||||||
var ownerDocument = new XPCNativeWrapper(this.target, "ownerDocument").ownerDocument;
|
var characterSet = this.target.ownerDocument.characterSet;
|
||||||
var characterSet = new XPCNativeWrapper(ownerDocument, "characterSet").characterSet;
|
|
||||||
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
|
const textToSubURI = Components.classes["@mozilla.org/intl/texttosuburi;1"]
|
||||||
.getService(Components.interfaces.nsITextToSubURI);
|
.getService(Components.interfaces.nsITextToSubURI);
|
||||||
addresses = textToSubURI.unEscapeURIForUI(characterSet, addresses);
|
addresses = textToSubURI.unEscapeURIForUI(characterSet, addresses);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче