Bug 877856 - Remove obsolete defaultset attributes once Australis lands. r?Gijs Kruitbosch
MozReview-Commit-ID: Ve8PWDg96
--- a/browser/base/content/browser.xul
+++ b/browser/base/content/browser.xul
@@ -570,17 +570,16 @@
#endif
<deck flex="1" id="tab-view-deck">
<vbox flex="1" id="browser-panel">
<toolbox id="navigator-toolbox" mode="icons">
<!-- Menu -->
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
- defaultset="menubar-items"
mode="icons" iconsize="small"
#ifdef MENUBAR_CAN_AUTOHIDE
toolbarname="&menubarCmd.label;"
accesskey="&menubarCmd.accesskey;"
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
autohide="true"
#endif
#endif
@@ -602,17 +601,16 @@
<toolbar id="TabsToolbar"
fullscreentoolbar="true"
customizable="true"
mode="icons"
iconsize="small"
aria-label="&tabsToolbar.label;"
context="toolbar-context-menu"
- defaultset="tabbrowser-tabs,new-tab-button,alltabs-button"
collapsed="true">
#if defined(MOZ_WIDGET_GTK) || defined(MOZ_WIDGET_QT)
<hbox id="private-browsing-indicator"
skipintoolbarset="true"/>
#endif
<tabs id="tabbrowser-tabs"
@@ -684,21 +682,16 @@
Should you need to add items to the toolbar here, make sure to also add them
to the default placements of buttons in CustomizableUI.jsm, so the
customization code doesn't get confused.
-->
<toolbar id="nav-bar"
aria-label="&navbarCmd.label;"
fullscreentoolbar="true" mode="icons" customizable="true"
iconsize="small"
-#ifdef MOZ_DEV_EDITION
- defaultset="urlbar-container,search-container,developer-button,bookmarks-menu-button,downloads-button,home-button,loop-button"
-#else
- defaultset="urlbar-container,search-container,bookmarks-menu-button,downloads-button,home-button,loop-button"
-#endif
customizationtarget="nav-bar-customization-target"
overflowable="true"
overflowbutton="nav-bar-overflow-button"
overflowtarget="widget-overflow-list"
overflowpanel="widget-overflow"
context="toolbar-context-menu">
<hbox id="nav-bar-customization-target" flex="1">
@@ -989,17 +982,16 @@
</toolbar>
<toolbarset id="customToolbars" context="toolbar-context-menu"/>
<toolbar id="PersonalToolbar"
mode="icons" iconsize="small"
class="chromeclass-directories"
context="toolbar-context-menu"
- defaultset="personal-bookmarks"
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"
collapsed="true"
customizable="true">
<toolbaritem id="personal-bookmarks"
title="&bookmarksToolbarItem.label;"
cui-areatype="toolbar"
removable="true">
<toolbarbutton id="bookmarks-toolbar-placeholder"
--- a/browser/components/nsBrowserGlue.js
+++ b/browser/components/nsBrowserGlue.js
@@ -1828,17 +1828,17 @@ BrowserGlue.prototype = {
var notifyBox = win.gBrowser.getNotificationBox();
var notification = notifyBox.appendNotification(text, title, null,
notifyBox.PRIORITY_CRITICAL_MEDIUM,
buttons);
notification.persistence = -1; // Until user closes it
},
_migrateUI: function BG__migrateUI() {
- const UI_VERSION = 38;
+ const UI_VERSION = 39;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
if (Services.prefs.prefHasUserValue("browser.migration.version")) {
currentUIVersion = Services.prefs.getIntPref("browser.migration.version");
} else {
// This is a new profile, nothing to migrate.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
@@ -2197,16 +2197,25 @@ BrowserGlue.prototype = {
if (currentUIVersion < 37) {
Services.prefs.clearUserPref("browser.sessionstore.restore_on_demand");
}
if (currentUIVersion < 38) {
LoginHelper.removeLegacySignonFiles();
}
+
+ if (currentUIVersion < 39) {
+ // Remove the 'defaultset' value for all the toolbars
+ let toolbars = ["nav-bar", "PersonalToolbar",
+ "addon-bar", "TabsToolbar", "toolbar-menubar"];
+ for (let toolbarId of toolbars) {
+ xulStore.removeValue(BROWSER_DOCURL, toolbarId, "defaultset");
+ }
+ }
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},
_hasExistingNotificationPermission: function BG__hasExistingNotificationPermission() {
let enumerator = Services.perms.enumerator;
while (enumerator.hasMoreElements()) {
let permission = enumerator.getNext().QueryInterface(Ci.nsIPermission);