From 35783c647f74dc1dd2f72221039226ab928e91ba Mon Sep 17 00:00:00 2001 From: YUKI Hiroshi Date: Wed, 17 Feb 2016 17:22:57 +0900 Subject: [PATCH] Don't show sound indicator for flat parent tabs --- modules/browser.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/modules/browser.js b/modules/browser.js index f4b6bbd5..2881e39a 100644 --- a/modules/browser.js +++ b/modules/browser.js @@ -6180,9 +6180,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { { var children = this.getChildTabs(aTab); - var hasSoundPlayingChild = children.some(function(aChild) { + var hasSoundPlayingChild = ( + this.allowSubtreeCollapseExpand && + children.some(function(aChild) { return aChild.getAttribute('soundplaying') == 'true'; - }, this); + }, this) + ); var reallySoundPlaying = this.getTabValue(aTab, this.kREALLY_SOUND_PLAYING) == 'true'; if (hasSoundPlayingChild || reallySoundPlaying) @@ -6190,9 +6193,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, { else aTab.removeAttribute('soundplaying'); - var allChildrenMuted = children.length > 0 && children.every(function(aChild) { + var allChildrenMuted = ( + this.allowSubtreeCollapseExpand && + children.length > 0 && children.every(function(aChild) { return aChild.getAttribute('muted') == 'true'; - }, this); + }, this) + ); if ((allChildrenMuted && !reallySoundPlaying) || this.getTabValue(aTab, this.kREALLY_MUTED) == 'true') aTab.setAttribute('muted', true);