From 47a227583a70b71ad202431b9c9582505efd24ff Mon Sep 17 00:00:00 2001 From: "neil%parkwaycc.co.uk" Date: Thu, 14 Sep 2006 06:11:05 +0000 Subject: [PATCH] Bug 295582 Clean up after bug 281988 p=jklippl@xtux.org r=me sr=jag a=bsmedberg --- suite/browser/mailNavigatorOverlay.xul | 4 +--- suite/browser/navigator.js | 7 ++----- suite/browser/pageInfo.js | 20 ++++++++------------ 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/suite/browser/mailNavigatorOverlay.xul b/suite/browser/mailNavigatorOverlay.xul index 088bf17f4a1..adc3abf4ed1 100644 --- a/suite/browser/mailNavigatorOverlay.xul +++ b/suite/browser/mailNavigatorOverlay.xul @@ -109,7 +109,6 @@ aDocument = window.content.document; try { - aDocument = new XPCNativeWrapper(aDocument, "URL", "title"); openComposeWindow(aDocument.URL, aDocument.title, 0, null); } catch(ex) { dump("Cannot Send Link: " + ex + "\n"); } } @@ -129,7 +128,6 @@ try { var charset = getCharsetforSave(aDocument); - aDocument = new XPCNativeWrapper(aDocument, "URL", "title"); openComposeWindow(aDocument.URL, aDocument.title, 1, charset); } catch(ex) { dump("Cannot Send Page: " + ex + "\n"); } } @@ -223,7 +221,7 @@ + oncommand="sendPage(gContextMenu.target.ownerDocument);"/> diff --git a/suite/browser/navigator.js b/suite/browser/navigator.js index d139ccfd33a..598522b1305 100644 --- a/suite/browser/navigator.js +++ b/suite/browser/navigator.js @@ -278,7 +278,7 @@ function getContentAreaFrameCount() // When a content area frame is focused, update the focused frame URL function contentAreaFrameFocus() { - var focusedWindow = new XPCNativeWrapper(document.commandDispatcher.focusedWindow, "top", "document", "location"); + const focusedWindow = document.commandDispatcher.focusedWindow; if (focusedWindow.top == window.content) { gFocusedURL = focusedWindow.location.href; gFocusedDocument = focusedWindow.document; @@ -476,7 +476,6 @@ nsBrowserAccess.prototype = { gBrowser.loadURIWithFlags(uri, loadflags); return content; } - aOpener = new XPCNativeWrapper(aOpener, "top").top; try { aOpener.QueryInterface(nsIInterfaceRequestor) .getInterface(nsIWebNavigation) @@ -2495,9 +2494,7 @@ function maybeInitPopupContext() // return our opener's URI 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; - return IOS.newURI(location.href, null, null); + return IOS.newURI(window.content.opener.location.href, null, null); } } catch(e) { } diff --git a/suite/browser/pageInfo.js b/suite/browser/pageInfo.js index a2fc16f4fc2..a5920ca74c9 100644 --- a/suite/browser/pageInfo.js +++ b/suite/browser/pageInfo.js @@ -559,8 +559,7 @@ function grabAll(elem) // we need to use a special access method, XPCNativeWrapper, to get their real values if ("form" in elem && elem.form) { - var formWrapper = new XPCNativeWrapper(elem.form, "target", "action"); - linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, formWrapper.action, gStrings.linkSubmission, formWrapper.target]); + linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, elem.form.action, gStrings.linkSubmission, elem.form.target]); } else linkView.addRow([elem.value || getValueText(elem) || gStrings.linkSubmit, '', gStrings.linkSubmission, '']); @@ -568,8 +567,7 @@ function grabAll(elem) } else if (elem instanceof nsIFormElement) { - formWrapper = new XPCNativeWrapper(elem, "name", "method", "action"); - formView.addRow([formWrapper.name, formWrapper.method, formWrapper.action, elem]); + formView.addRow([elem.name, elem.method, elem.action, elem]); } else if (elem instanceof nsIAppletElement) { @@ -609,18 +607,16 @@ function onFormSelect() var clickedRow = formView.selection.currentIndex; // form-node; var form = formView.data[clickedRow][3]; - const formWrapper = new XPCNativeWrapper(form, - "name", "elements", "encoding", "target", "getElementsByTagName()"); var ft = null; - if (formWrapper.name) - ft = theBundle.getFormattedString("formTitle", [formWrapper.name]); + if (form.name) + ft = theBundle.getFormattedString("formTitle", [form.name]); - setItemValue("formenctype", formWrapper.encoding, theBundle.getString("default")); - setItemValue("formtarget", formWrapper.target, theBundle.getString("formDefaultTarget")); + setItemValue("formenctype", form.encoding, theBundle.getString("default")); + setItemValue("formtarget", form.target, theBundle.getString("formDefaultTarget")); document.getElementById("formname").value = ft || theBundle.getString("formUntitled"); - var formfields = formWrapper.elements; + var formfields = form.elements; var length = formfields.length; @@ -639,7 +635,7 @@ function onFormSelect() fieldView.addRow(["", elem.name, elem.type, val]); } - var labels = formWrapper.getElementsByTagName("label"); + var labels = form.getElementsByTagName("label"); var llength = labels.length; var label;