зеркало из https://github.com/mozilla/gecko-dev.git
Disable new location bar (bug 366797) again due to Ts/Txul regression
This commit is contained in:
Родитель
f8eb726afe
Коммит
7ab79d699a
|
@ -2,10 +2,12 @@ searchbar {
|
||||||
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar");
|
-moz-binding: url("chrome://browser/content/search/search.xml#searchbar");
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ::::: location bar ::::: */
|
/* XXX Disabled for now due to perf/leak regressions
|
||||||
#urlbar {
|
/ ::::: location bar ::::: /
|
||||||
|
#urlbar {
|
||||||
-moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
|
-moz-binding: url(chrome://browser/content/urlbarBindings.xml#urlbar);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
#PopupAutoComplete {
|
#PopupAutoComplete {
|
||||||
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-result-popup");
|
-moz-binding: url("chrome://browser/content/urlbarBindings.xml#urlbar-result-popup");
|
||||||
|
|
|
@ -101,6 +101,7 @@ var gNavigatorBundle = null;
|
||||||
var gIsLoadingBlank = false;
|
var gIsLoadingBlank = false;
|
||||||
var gLastValidURLStr = "";
|
var gLastValidURLStr = "";
|
||||||
var gLastValidURL = null;
|
var gLastValidURL = null;
|
||||||
|
var gClickSelectsAll = false;
|
||||||
var gMustLoadSidebar = false;
|
var gMustLoadSidebar = false;
|
||||||
var gProgressMeterPanel = null;
|
var gProgressMeterPanel = null;
|
||||||
var gProgressCollapseTimer = null;
|
var gProgressCollapseTimer = null;
|
||||||
|
@ -116,6 +117,7 @@ var gChromeState = null; // chrome state before we went into print preview
|
||||||
|
|
||||||
var gSanitizeListener = null;
|
var gSanitizeListener = null;
|
||||||
|
|
||||||
|
var gURLBarAutoFillPrefListener = null;
|
||||||
var gAutoHideTabbarPrefListener = null;
|
var gAutoHideTabbarPrefListener = null;
|
||||||
var gBookmarkAllTabsHandler = null;
|
var gBookmarkAllTabsHandler = null;
|
||||||
|
|
||||||
|
@ -1074,6 +1076,11 @@ function delayedStartup()
|
||||||
// Set up Sanitize Item
|
// Set up Sanitize Item
|
||||||
gSanitizeListener = new SanitizeListener();
|
gSanitizeListener = new SanitizeListener();
|
||||||
|
|
||||||
|
// Enable/Disable URL Bar Auto Fill
|
||||||
|
gURLBarAutoFillPrefListener = new URLBarAutoFillPrefListener();
|
||||||
|
gPrefService.addObserver(gURLBarAutoFillPrefListener.domain,
|
||||||
|
gURLBarAutoFillPrefListener, false);
|
||||||
|
|
||||||
// Enable/Disable auto-hide tabbar
|
// Enable/Disable auto-hide tabbar
|
||||||
gAutoHideTabbarPrefListener = new AutoHideTabbarPrefListener();
|
gAutoHideTabbarPrefListener = new AutoHideTabbarPrefListener();
|
||||||
gPrefService.addObserver(gAutoHideTabbarPrefListener.domain,
|
gPrefService.addObserver(gAutoHideTabbarPrefListener.domain,
|
||||||
|
@ -1082,6 +1089,10 @@ function delayedStartup()
|
||||||
gPrefService.addObserver(gHomeButton.prefDomain, gHomeButton, false);
|
gPrefService.addObserver(gHomeButton.prefDomain, gHomeButton, false);
|
||||||
gHomeButton.updateTooltip();
|
gHomeButton.updateTooltip();
|
||||||
|
|
||||||
|
gClickSelectsAll = gPrefService.getBoolPref("browser.urlbar.clickSelectsAll");
|
||||||
|
if (gURLBar)
|
||||||
|
gURLBar.clickSelectsAll = gClickSelectsAll;
|
||||||
|
|
||||||
#ifdef HAVE_SHELL_SERVICE
|
#ifdef HAVE_SHELL_SERVICE
|
||||||
// Perform default browser checking (after window opens).
|
// Perform default browser checking (after window opens).
|
||||||
var shell = getShellService();
|
var shell = getShellService();
|
||||||
|
@ -1210,6 +1221,8 @@ function BrowserShutdown()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
gPrefService.removeObserver(gURLBarAutoFillPrefListener.domain,
|
||||||
|
gURLBarAutoFillPrefListener);
|
||||||
gPrefService.removeObserver(gAutoHideTabbarPrefListener.domain,
|
gPrefService.removeObserver(gAutoHideTabbarPrefListener.domain,
|
||||||
gAutoHideTabbarPrefListener);
|
gAutoHideTabbarPrefListener);
|
||||||
gPrefService.removeObserver(gHomeButton.prefDomain, gHomeButton);
|
gPrefService.removeObserver(gHomeButton.prefDomain, gHomeButton);
|
||||||
|
@ -1315,6 +1328,41 @@ function nonBrowserWindowDelayedStartup()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
function URLBarAutoFillPrefListener()
|
||||||
|
{
|
||||||
|
this.toggleAutoFillInURLBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
URLBarAutoFillPrefListener.prototype =
|
||||||
|
{
|
||||||
|
domain: "browser.urlbar.autoFill",
|
||||||
|
observe: function (aSubject, aTopic, aPrefName)
|
||||||
|
{
|
||||||
|
if (aTopic != "nsPref:changed" || aPrefName != this.domain)
|
||||||
|
return;
|
||||||
|
|
||||||
|
this.toggleAutoFillInURLBar();
|
||||||
|
},
|
||||||
|
|
||||||
|
toggleAutoFillInURLBar: function ()
|
||||||
|
{
|
||||||
|
if (!gURLBar)
|
||||||
|
return;
|
||||||
|
|
||||||
|
var prefValue = false;
|
||||||
|
try {
|
||||||
|
prefValue = gPrefService.getBoolPref(this.domain);
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (prefValue)
|
||||||
|
gURLBar.setAttribute("completedefaultindex", "true");
|
||||||
|
else
|
||||||
|
gURLBar.removeAttribute("completedefaultindex");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function AutoHideTabbarPrefListener()
|
function AutoHideTabbarPrefListener()
|
||||||
{
|
{
|
||||||
this.toggleAutoHideTabbar();
|
this.toggleAutoHideTabbar();
|
||||||
|
@ -3309,6 +3357,8 @@ function BrowserToolboxCustomizeDone(aToolboxChanged)
|
||||||
// Update global UI elements that may have been added or removed
|
// Update global UI elements that may have been added or removed
|
||||||
if (aToolboxChanged) {
|
if (aToolboxChanged) {
|
||||||
gURLBar = document.getElementById("urlbar");
|
gURLBar = document.getElementById("urlbar");
|
||||||
|
if (gURLBar)
|
||||||
|
gURLBar.clickSelectsAll = gClickSelectsAll;
|
||||||
gProxyButton = document.getElementById("page-proxy-button");
|
gProxyButton = document.getElementById("page-proxy-button");
|
||||||
gProxyFavIcon = document.getElementById("page-proxy-favicon");
|
gProxyFavIcon = document.getElementById("page-proxy-favicon");
|
||||||
gProxyDeck = document.getElementById("page-proxy-deck");
|
gProxyDeck = document.getElementById("page-proxy-deck");
|
||||||
|
|
Загрузка…
Ссылка в новой задаче