Bug 240947 use content instead of _content

r=neil sr=dveditz
This commit is contained in:
timeless%mozdev.org 2004-06-24 23:44:05 +00:00
Родитель ff54b01ba8
Коммит 766d404cfe
33 изменённых файлов: 98 добавлений и 98 удалений

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

@ -80,7 +80,7 @@ function launchBrowser( UrlToGoTo )
else if ("loadURI" in navWindow)
navWindow.loadURI(UrlToGoTo);
else
navWindow._content.location.href = UrlToGoTo;
navWindow.content.location.href = UrlToGoTo;
}
// if all else fails, open a new window
else {

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

@ -359,7 +359,7 @@ function EditorStartLog()
var edlog = GetCurrentEditor().QueryInterface(Components.interfaces.nsIEditorLogging);
var fs = EditorGetScriptFileSpec();
edlog.startLogging(fs);
window._content.focus();
window.content.focus();
fs = null;
}
@ -371,7 +371,7 @@ function EditorStopLog()
try {
var edlog = GetCurrentEditor().QueryInterface(Components.interfaces.nsIEditorLogging);
edlog.stopLogging();
window._content.focus();
window.content.focus();
}
catch(ex) { dump("Can't stop logging!:\n" + ex + "\n"); }
}
@ -381,7 +381,7 @@ function EditorRunLog()
var fs;
fs = EditorGetScriptFileSpec();
EditorExecuteScript(fs);
window._content.focus();
window.content.focus();
}
// --------------------------- TransactionManager ---------------------------

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

@ -3424,7 +3424,7 @@ function UpdateTOC()
{
window.openDialog("chrome://editor/content/EdInsertTOC.xul",
"_blank", "chrome,close,modal,titlebar");
window._content.focus();
window.content.focus();
}
function InitTOCMenu()

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

@ -61,7 +61,7 @@ addEventListener("load", initEditorContextMenuListener, false);
function editDocument(aDocument)
{
if (!aDocument)
aDocument = window._content.document;
aDocument = window.content.document;
editPage(aDocument.URL, window, false);
}
@ -106,8 +106,8 @@ function editPage(url, launchWindow, delay)
var wintype = document.firstChild.getAttribute('windowtype');
var charsetArg;
if (launchWindow && (wintype == "navigator:browser") && launchWindow._content.document)
charsetArg = "charset=" + launchWindow._content.document.characterSet;
if (launchWindow && (wintype == "navigator:browser") && launchWindow.content.document)
charsetArg = "charset=" + launchWindow.content.document.characterSet;
try {
var uri = createURI(url, null, null);

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

@ -118,7 +118,7 @@ function handleRClick ( event ) {
// ************************************************************
function gotoURL( url ) {
window._content.location = url;
window.content.location = url;
}
function getAddDiv() {

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

@ -61,7 +61,7 @@
</implementation>
<handlers>
<handler event="mousedown">
window.open(this.href, this.show=="new" ? "_blank" : "_content", "");
window.open(this.href, this.show=="new" ? "_blank" : "content", "");
</handler>
<handler event="mouseover">
window.status=this.href;

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

@ -168,7 +168,7 @@ function CreateMailWindowGlobals()
secureUI = Components.classes[secureUIContractID].createInstance();
if (secureUI) {
secureUI = secureUI.QueryInterface(Components.interfaces.nsISecureBrowserUI);
secureUI.init(_content, securityIcon);
secureUI.init(content, securityIcon);
}
}
}

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

@ -1720,7 +1720,7 @@ function MsgAddAllToAddressBook() {}
function SpaceHit(event)
{
var contentWindow = window.top._content;
var contentWindow = window.top.content;
if (event && event.shiftKey) {
// if at the start of the message, go to the previous one

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

@ -166,12 +166,12 @@ function BrowserExitPrintPreview()
mainWin.setAttribute("onclose", gOldCloseHandler);
// exit print preview galley mode in content area
var ifreq = _content.QueryInterface(
var ifreq = content.QueryInterface(
Components.interfaces.nsIInterfaceRequestor);
var webBrowserPrint = ifreq.getInterface(
Components.interfaces.nsIWebBrowserPrint);
webBrowserPrint.exitPrintPreview();
_content.focus();
content.focus();
}
// This observer is called once the progress dialog has been "opened"
@ -195,7 +195,7 @@ function BrowserPrintPreview()
var ifreq;
var webBrowserPrint;
try {
ifreq = _content.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
ifreq = content.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint);
gPrintSettings = GetPrintSettings();
@ -247,7 +247,7 @@ function FinishPrintPreview()
var browser = getBrowser();
try {
var ifreq = _content.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var ifreq = content.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
var webBrowserPrint = ifreq.getInterface(Components.interfaces.nsIWebBrowserPrint);
if (webBrowserPrint) {
gPrintSettings = GetPrintSettings();
@ -269,7 +269,7 @@ function FinishPrintPreview()
// that we can initialize the toolbar with total num pages
showPrintPreviewToolbar();
_content.focus();
content.focus();
} catch (e) {
// Pressing cancel is expressed as an NS_ERROR_ABORT return value,
// causing an exception to be thrown which we catch here.

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

@ -125,7 +125,7 @@
function sendPage(aDocument)
{
if (!aDocument)
aDocument = window._content.document;
aDocument = window.content.document;
try {
var charset = getCharsetforSave(aDocument);

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

@ -252,7 +252,7 @@ function checkForLink(elem, htmllocalname)
break;
case "":
case "_self":
if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document)
if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document)
setInfo("link-target", gMetadataBundle.getString("sameFrameText"));
else
setInfo("link-target", gMetadataBundle.getString("sameWindowText"));
@ -280,7 +280,7 @@ function checkForLink(elem, htmllocalname)
break;
case "":
case "replace":
if (elem.ownerDocument != elem.ownerDocument.defaultView._content.document)
if (elem.ownerDocument != elem.ownerDocument.defaultView.content.document)
setInfo("link-target", gMetadataBundle.getString("sameFrameText"));
else
setInfo("link-target", gMetadataBundle.getString("sameWindowText"));
@ -391,12 +391,12 @@ function openLink(node)
var secMan = Components.classes["@mozilla.org/scriptsecuritymanager;1"].getService().
QueryInterface(nsIScriptSecurityManager);
try {
secMan.checkLoadURIStr(nodeView._content.document.location,
secMan.checkLoadURIStr(nodeView.content.document.location,
url, nsIScriptSecurityManager.STANDARD);
} catch (e) {
return;
}
nodeView._content.document.location = url;
nodeView.content.document.location = url;
window.close();
}
}

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

@ -251,7 +251,7 @@ function removePopupPermListener(observer)
function loadEventHandlers(event)
{
// Filter out events that are not about the document load we are interested in
if (event.originalTarget == _content.document) {
if (event.originalTarget == content.document) {
UpdateBookmarksLastVisitedDate(event);
UpdateInternetSearchResults(event);
checkForDirectoryListing();
@ -308,7 +308,7 @@ function UpdateBookmarksLastVisitedDate(event)
gBookmarksService = Components.classes["@mozilla.org/browser/bookmarks-service;1"]
.getService(Components.interfaces.nsIBookmarksService);
gBookmarksService.updateLastVisitedDate(url, _content.document.characterSet);
gBookmarksService.updateLastVisitedDate(url, content.document.characterSet);
}
}
@ -625,7 +625,7 @@ function Startup()
if ("arguments" in window && uriToLoad == "about:blank" && !navBar.hidden && window.locationbar.visible)
setTimeout(WindowFocusTimerCallback, 0, gURLBar);
else
setTimeout(WindowFocusTimerCallback, 0, _content);
setTimeout(WindowFocusTimerCallback, 0, content);
// Perform default browser checking (after window opens).
setTimeout( checkForDefaultBrowser, 0 );
@ -1552,12 +1552,12 @@ function BrowserViewSourceOfDocument(aDocument)
var ifRequestor;
// Get the DOMWindow for the requested document. If the DOMWindow
// cannot be found, then just use the _content window...
// cannot be found, then just use the content window...
//
// XXX: This is a bit of a hack...
win = aDocument.defaultView;
if (win == window) {
win = _content;
win = content;
}
ifRequestor = win.QueryInterface(Components.interfaces.nsIInterfaceRequestor);
@ -1672,7 +1672,7 @@ function traceDocument()
{
// keep the chrome document out of the dump.
leakDetector.markObject(document, true);
leakDetector.traceObject(_content, leakDetector.verbose);
leakDetector.traceObject(content, leakDetector.verbose);
leakDetector.markObject(document, false);
}
@ -1765,9 +1765,9 @@ function postURLToNativeWidget()
function checkForDirectoryListing()
{
if ( "HTTPIndex" in _content &&
_content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) {
_content.defaultCharacterset = getMarkupDocumentViewer().defaultCharacterSet;
if ( "HTTPIndex" in content &&
content.HTTPIndex instanceof Components.interfaces.nsIHTTPIndex ) {
content.defaultCharacterset = getMarkupDocumentViewer().defaultCharacterSet;
}
}
@ -1803,7 +1803,7 @@ function stylesheetFillPopup(menuPopup)
menuPopup.removeChild(itemNoOptStyles.nextSibling);
var noOptionalStyles = true;
var styleSheets = getAllStyleSheets(window._content);
var styleSheets = getAllStyleSheets(window.content);
var currentStyleSheets = [];
for (var i = 0; i < styleSheets.length; ++i) {

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

@ -86,7 +86,7 @@ var proxyIconDNDObserver = {
// the homepage in the event of an empty urlbar.
if (!urlBar.value) return;
var urlString = urlBar.value + "\n" + window._content.document.title;
var urlString = urlBar.value + "\n" + window.content.document.title;
var htmlString = "<a href=\"" + urlBar.value + "\">" + urlBar.value + "</a>";
aXferData.data = new TransferData();

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

@ -134,7 +134,7 @@
<command id="cmd_newEditorTemplate"/>
<command id="cmd_newEditorDraft"/> -->
<command id="Browser:OpenFile" oncommand="BrowserOpenFileWindow();"/>
<command id="Browser:SavePage" oncommand="saveDocument(window._content.document);"/>
<command id="Browser:SavePage" oncommand="saveDocument(window.content.document);"/>
<command id="Browser:EditPage" oncommand="editPageOrFrame();" observes="isImage"/>
<command id="Browser:UploadFile" oncommand="BrowserUploadFile();"/>
<command id="Browser:Open" oncommand="BrowserOpenWindow();"/>
@ -403,7 +403,7 @@
<menu label="&useStyleSheetMenu.label;" accesskey="&useStyleSheetMenu.accesskey;" disabled="false" observes="isImage">
<menupopup onpopupshowing="stylesheetFillPopup(this);"
oncommand="stylesheetSwitchAll(window._content, event.target.getAttribute('data'));">
oncommand="stylesheetSwitchAll(window.content, event.target.getAttribute('data'));">
<menuitem label="&useStyleSheetPersistentOnly.label;" accesskey="&useStyleSheetPersistentOnly.accesskey;" type="radio"/>
</menupopup>
</menu>

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

@ -398,7 +398,7 @@ nsBrowserStatusHandler.prototype =
var observerService = Components.classes["@mozilla.org/observer-service;1"]
.getService(Components.interfaces.nsIObserverService);
try {
observerService.notifyObservers(_content, "StartDocumentLoad", urlStr);
observerService.notifyObservers(content, "StartDocumentLoad", urlStr);
} catch (e) {
}
},
@ -431,7 +431,7 @@ nsBrowserStatusHandler.prototype =
var notification = Components.isSuccessCode(aStatus) ? "EndDocumentLoad" : "FailDocumentLoad";
try {
observerService.notifyObservers(_content, notification, urlStr);
observerService.notifyObservers(content, notification, urlStr);
} catch (e) {
}
}

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

@ -84,7 +84,7 @@ function onLoadViewPartialSource()
else
viewPartialSourceForFragment(window.arguments[2], window.arguments[3]);
window._content.focus();
window.content.focus();
}
////////////////////////////////////////////////////////////////////////////////

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

@ -189,7 +189,7 @@ function viewSource(url)
document.getElementById("menu_highlightSyntax").setAttribute("hidden", "true");
}
window._content.focus();
window.content.focus();
return true;
}
@ -206,7 +206,7 @@ function onLoadContent()
document.getElementById('cmd_goToLine').removeAttribute('disabled');
// Register a listener so that we can show the caret position on the status bar.
window._content.getSelection()
window.content.getSelection()
.QueryInterface(nsISelectionPrivate)
.addSelectionListener(gSelectionListener);
}
@ -291,7 +291,7 @@ function ViewSourceGoToLine()
function goToLine(line)
{
var viewsource = window._content.document.body;
var viewsource = window.content.document.body;
//
// The source document is made up of a number of pre elements with
@ -324,7 +324,7 @@ function goToLine(line)
return false;
}
var selection = window._content.getSelection();
var selection = window.content.getSelection();
selection.removeAllRanges();
// In our case, the range's startOffset is after "\n" on the previous line.
@ -381,7 +381,7 @@ function updateStatusBar()
var statusBarField = document.getElementById("statusbar-line-col");
var selection = window._content.getSelection();
var selection = window.content.getSelection();
if (!selection.focusNode) {
statusBarField.label = '';
return;
@ -436,7 +436,7 @@ function findLocation(pre, line, node, offset, interlinePosition, result)
//
// Walk through each of the text nodes and count newlines.
//
var treewalker = window._content.document
var treewalker = window.content.document
.createTreeWalker(pre, NodeFilter.SHOW_TEXT, null, false);
//
@ -528,7 +528,7 @@ function findLocation(pre, line, node, offset, interlinePosition, result)
//pref to persist the last state
function wrapLongLines()
{
var myWrap = window._content.document.body;
var myWrap = window.content.document.body;
if (myWrap.className == '')
myWrap.className = 'wrap';

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -559,7 +559,7 @@ var BookmarksCommand = {
switch (aTargetBrowser) {
case "current":
browser.loadURI(url);
w._content.focus();
w.content.focus();
break;
case "tab":
var tab = browser.addTab(url);

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

@ -179,8 +179,8 @@ function Init()
httpDS.encoding = "ISO-8859-1";
// Use a default character set.
if (window._content.defaultCharacterset)
httpDS.encoding = window._content.defaultCharacterset;
if (window.content.defaultCharacterset)
httpDS.encoding = window.content.defaultCharacterset;
}
}
@ -216,7 +216,7 @@ function OnClick(event)
var tree = document.getElementById("tree");
if (tree.currentIndex >= 0) {
var item = tree.contentView.getItemAtIndex(tree.currentIndex);
window._content.location.href = item.getAttributeNS(NC_NS, "url");
window.content.location.href = item.getAttributeNS(NC_NS, "url");
}
}

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

@ -205,7 +205,7 @@ function Init()
// Install our navigation observer so we can track the main client window.
oContentWindow = window._content;
oContentWindow = window.content;
oFrame = document.getElementById('daFrame');
if (oContentWindow && oFrame) {

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

@ -72,7 +72,7 @@ function searchResultsOpenURL(event)
if ("loadURI" in top)
top.loadURI(url);
else
top._content.location.href = url;
top.content.location.href = url;
return true;
}
@ -98,7 +98,7 @@ function onLoadInternetResults()
iSearch.ClearResultSearchSites();
// the search URI is passed in as a parameter, so get it and them root the results list
var searchURI = top._content.location.href;
var searchURI = top.content.location.href;
if (searchURI) {
const lastSearchURIPref = "browser.search.lastMultipleSearchURI";
var offset = searchURI.indexOf("?");

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

@ -585,7 +585,7 @@ function doStop()
// show appropriate column(s)
var navWindow = getNavigatorWindow(false);
var resultsList = navWindow ? navWindow._content.document.getElementById("resultsList") : null;
var resultsList = navWindow ? navWindow.content.document.getElementById("resultsList") : null;
if (!resultsList)
return;
@ -612,43 +612,43 @@ function doStop()
var sortSetFlag = false;
if (hasPriceFlag) {
colNode = navWindow._content.document.getElementById("PriceColumn");
colNode = navWindow.content.document.getElementById("PriceColumn");
if (colNode) {
colNode.removeAttribute("hidden");
if (!sortSetFlag) {
top._content.setInitialSort(colNode, "ascending");
top.content.setInitialSort(colNode, "ascending");
sortSetFlag = true;
}
}
}
if (hasAvailabilityFlag) {
colNode = navWindow._content.document.getElementById("AvailabilityColumn");
colNode = navWindow.content.document.getElementById("AvailabilityColumn");
if (colNode)
colNode.removeAttribute("hidden");
}
if (hasDateFlag) {
colNode = navWindow._content.document.getElementById("DateColumn");
colNode = navWindow.content.document.getElementById("DateColumn");
if (colNode)
colNode.removeAttribute("hidden");
}
if (hasRelevanceFlag) {
colNode = navWindow._content.document.getElementById("RelevanceColumn");
colNode = navWindow.content.document.getElementById("RelevanceColumn");
if (colNode) {
colNode.removeAttribute("hidden");
if (!sortSetFlag) {
navWindow._content.setInitialSort(colNode, "descending");
navWindow.content.setInitialSort(colNode, "descending");
sortSetFlag = true;
}
}
}
if (!sortSetFlag) {
colNode = navWindow._content.document.getElementById("PageRankColumn");
colNode = navWindow.content.document.getElementById("PageRankColumn");
if (colNode)
navWindow._content.setInitialSort(colNode, "ascending");
navWindow.content.setInitialSort(colNode, "ascending");
}
switchTab(0);
@ -657,7 +657,7 @@ function doStop()
function doSearch()
{
var navWindow = getNavigatorWindow(true);
if (navWindow._content)
if (navWindow.content)
onNavWindowLoad();
else
navWindow.addEventListener("load", onNavWindowLoad, false);
@ -667,16 +667,16 @@ function onNavWindowLoad() {
var navWindow = getNavigatorWindow(true);
// hide various columns
if (navWindow && "_content" in navWindow && "isMozillaSearchWindow" in navWindow._content) {
colNode = navWindow._content.document.getElementById("RelevanceColumn");
if (navWindow && "content" in navWindow && "isMozillaSearchWindow" in navWindow.content) {
colNode = navWindow.content.document.getElementById("RelevanceColumn");
if (colNode)
colNode.setAttribute("hidden", "true");
colNode = navWindow._content.document.getElementById("PriceColumn");
colNode = navWindow.content.document.getElementById("PriceColumn");
if (colNode)
colNode.setAttribute("hidden", "true");
colNode = navWindow._content.document.getElementById("AvailabilityColumn");
colNode = navWindow.content.document.getElementById("AvailabilityColumn");
if (colNode)
colNode.setAttribute("hidden", "true");
}
@ -764,7 +764,7 @@ function checkSearchProgress()
var navWindow = getNavigatorWindow(false);
if (navWindow) {
var resultsList = navWindow._content.document.getElementById("resultsList");
var resultsList = navWindow.content.document.getElementById("resultsList");
if (resultsList) {
var treeref = resultsList.getAttribute("ref");
var ds = resultsList.database;

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

@ -1256,7 +1256,7 @@ function SidebarShowHide() {
// Immediately save persistent values
document.persist('sidebar-title-box', 'hidden');
persist_width();
window._content.focus();
window.content.focus();
}
function SidebarBuildPickerPopup() {
@ -1383,7 +1383,7 @@ function SidebarTogglePanel(panel_menuitem) {
if (did_exclude && !sidebarObj.panels.visible_panels_exist())
// surrender focus to main content area
window._content.focus();
window.content.focus();
else
// force all the sidebars to update
refresh_all_sidebars();

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

@ -100,7 +100,7 @@ function SelectDetector(event, doReload)
str.data = prefvalue;
pref.setComplexValue("intl.charset.detector",
Components.interfaces.nsISupportsString, str);
if (doReload) window._content.location.reload();
if (doReload) window.content.location.reload();
}
catch (ex) {
dump("Failed to set the intl.charset.detector preference.\n");
@ -150,7 +150,7 @@ function UpdateCurrentCharset()
// exctract the charset from DOM
var wnd = document.commandDispatcher.focusedWindow;
if ((window == wnd) || (wnd == null)) wnd = window._content;
if ((window == wnd) || (wnd == null)) wnd = window.content;
menuitem = document.getElementById('charset.' + wnd.document.characterSet);
if (menuitem) {
@ -235,7 +235,7 @@ var gLastBrowserCharset = null;
function charsetLoadListener (event)
{
var charset = window._content.document.characterSet;
var charset = window.content.document.characterSet;
if (charset.length > 0 && (charset != gLastBrowserCharset)) {
gCharsetMenu.SetCurrentCharset(charset);
@ -247,7 +247,7 @@ function charsetLoadListener (event)
function composercharsetLoadListener (event)
{
var charset = window._content.document.characterSet;
var charset = window.content.document.characterSet;
if (charset.length > 0 ) {