From 1d353cf17066d2f547c8c0c0a4ef429259ec9263 Mon Sep 17 00:00:00 2001 From: "timeless%mozdev.org" Date: Thu, 27 Jul 2006 14:58:33 +0000 Subject: [PATCH] Bug 240947 use content instead of _content r=neil sr=dveditz --- suite/common/directory/directory.js | 6 ++-- .../permissionsNavigatorOverlay.xul | 4 +-- suite/common/related/related-panel.js | 2 +- suite/common/search/internetresults.js | 4 +-- suite/common/search/search-panel.js | 30 +++++++++---------- suite/common/sidebar/sidebarOverlay.js | 4 +-- 6 files changed, 25 insertions(+), 25 deletions(-) diff --git a/suite/common/directory/directory.js b/suite/common/directory/directory.js index 83bf7dd6163..a5fc41ac7c8 100644 --- a/suite/common/directory/directory.js +++ b/suite/common/directory/directory.js @@ -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"); } } diff --git a/suite/common/permissions/permissionsNavigatorOverlay.xul b/suite/common/permissions/permissionsNavigatorOverlay.xul index b55c4517952..ed5d82db146 100644 --- a/suite/common/permissions/permissionsNavigatorOverlay.xul +++ b/suite/common/permissions/permissionsNavigatorOverlay.xul @@ -65,7 +65,7 @@ popupmanager = Components.classes["@mozilla.org/PopupWindowManager;1"] .getService(Components.interfaces.nsIPopupWindowManager); - if (!("_content" in window) || !window._content) { + if (!("content" in window) || !window.content) { // this occurs if doing tasks->privacy->cookie->block from java console return; } @@ -121,7 +121,7 @@ // perform a Cookie or Image action function CookieImageAction(action) { - if (!("_content" in window) || !window._content) { + if (!("content" in window) || !window.content) { // this occurs if doing tasks->privacy->cookie->block from java console return; } diff --git a/suite/common/related/related-panel.js b/suite/common/related/related-panel.js index 913b40d013e..48f30263d1f 100644 --- a/suite/common/related/related-panel.js +++ b/suite/common/related/related-panel.js @@ -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) { diff --git a/suite/common/search/internetresults.js b/suite/common/search/internetresults.js index 41b71b3f711..b009cbe7903 100644 --- a/suite/common/search/internetresults.js +++ b/suite/common/search/internetresults.js @@ -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("?"); diff --git a/suite/common/search/search-panel.js b/suite/common/search/search-panel.js index 79bfb4ec5b2..71bafa25af8 100644 --- a/suite/common/search/search-panel.js +++ b/suite/common/search/search-panel.js @@ -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; diff --git a/suite/common/sidebar/sidebarOverlay.js b/suite/common/sidebar/sidebarOverlay.js index f4f0f30d6e0..4ca77ee701c 100644 --- a/suite/common/sidebar/sidebarOverlay.js +++ b/suite/common/sidebar/sidebarOverlay.js @@ -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();