Bug 1477793 - Show hidden audio tabs after Hidden Tabs r=dao

MozReview-Commit-ID: Ce9PLLx3UnB

--HG--
extra : rebase_source : 626a67c021eafa7e0ba5e1022d52d19f1acdf157
This commit is contained in:
Mark Striemer 2018-07-23 14:16:37 -05:00
Родитель c70099b77d
Коммит 689a6cf8a2
1 изменённых файлов: 9 добавлений и 9 удалений

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

@ -34,11 +34,9 @@ var gTabsPanel = {
this.initElements();
let hiddenTabsMenuButton = document.getElementById("allTabsMenu-hiddenTabsButton");
let hiddenTabsSeparator = document.getElementById("allTabsMenu-hiddenTabsSeparator");
this.hiddenAudioTabsPopup = new TabsPanel({
view: this.allTabsView,
insertBefore: hiddenTabsSeparator,
insertBefore: document.getElementById("allTabsMenu-tabsSeparator"),
filterFn: (tab) => tab.hidden && tab.soundPlaying,
});
this.allTabsPanel = new TabsPanel({
@ -47,8 +45,6 @@ var gTabsPanel = {
filterFn: (tab) => !tab.pinned && !tab.hidden,
});
let containerTabsButton = document.getElementById("allTabsMenu-containerTabsButton");
let containerTabsSeparator = document.getElementById("allTabsMenu-containerTabsSeparator");
this.allTabsView.addEventListener("ViewShowing", (e) => {
PanelUI._ensureShortcutsShown(this.allTabsView);
e.target.querySelector(".undo-close-tab").disabled =
@ -56,12 +52,16 @@ var gTabsPanel = {
let containersEnabled = Services.prefs.getBoolPref("privacy.userContext.enabled")
&& !PrivateBrowsingUtils.isWindowPrivate(window);
containerTabsButton.hidden = !containersEnabled;
containerTabsSeparator.hidden = !containersEnabled;
document.getElementById("allTabsMenu-containerTabsButton")
.hidden = !containersEnabled;
document.getElementById("allTabsMenu-containerTabsSeparator")
.hidden = !containersEnabled;
let hasHiddenTabs = gBrowser.visibleTabs.length < gBrowser.tabs.length;
hiddenTabsMenuButton.hidden = !hasHiddenTabs;
hiddenTabsSeparator.hidden = !hasHiddenTabs;
document.getElementById("allTabsMenu-hiddenTabsButton")
.hidden = !hasHiddenTabs;
document.getElementById("allTabsMenu-hiddenTabsSeparator")
.hidden = !hasHiddenTabs;
});
this.allTabsView.addEventListener("ViewShown", (e) => {