Bug 240947 use content instead of _content

r=neil sr=dveditz
This commit is contained in:
timeless%mozdev.org 2006-07-29 05:43:14 +00:00
parent 9ccd517870
commit b602a3478b
9 changed files with 25 additions and 25 deletions

View File

@ -158,8 +158,8 @@ function loadXURL(key)
//check to see if this is a browser window before opening.
var winType = document.documentElement.getAttribute("windowtype");
if (window._content && winType == "navigator:browser")
window._content.location.href = url;
if (window.content && winType == "navigator:browser")
window.content.location.href = url;
else
window.open(url); // on mac, there maybe no open windows: see bug 83329
}

View File

@ -54,7 +54,7 @@
// obtain values to be used for prefilling
var walletService = Components.classes["@mozilla.org/wallet/wallet-service;1"].getService(Components.interfaces.nsIWalletService);
var value = walletService.WALLET_PrefillOneElement(window._content, target);
var value = walletService.WALLET_PrefillOneElement(window.content, target);
if (value) {
// result is a linear sequence of values, each preceded by a separator character

View File

@ -148,7 +148,7 @@
<menuitem id="context-savepage"
label="&savePageCmd.label;"
accesskey="&savePageCmd.accesskey;"
oncommand="saveDocument(window._content.document);"/>
oncommand="saveDocument(window.content.document);"/>
<menuseparator id="context-sep-viewbgimage"/>
<menuitem id="context-viewbgimage"
label="&viewBGImageCmd.label;"

View File

@ -93,7 +93,7 @@ function openNewWindowWith(url, sendReferrer)
var charsetArg = null;
var wintype = document.firstChild.getAttribute('windowtype');
if (wintype == "navigator:browser")
charsetArg = "charset=" + window._content.document.characterSet;
charsetArg = "charset=" + window.content.document.characterSet;
var referrer = sendReferrer ? getReferrer(document) : null;
window.openDialog(getBrowserURL(), "_blank", "chrome,all,dialog=no", url, charsetArg, referrer);
@ -163,7 +163,7 @@ function openNewTabWith(url, sendReferrer, reverseBackgroundPref)
var wintype = browserDocument.firstChild.getAttribute('windowtype');
var originCharset;
if (wintype == "navigator:browser") {
originCharset = window._content.document.characterSet;
originCharset = window.content.document.characterSet;
}
// open link in new tab
@ -236,7 +236,7 @@ function saveDocument(aDocument)
if (aDocument)
saveInternal(aDocument.location.href, aDocument, false);
else
saveInternal(_content.location.href, null, false);
saveInternal(content.location.href, null, false);
}
function saveInternal(aURL, aDocument,
@ -873,5 +873,5 @@ function getCharsetforSave(aDocument)
if (document.commandDispatcher.focusedWindow)
return document.commandDispatcher.focusedWindow.document.characterSet;
return window._content.document.characterSet;
return window.content.document.characterSet;
}

View File

@ -80,7 +80,7 @@ nsFindInstData.prototype =
}
// browser is the <browser> element
// rootSearchWindow is the window to constrain the search to (normally window._content)
// rootSearchWindow is the window to constrain the search to (normally window.content)
// currentSearchWindow is the frame to start searching (can be, and normally, rootSearchWindow)
function findInPage(findInstData)
{

View File

@ -166,10 +166,10 @@ nsContextMenu.prototype = {
// Disable the Set As Wallpaper menu item if we're still trying to load the image
this.setItemAttr( "context-setWallpaper", "disabled", (("complete" in this.target) && !this.target.complete) ? "true" : null );
this.showItem( "context-fitimage", this.onStandaloneImage && _content.document.imageResizingEnabled );
if ( this.onStandaloneImage && _content.document.imageResizingEnabled ) {
this.setItemAttr( "context-fitimage", "disabled", _content.document.imageIsOverflowing ? null : "true");
this.setItemAttr( "context-fitimage", "checked", _content.document.imageIsResized ? "true" : null);
this.showItem( "context-fitimage", this.onStandaloneImage && content.document.imageResizingEnabled );
if ( this.onStandaloneImage && content.document.imageResizingEnabled ) {
this.setItemAttr( "context-fitimage", "disabled", content.document.imageIsOverflowing ? null : "true");
this.setItemAttr( "context-fitimage", "checked", content.document.imageIsResized ? "true" : null);
}
// View Image depends on whether an image was clicked on.
@ -268,7 +268,7 @@ nsContextMenu.prototype = {
this.onImage = true;
this.imageURL = this.target.currentURI.spec;
var documentType = window._content.document.contentType;
var documentType = window.content.document.contentType;
if ( documentType.substr(0,6) == "image/" )
this.onStandaloneImage = true;
} else if ( this.target.localName.toUpperCase() == "INPUT") {
@ -287,8 +287,8 @@ nsContextMenu.prototype = {
computedURL );
}
}
} else if ( "HTTPIndex" in _content &&
_content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) {
} else if ( "HTTPIndex" in content &&
content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) {
this.inDirList = true;
// Bubble outward till we get to an element with URL attribute
// (which should be the href).
@ -335,7 +335,7 @@ nsContextMenu.prototype = {
this.onMathML = true;
// See if the user clicked in a frame.
if ( this.target.ownerDocument != window._content.document ) {
if ( this.target.ownerDocument != window.content.document ) {
this.inFrame = true;
}
@ -528,7 +528,7 @@ nsContextMenu.prototype = {
viewPartialSource : function ( context ) {
var focusedWindow = document.commandDispatcher.focusedWindow;
if (focusedWindow == window)
focusedWindow = _content;
focusedWindow = content;
var docCharset = null;
if (focusedWindow)
docCharset = "charset=" + focusedWindow.document.characterSet;
@ -560,7 +560,7 @@ nsContextMenu.prototype = {
BrowserPageInfo(this.target.ownerDocument);
},
toggleImageSize : function () {
_content.document.toggleImageSize();
content.document.toggleImageSize();
},
// Change current window to the URL of the image.
viewImage : function () {

View File

@ -494,7 +494,7 @@
<method name="_getWebBrowserPrint">
<body>
<![CDATA[
return _content
return content
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebBrowserPrint);
]]>

View File

@ -111,8 +111,8 @@ function NSPrintSetup()
gPrintSettings = GetPrintSettings();
var webBrowserPrint = null;
if (_content) {
webBrowserPrint = _content
if (content) {
webBrowserPrint = content
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebBrowserPrint);
}
@ -136,7 +136,7 @@ function NSPrintSetup()
function NSPrint()
{
try {
var webBrowserPrint = _content
var webBrowserPrint = content
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
.getInterface(Components.interfaces.nsIWebBrowserPrint);
if (webBrowserPrint) {

View File

@ -130,9 +130,9 @@ function OpenBrowserWindow()
// if and only if the current window is a browser window and it has a document with a character
// set, then extract the current charset menu setting from the current document and use it to
// initialize the new browser window...
if (window && (wintype == "navigator:browser") && window._content && window._content.document)
if (window && (wintype == "navigator:browser") && window.content && window.content.document)
{
var DocCharset = window._content.document.characterSet;
var DocCharset = window.content.document.characterSet;
charsetArg = "charset="+DocCharset;
//we should "inherit" the charset menu setting in a new window