Index: browser/app/profile/firefox.js
===================================================================
RCS file: /cvsroot/mozilla/browser/app/profile/firefox.js,v
retrieving revision 1.7.4.23
diff -p -u -8 -r1.7.4.23 firefox.js
--- browser/app/profile/firefox.js 1 Sep 2004 05:01:53 -0000 1.7.4.23
+++ browser/app/profile/firefox.js 5 Sep 2004 01:19:45 -0000
@@ -194,21 +194,23 @@ pref("browser.related.provider", "http:/
pref("browser.related.disabledForDomains", "");
pref("browser.goBrowsing.enabled", true);
// Default bookmark sorting
pref("browser.bookmarks.sort.direction", "descending");
pref("browser.bookmarks.sort.resource", "rdf:http://home.netscape.com/NC-rdf#Name");
// Scripts & Windows prefs
-pref("dom.disable_open_during_load", true);
-pref("javascript.options.showInConsole", false);
-// Make the status bar reliably present and unaffected by pages
-pref("dom.disable_window_open_feature.status", true);
-pref("dom.disable_window_status_change", true);
+pref("dom.disable_open_during_load", true);
+pref("javascript.options.showInConsole", false);
+// Make the location bar reliably present and unaffected by pages
+pref("dom.disable_window_open_feature.location", true);
+pref("dom.disable_window_status_change", true);
+
+pref("browser.trim_user_and_password", true);
// popups.policy 1=allow,2=reject
pref("privacy.popups.policy", 1);
pref("privacy.popups.usecustom", true);
pref("privacy.popups.firstTime", true);
pref("privacy.popups.showBrowserMessage", true);
Index: browser/base/content/browser.js
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/browser.js,v
retrieving revision 1.296.2.3.2.86
diff -p -u -8 -r1.296.2.3.2.86 browser.js
--- browser/base/content/browser.js 1 Sep 2004 05:01:53 -0000 1.296.2.3.2.86
+++ browser/base/content/browser.js 5 Sep 2004 01:20:44 -0000
@@ -663,16 +663,45 @@ function UpdateBackForwardButtons()
if (forwardDisabled == webNavigation.canGoForward) {
if (forwardDisabled)
forwardBroadcaster.removeAttribute("disabled");
else
forwardBroadcaster.setAttribute("disabled", true);
}
}
+var gLocationBar = {
+ kTrimUserPassPref: "browser.trim_user_and_password",
+ _trimUserPass: undefined,
+ get trimUserPass()
+ {
+ if (this._trimUserPass === undefined)
+ this._trimUserPass = gPrefService.getBoolPref(this.kTrimUserPassPref);
+ return this._trimUserPass;
+ },
+
+ setLocationBarValue: function (aLocation)
+ {
+ var uri = Components.classes["@mozilla.org/network/standard-url;1"]
+ .createInstance(Components.interfaces.nsIURI);
+ uri.spec = aLocation;
+ if (this.trimUserPass && uri.username)
+ uri.userPass = "";
+ gURLBar.value = uri.spec;
+ },
+
+ observe: function (aSubject, aTopic, aData)
+ {
+ if (aTopic != "nsPref:changed" || aData != this.kTrimUserPassPref)
+ return;
+
+ this._trimUserPass = gPrefService.getBoolPref(this.kTrimUserPassPref);
+ }
+};
+
#ifdef MOZ_ENABLE_XREMOTE
const gTabOpenObserver = {
observe: function(subject, topic, data)
{
if (topic != "open-new-tab-request" || subject != window)
return;
delayedOpenTab(data);
@@ -1178,16 +1207,21 @@ function delayedStartup()
os.addObserver(gXPInstallObserver, "xpinstall-install-edit-prefs", false);
os.addObserver(gXPInstallObserver, "xpinstall-install-edit-permissions", false);
os.addObserver(gMissingPluginInstaller, "missing-plugin", false);
gPrefService = Components.classes["@mozilla.org/preferences-service;1"]
.getService(Components.interfaces.nsIPrefBranch);
BrowserOffline.init();
+ if (document.documentElement.getAttribute("chromehidden").indexOf("toolbar") != -1) {
+ gURLBar.setAttribute("readonly", "true");
+ gURLBar.setAttribute("enablehistory", "false");
+ }
+
if (gIsLoadingBlank)
prepareForStartup();
if (gURLBar)
gURLBar.addEventListener("dragdrop", URLBarOnDrop, true);
var searchBar = document.getElementById("search-bar");
if(searchBar)
@@ -1263,16 +1297,18 @@ function delayedStartup()
pbi.addObserver(gURLBarAutoFillPrefListener.domain, gURLBarAutoFillPrefListener, false);
pbi.addObserver(gHomeButton.prefDomain, gHomeButton, false);
gHomeButton.updateTooltip();
pbi.addObserver(gTypeAheadFind.prefDomain, gTypeAheadFind, false);
gUseTypeAheadFind = gPrefService.getBoolPref("accessibility.typeaheadfind");
+ pbi.addObserver(gLocationBar.kTrimUserPassPref, gLocationBar, false);
+
// Initialize Plugin Overrides
const kOverridePref = "browser.download.pluginOverrideTypes";
if (gPrefService.prefHasUserValue(kOverridePref)) {
var types = gPrefService.getCharPref(kOverridePref);
types = types.split(",");
const kPluginOverrideTypesNotHandled = "browser.download.pluginOverrideTypesNotHandled";
@@ -1399,16 +1435,17 @@ function Shutdown()
}
try {
var pbi = gPrefService.QueryInterface(Components.interfaces.nsIPrefBranchInternal);
pbi.removeObserver(gFormFillPrefListener.domain, gFormFillPrefListener);
pbi.removeObserver(gURLBarAutoFillPrefListener.domain, gURLBarAutoFillPrefListener);
pbi.removeObserver(gHomeButton.prefDomain, gHomeButton);
pbi.removeObserver(gTypeAheadFind.prefDomain, gTypeAheadFind);
+ pbi.removeObserver(gLocationBar.kTrimUserPassPref, gLocationBar);
} catch (ex) {
}
BrowserOffline.uninit();
var windowManager = Components.classes['@mozilla.org/appshell/window-mediator;1'].getService();
var windowManagerInterface = windowManager.QueryInterface(Components.interfaces.nsIWindowMediator);
var enumerator = windowManagerInterface.getEnumerator(null);
@@ -3472,17 +3509,17 @@ nsBrowserStatusHandler.prototype =
var userTypedValue = browser.userTypedValue;
if (gURLBar && !userTypedValue) {
// If the url has "wyciwyg://" as the protocol, strip it off.
// Nobody wants to see it on the urlbar for dynamically generated
// pages.
if (/^\s*wyciwyg:\/\/\d+\//.test(location))
location = RegExp.rightContext;
- setTimeout(function(loc, aloc) { gURLBar.value = loc; SetPageProxyState("valid", aloc);}, 0, location, aLocation);
+ setTimeout(function(loc, aloc) { gLocationBar.setLocationBarValue(loc); SetPageProxyState("valid", aloc);}, 0, location, aLocation);
// Setting the urlBar value in some cases causes userTypedValue to
// become set because of oninput, so reset it to its old value.
browser.userTypedValue = userTypedValue;
} else {
gURLBar.value = userTypedValue;
SetPageProxyState("invalid", null);
}
Index: browser/base/content/browser.xul
===================================================================
RCS file: /cvsroot/mozilla/browser/base/content/browser.xul,v
retrieving revision 1.228.2.2.2.31
diff -p -u -8 -r1.228.2.2.2.31 browser.xul
--- browser/base/content/browser.xul 1 Sep 2004 05:01:53 -0000 1.228.2.2.2.31
+++ browser/base/content/browser.xul 5 Sep 2004 01:20:50 -0000
@@ -141,53 +141,53 @@
# The entire main menubar is placed into browser-menubar.inc, so that it can be shared by
# hiddenWindow.xul.
#include browser-menubar.inc
#endif
-
-
-
-
-
@@ -217,57 +217,58 @@
onerror="gBrowser.addToMissedIconCache(this.src);
this.removeAttribute('src');
this.parentNode.selectedIndex = 0;"
tooltiptext="&proxyIcon.tooltip;"/>
-
-
+
-
-
+
-
-
#ifdef HAVE_SHELL_SERVICE
-
#endif
-
-
-
-
-
-