Bug 295582 Clean up after bug 281988 p=jklippl@xtux.org r=me sr=jag a=bsmedberg

This commit is contained in:
neil%parkwaycc.co.uk 2006-09-14 06:11:05 +00:00
Родитель 8cc20fb4dc
Коммит 47a227583a
3 изменённых файлов: 11 добавлений и 20 удалений

Просмотреть файл

@ -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 @@
<menuitem insertafter="saveframeas"
label="&contextSendFrame.label;"
accesskey="&contextSendFrame.accesskey;"
oncommand="sendPage(new XPCNativeWrapper(gContextMenu.target, 'ownerDocument').ownerDocument);"/>
oncommand="sendPage(gContextMenu.target.ownerDocument);"/>
</menupopup>
</menu>
</popup>

Просмотреть файл

@ -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) {
}

Просмотреть файл

@ -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;