Bug 330887: try moving init from the constructor to browser.js's delayedStartup, a=mano for a cycle, to see if this affects Ts

This commit is contained in:
gavin%gavinsharp.com 2006-04-22 19:27:26 +00:00
Родитель 1a7bfccad6
Коммит afe5a3cbef
2 изменённых файлов: 9 добавлений и 9 удалений

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

@ -1071,6 +1071,10 @@ function delayedStartup()
document.getElementById("textfieldDirection-separator").hidden = false;
document.getElementById("textfieldDirection-swap").hidden = false;
}
var searchBar = BrowserSearch.getSearchBar();
if (searchBar)
searchBar.init();
#ifdef XP_MACOSX
// Setup click-and-hold gestures access to the session history
@ -1240,12 +1244,12 @@ FormFillPrefListener.prototype =
var formController = Components.classes["@mozilla.org/satchel/form-fill-controller;1"].getService(Components.interfaces.nsIAutoCompleteInput);
formController.disableAutoComplete = !gFormFillEnabled;
var searchBar = document.getElementsByTagName("searchbar");
for (var i=0; i<searchBar.length;i++) {
var searchBar = BrowserSearch.getSearchBar();
if (searchBar) {
if (gFormFillEnabled)
searchBar[i].removeAttribute("disableautocomplete");
searchBar.removeAttribute("disableautocomplete");
else
searchBar[i].setAttribute("disableautocomplete", "true");
searchBar.setAttribute("disableautocomplete", "true");
}
}
}
@ -2960,7 +2964,7 @@ const BrowserSearch = {
getSearchBar: function BrowserSearch_getSearchBar() {
var searchBar = document.getElementById("searchbar");
if (searchBar && !searchBar.parentNode.parentNode.collapsed &&
!(window.getComputedStyle(searchBar.parentNode, null).display == "none"))
window.getComputedStyle(searchBar.parentNode, null).display != "none")
return searchBar;
return null;
}

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

@ -80,10 +80,6 @@
</content>
<implementation implements="nsIObserver">
<constructor><![CDATA[
setTimeout(function (a) { a.init(); }, 0, this);
]]></constructor>
<method name="init">
<body><![CDATA[
// Refresh the display (updating icon, etc)