Bug 1430128 - Remove remnants of the iconsize attribute. r=Gijs

MozReview-Commit-ID: 3a80XcR3NUM

--HG--
extra : rebase_source : 25607ac27fd4e84ebdbfe13a3c77ba2ea0df6d7b
This commit is contained in:
Dão Gottwald 2018-01-12 16:03:44 +01:00
Родитель 348f635510
Коммит 827618fca1
4 изменённых файлов: 16 добавлений и 48 удалений

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

@ -602,7 +602,7 @@
<toolbox id="navigator-toolbox">
<!-- Menu -->
<toolbar type="menubar" id="toolbar-menubar" class="chromeclass-menubar" customizable="true"
mode="icons" iconsize="small"
mode="icons"
#ifdef MENUBAR_CAN_AUTOHIDE
toolbarname="&menubarCmd.label;"
accesskey="&menubarCmd.accesskey;"
@ -628,7 +628,6 @@
fullscreentoolbar="true"
customizable="true"
mode="icons"
iconsize="small"
aria-label="&tabsToolbar.label;"
context="toolbar-context-menu"
collapsed="true">
@ -711,7 +710,6 @@
<toolbar id="nav-bar"
aria-label="&navbarCmd.label;"
fullscreentoolbar="true" mode="icons" customizable="true"
iconsize="small"
customizationtarget="nav-bar-customization-target"
overflowable="true"
overflowbutton="nav-bar-overflow-button"
@ -979,7 +977,7 @@
</toolbar>
<toolbar id="PersonalToolbar"
mode="icons" iconsize="small"
mode="icons"
class="chromeclass-directories"
context="toolbar-context-menu"
toolbarname="&personalbarCmd.label;" accesskey="&personalbarCmd.accesskey;"

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

@ -26,25 +26,6 @@
this.addEventListener("underflow", this);
}
// Bug 989289: Forcibly set the now unsupported "mode" and "iconsize"
// attributes, just in case they accidentally get restored from
// persistence from a user that's been upgrading and downgrading.
if (CustomizableUI.isBuiltinToolbar(this.id)) {
const kAttributes = new Map([["mode", "icons"], ["iconsize", "small"]]);
for (let [attribute, value] of kAttributes) {
if (this.getAttribute(attribute) != value) {
this.setAttribute(attribute, value);
document.persist(this.id, attribute);
}
if (this.toolbox) {
if (this.toolbox.getAttribute(attribute) != value) {
this.toolbox.setAttribute(attribute, value);
document.persist(this.toolbox.id, attribute);
}
}
}
}
// Searching for the toolbox palette in the toolbar binding because
// toolbars are constructed first.
let toolbox = this.toolbox;

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

@ -1774,7 +1774,7 @@ BrowserGlue.prototype = {
// eslint-disable-next-line complexity
_migrateUI: function BG__migrateUI() {
const UI_VERSION = 61;
const UI_VERSION = 62;
const BROWSER_DOCURL = "chrome://browser/content/browser.xul";
let currentUIVersion;
@ -1839,17 +1839,6 @@ BrowserGlue.prototype = {
}
}
if (currentUIVersion < 18) {
// Remove iconsize and mode from all the toolbars
let toolbars = ["navigator-toolbox", "nav-bar", "PersonalToolbar",
"TabsToolbar", "toolbar-menubar"];
for (let resourceName of ["mode", "iconsize"]) {
for (let toolbarId of toolbars) {
xulStore.removeValue(BROWSER_DOCURL, toolbarId, resourceName);
}
}
}
if (currentUIVersion < 19) {
let detector = null;
try {
@ -2270,6 +2259,17 @@ BrowserGlue.prototype = {
xulStore.removeValue(BROWSER_DOCURL, "navigator-toolbox", "toolbarset");
}
if (currentUIVersion < 62) {
// Remove iconsize and mode from all the toolbars
let toolbars = ["navigator-toolbox", "nav-bar", "PersonalToolbar",
"TabsToolbar", "toolbar-menubar"];
for (let resourceName of ["mode", "iconsize"]) {
for (let toolbarId of toolbars) {
xulStore.removeValue(BROWSER_DOCURL, toolbarId, resourceName);
}
}
}
// Update the migration version.
Services.prefs.setIntPref("browser.migration.version", UI_VERSION);
},

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

@ -42,14 +42,11 @@ toolbarpaletteitem {
cursor: grab;
}
toolbar[iconsize="small"] toolbarpaletteitem[type="spacer"] {
toolbarpaletteitem[type="spacer"],
toolbarspacer {
min-width: 24px !important;
}
toolbarpaletteitem[type="spacer"] {
min-width: 32px !important;
}
.toolbarpaletteitem-box[type="spacer"] {
border: 1px solid #A3A3A3;
background: url("chrome://global/skin/10pct_transparent_grey.png") repeat;
@ -108,11 +105,3 @@ toolbarpaletteitem[dragover="right"] {
border-right-color: #000000;
}
toolbar[iconsize="small"] toolbarspacer {
min-width: 24px !important;
}
toolbarspacer {
min-width: 32px !important;
}