Bug 1561435 - Format browser/base/, a=automatic-formatting
# ignore-this-changeset Differential Revision: https://phabricator.services.mozilla.com/D36041
This commit is contained in:
@@ -30,8 +30,9 @@ var CustomizationHandler = {
|
||||
_customizationStarting() {
|
||||
// Disable the toolbar context menu items
|
||||
let menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.children)
|
||||
for (let childNode of menubar.children) {
|
||||
childNode.setAttribute("disabled", true);
|
||||
}
|
||||
|
||||
let cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.setAttribute("disabled", "true");
|
||||
@@ -45,8 +46,7 @@ var CustomizationHandler = {
|
||||
|
||||
_customizationEnding(aDetails) {
|
||||
// Update global UI elements that may have been added or removed
|
||||
if (aDetails.changed &&
|
||||
AppConstants.platform != "macosx") {
|
||||
if (aDetails.changed && AppConstants.platform != "macosx") {
|
||||
updateEditUIVisibility();
|
||||
}
|
||||
|
||||
@@ -60,8 +60,9 @@ var CustomizationHandler = {
|
||||
|
||||
// Re-enable parts of the UI we disabled during the dialog
|
||||
let menubar = document.getElementById("main-menubar");
|
||||
for (let childNode of menubar.children)
|
||||
for (let childNode of menubar.children) {
|
||||
childNode.setAttribute("disabled", false);
|
||||
}
|
||||
let cmd = document.getElementById("cmd_CustomizeToolbars");
|
||||
cmd.removeAttribute("disabled");
|
||||
|
||||
@@ -74,7 +75,7 @@ var CustomizationHandler = {
|
||||
var AutoHideMenubar = {
|
||||
get _node() {
|
||||
delete this._node;
|
||||
return this._node = document.getElementById("toolbar-menubar");
|
||||
return (this._node = document.getElementById("toolbar-menubar"));
|
||||
},
|
||||
|
||||
_contextMenuListener: {
|
||||
@@ -128,7 +129,12 @@ var AutoHideMenubar = {
|
||||
}
|
||||
},
|
||||
|
||||
_events: ["DOMMenuBarInactive", "DOMMenuBarActive", "popupshowing", "mousedown"],
|
||||
_events: [
|
||||
"DOMMenuBarInactive",
|
||||
"DOMMenuBarActive",
|
||||
"popupshowing",
|
||||
"mousedown",
|
||||
],
|
||||
_enable() {
|
||||
this._node.setAttribute("inactive", "true");
|
||||
for (let event of this._events) {
|
||||
@@ -149,7 +155,7 @@ var AutoHideMenubar = {
|
||||
this._updateState();
|
||||
break;
|
||||
case "popupshowing":
|
||||
// fall through
|
||||
// fall through
|
||||
case "DOMMenuBarActive":
|
||||
this._setActive();
|
||||
break;
|
||||
@@ -159,8 +165,9 @@ var AutoHideMenubar = {
|
||||
}
|
||||
break;
|
||||
case "DOMMenuBarInactive":
|
||||
if (!this._contextMenuListener.active)
|
||||
if (!this._contextMenuListener.active) {
|
||||
this._setInactiveAsync();
|
||||
}
|
||||
break;
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user