[Pkg-mozext-commits] [tree-style-tab] 01/03: Imported Upstream version 0.16.2015122501

Ximin Luo infinity0 at debian.org
Sun Jan 3 22:36:35 UTC 2016


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository tree-style-tab.

commit 0cab58f9a28a9278c982cb33705c3093d38ea1d6
Author: Ximin Luo <infinity0 at debian.org>
Date:   Sun Jan 3 22:41:38 2016 +0100

    Imported Upstream version 0.16.2015122501
---
 META-INF/manifest.mf                               | 108 ++++----
 META-INF/mozilla.rsa                               | Bin 4189 -> 4189 bytes
 META-INF/mozilla.sf                                |   4 +-
 content/treestyletab/bookmarksOverlayEditable.js   |  10 +-
 content/treestyletab/config.xul                    |   2 +-
 ...kmarkMultipleTabs_bookmarkPropertiesOverlay.xul |   6 +-
 content/treestyletab/treestyletab.css              |  21 +-
 content/treestyletab/treestyletab.xul              |   4 +-
 content/treestyletab/windowHelper.js               |  81 +++---
 content/treestyletab/windowHelperHacks.js          |   4 +-
 defaults/preferences/treestyletab.js               |  19 ++
 install.rdf                                        |   4 +-
 locale/cs/treestyletab/treestyletab.dtd            |   3 +-
 locale/da-DK/treestyletab/treestyletab.dtd         |   3 +-
 locale/de-DE/treestyletab/treestyletab.dtd         |   3 +-
 locale/en-US/treestyletab/treestyletab.dtd         |   3 +-
 locale/es-ES/treestyletab/treestyletab.dtd         |   3 +-
 locale/fr-FR/treestyletab/treestyletab.dtd         |   3 +-
 locale/it-IT/treestyletab/treestyletab.dtd         |   3 +-
 locale/ja/treestyletab/treestyletab.dtd            |   3 +-
 locale/pl/treestyletab/treestyletab.dtd            |   3 +-
 locale/ru/treestyletab/treestyletab.dtd            |   3 +-
 locale/sv-SE/treestyletab/treestyletab.dtd         |   3 +-
 locale/zh-CN/treestyletab/treestyletab.dtd         |   3 +-
 locale/zh-TW/treestyletab/treestyletab.dtd         |   3 +-
 modules/autoHide.js                                |  19 +-
 modules/base.js                                    |  10 +-
 modules/browser.js                                 | 296 ++++++++++++++++-----
 modules/constants.js                               |   4 +-
 modules/window.js                                  |  13 +-
 30 files changed, 443 insertions(+), 201 deletions(-)

diff --git a/META-INF/manifest.mf b/META-INF/manifest.mf
index 2264eab..d30ab74 100644
--- a/META-INF/manifest.mf
+++ b/META-INF/manifest.mf
@@ -2,8 +2,8 @@ Manifest-Version: 1.0
 
 Name: install.rdf
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: LU9MOfmVFQKCFVg0AM159g==
-SHA1-Digest: BNsWVAkBeLoD+KiFzhm8uZhdrf0=
+MD5-Digest: CAt8kfQijgwV0VrebcRR4g==
+SHA1-Digest: taJHxkigk8GxKRBvwYWA7GbI25k=
 
 Name: chrome.manifest
 Digest-Algorithms: MD5 SHA1
@@ -37,8 +37,8 @@ SHA1-Digest: /V6d117O8c9Qgt7NoCuVRN2bOF0=
 
 Name: content/treestyletab/bookmarksOverlayEditable.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: fz/WG9plX7+4mymO1k4eqg==
-SHA1-Digest: CBTSfQAfKiL/sT9YpY8vwW9Zml0=
+MD5-Digest: aRKA2Ooi+mTYX9yfoZnEqg==
+SHA1-Digest: DtU1d+Is7rWbs3c/rzdEje7a8Tk=
 
 Name: content/treestyletab/bookmarksOverlayEditable.xul
 Digest-Algorithms: MD5 SHA1
@@ -57,8 +57,8 @@ SHA1-Digest: LSm4XQfNAqRWieDG2oKRk54Rrh8=
 
 Name: content/treestyletab/config.xul
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: 5ra/v6hW+mpMAh4cvWiz3Q==
-SHA1-Digest: OUv3S1ilPAxoEsF/3yw6g0Gh9OA=
+MD5-Digest: QaUI+njq/1aPa0LBOt69hw==
+SHA1-Digest: RikaDXmgEw6M/cVHItWilEShkAA=
 
 Name: content/treestyletab/content-utils-autohide.js
 Digest-Algorithms: MD5 SHA1
@@ -97,8 +97,8 @@ SHA1-Digest: dUnh9cVls70LC0cO+AzOTyJ+7Bc=
 
 Name: content/treestyletab/treestyletab.css
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: UIzT5sgWVHFZhuXzoCT9cQ==
-SHA1-Digest: eYWjBJvS12pO+j90U4BIpE9BDvo=
+MD5-Digest: Mm0SnlWa87xf7i6PZskaSA==
+SHA1-Digest: V8ChvaXQTQoL7PWPnqUSUybFakY=
 
 Name: content/treestyletab/treestyletab.js
 Digest-Algorithms: MD5 SHA1
@@ -112,18 +112,18 @@ SHA1-Digest: yI4r2a9JmBDqDI8qcvvn6R1wG4M=
 
 Name: content/treestyletab/treestyletab.xul
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: xLfM8fCGLnpJnylSe29EeA==
-SHA1-Digest: UL5BD1Q3QU5lrlyvVrvvYzxKzpM=
+MD5-Digest: a1axHz8ImoVUaGIhA0wOzA==
+SHA1-Digest: xdVcooRj2CkN5RnELJyfUbvKzZ0=
 
 Name: content/treestyletab/windowHelper.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: djwD/HnGMfG+uyywHjuBnQ==
-SHA1-Digest: NIayIo0Ik7UxA9Gh2Kt/86y6tmI=
+MD5-Digest: JOMK+8toiBUS/M03riElHw==
+SHA1-Digest: cyjdZyq02U3zrD87OG+gxvTnJZM=
 
 Name: content/treestyletab/windowHelperHacks.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: HU2bYPiXZtwNdiUbkepXhA==
-SHA1-Digest: RJmFgfQwbq0H5AO7AjH42biwkT4=
+MD5-Digest: vVo8T1auXVrfm43DVwFlQQ==
+SHA1-Digest: NGxQoWrIDKS8RhPZk6DbEXVcDbY=
 
 Name: content/treestyletab/res/bookmarkMultipleTabs.xul
 Digest-Algorithms: MD5 SHA1
@@ -133,8 +133,8 @@ SHA1-Digest: SIpJbMdGhMrFhN3F1Bg6yykW/oQ=
 Name: content/treestyletab/res/bookmarkMultipleTabs_bookmarkPropertiesOv
  erlay.xul
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: hLKdeMp53y13zIADzK90pw==
-SHA1-Digest: egqUV8t6VkSTKSNKgj1ZC+yc3jQ=
+MD5-Digest: VSEjpaFSb9qEEPRyKtLsvw==
+SHA1-Digest: xoiQiW9Pw0EsgOyv+N2piD/IQd0=
 
 Name: content/treestyletab/res/icon.png
 Digest-Algorithms: MD5 SHA1
@@ -203,8 +203,8 @@ SHA1-Digest: q0mYa40sk7KoHzdmK6voR/OuGF8=
 
 Name: defaults/preferences/treestyletab.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: AdO/+hHOi1b60QOLzwVY+g==
-SHA1-Digest: e+5nkclUxU2r/6DOyrc4Wp20/ww=
+MD5-Digest: lPwzD9NItQEv3PUa7RZRJQ==
+SHA1-Digest: soqONodaywdE4m2JsBSw7OW91Pw=
 
 Name: locale/cs/treestyletab/license.txt
 Digest-Algorithms: MD5 SHA1
@@ -213,8 +213,8 @@ SHA1-Digest: AmPIaBSAXJtd03ZD/LGrxu3FN3Y=
 
 Name: locale/cs/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: 9sfrumYnt7wxbY1xgGIYUw==
-SHA1-Digest: xkvWRvqzxe2Ty769R5dCDO/3z7I=
+MD5-Digest: GFjhguaDXqBoU6EmEPralw==
+SHA1-Digest: 6Bnzxn4B1BUNCsB4R1/jkfcDiqw=
 
 Name: locale/cs/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -228,8 +228,8 @@ SHA1-Digest: vjay7k00E2Dhmo0XsTlEeFTRPXI=
 
 Name: locale/da-DK/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: Cs5mhbziShKwE3sj9n0HUQ==
-SHA1-Digest: 8MO0+HSwHgb7p7XCn3WCrSHfXso=
+MD5-Digest: 2qQbuzytrLI3gR1RShTh3g==
+SHA1-Digest: Wq4dH3SqSOEhXLAI4XjO8ovAGLc=
 
 Name: locale/da-DK/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -243,8 +243,8 @@ SHA1-Digest: CQr1mkH//MpqNCWbLou/CJX2aDk=
 
 Name: locale/de-DE/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: Y7bvv6AflqW/1YpSH/y0EA==
-SHA1-Digest: 2uzb1LBxD8JwX5jylDwUfqFqNb8=
+MD5-Digest: 8k+CsLwHHSe1I54khQTQ9w==
+SHA1-Digest: vfifHgKnlz1ZfkGFHQWClnbOnlg=
 
 Name: locale/de-DE/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -258,8 +258,8 @@ SHA1-Digest: /vNGGzRR58QK5AOQjlorkE5GCAI=
 
 Name: locale/en-US/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: zYzWcmQTBKdgXDyHSLHevQ==
-SHA1-Digest: H3VKEtaRrs9Jt9dPBpdZkTePgKg=
+MD5-Digest: iDLxSpuoKKNs699XnahdWA==
+SHA1-Digest: 4VWXkPnDg6Y/as5jndUQ2Crv3Eo=
 
 Name: locale/en-US/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -273,8 +273,8 @@ SHA1-Digest: OeORv30Cbr8ylQKVbM0O9Y5n+4Y=
 
 Name: locale/es-ES/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: AIljkxD0WFor3cAs7w8VvA==
-SHA1-Digest: KloS63+wkJ7jJ2sqlnAhXjOrEMk=
+MD5-Digest: OUTcy4zd5Vxuzcu5FXhgGA==
+SHA1-Digest: dq3ViTmc3yQeagUUn6jn1AJqh5g=
 
 Name: locale/es-ES/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -288,8 +288,8 @@ SHA1-Digest: eSqlFr5OnT5gIpY1PF7f/E3bHas=
 
 Name: locale/fr-FR/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: 5I8CWMNxf5PHV/yZogeLlA==
-SHA1-Digest: /Qomr6IpER0UvCK/4RmGqe+09HA=
+MD5-Digest: Xv5frYQruWKmsjywNOTj9A==
+SHA1-Digest: SNvJsrIA10cSSO0a+nb2zs3i9Ck=
 
 Name: locale/fr-FR/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -303,8 +303,8 @@ SHA1-Digest: DqBJQrV8f3tss7fKSnCdeXNIxYs=
 
 Name: locale/it-IT/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: Bq7hRx8kdK+bXqOUt0BCmQ==
-SHA1-Digest: iegxPDoHaEHX3tJFp6WZnL3EMCM=
+MD5-Digest: +EEwXCEjVyEwhfddMukiTQ==
+SHA1-Digest: 3z666pwEzH6Tee/hDX1shLrntFE=
 
 Name: locale/it-IT/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -318,8 +318,8 @@ SHA1-Digest: /vNGGzRR58QK5AOQjlorkE5GCAI=
 
 Name: locale/ja/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: O9O7y27oDqxBl8XVjNH5/g==
-SHA1-Digest: AjGpsCyCRsCrYLWO7aOdYadj6X8=
+MD5-Digest: mkOJ40PDsuMqvNxtpJJjOA==
+SHA1-Digest: FfRIjSw0qEiGxdFlwQ//fQkptg4=
 
 Name: locale/ja/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -333,8 +333,8 @@ SHA1-Digest: JwRGjnhAsrasY46ktL+EtP3fxDI=
 
 Name: locale/pl/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: aB7MFn3PfYAa+ojgvYYwGA==
-SHA1-Digest: xlbcom9kY4kLJcsbJy3BrwSLg0s=
+MD5-Digest: KFVWmQdcJ9pGREtXLoODOg==
+SHA1-Digest: i5B0DPl6SfjGK6eXQY2b9QIAFOc=
 
 Name: locale/pl/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -348,8 +348,8 @@ SHA1-Digest: Ewz5/CWtInQDfBCQoje+iGZbjEE=
 
 Name: locale/ru/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: jx81SEEjhZqqTetxx/GvNg==
-SHA1-Digest: qLa7QqLWsojnIkiR7oWo48qhvyA=
+MD5-Digest: PfBvTn8K+gNIHmvd/dGkDg==
+SHA1-Digest: fsTj+hUNX9NzIOCW4Z15gFW0Dik=
 
 Name: locale/ru/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -363,8 +363,8 @@ SHA1-Digest: Zfn4AKRpBe4E44Sg1HIuoxFmif0=
 
 Name: locale/sv-SE/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: sz96FEbaimft0Yh3+b9v8Q==
-SHA1-Digest: fw5oM4sbnYjiBIm0ibMLJQMWq0o=
+MD5-Digest: sAP3Nk44J3lDruqer4GpDQ==
+SHA1-Digest: V/BXP1zzBS4VWaFmWr67FUKcQ4w=
 
 Name: locale/sv-SE/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -378,8 +378,8 @@ SHA1-Digest: CxdX2iIT5cw2WR+1eMh9AA78n+U=
 
 Name: locale/zh-CN/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: zmmEY8SwT0Z8qe2uJ3pjCw==
-SHA1-Digest: LroRpN63Jwc5k4B/ZQFw03Xm9NE=
+MD5-Digest: p/wDbKOmcTNUKMPVJJ6m0w==
+SHA1-Digest: hRTFekXYZAHKfuy0jZMKnwMjwg4=
 
 Name: locale/zh-CN/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -393,8 +393,8 @@ SHA1-Digest: XVqJMKhADCM73LtM7OFthNdECYo=
 
 Name: locale/zh-TW/treestyletab/treestyletab.dtd
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: JvAXUOVeEhu84k3Y0UDGmg==
-SHA1-Digest: Brmd1yAUe7SwDPB97WEZtAFzIwY=
+MD5-Digest: wOiKXRdEV9+7hWwqWu7suQ==
+SHA1-Digest: QsZ16EOh4Nq8UKRGsln0l3WiX8Q=
 
 Name: locale/zh-TW/treestyletab/treestyletab.properties
 Digest-Algorithms: MD5 SHA1
@@ -403,18 +403,18 @@ SHA1-Digest: 820CmLC9fE1O0AAZaeKrzW0ER0g=
 
 Name: modules/autoHide.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: B9zP89rDOYvQbfDt8Zzygg==
-SHA1-Digest: fEWPNjGv/wd+jegY4ae6NViute0=
+MD5-Digest: WSRRLknoma7O3S9aJkSOKw==
+SHA1-Digest: lGdnY8ofd14V1AMwdEOp8dKjAPc=
 
 Name: modules/base.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: SW7n5j5ulYqgVbALxDNHwg==
-SHA1-Digest: gshjveyfvCzlEasH+SJAVmhpduw=
+MD5-Digest: VOevY6uJ0ZCSWIiIZmzO2Q==
+SHA1-Digest: +L7wNk9LzQHZUw9OPQZSEg1NilY=
 
 Name: modules/browser.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: Qsm9orLKQiwwI3wFGdgR5w==
-SHA1-Digest: lFCgOlN5J5AkJiLLgtWlAJLKKdI=
+MD5-Digest: QGVmf085jGnv2mcc5Hq06A==
+SHA1-Digest: 2QUA4g3DDsXPc/PmD9FT42CGRac=
 
 Name: modules/browserUIShowHideObserver.js
 Digest-Algorithms: MD5 SHA1
@@ -423,8 +423,8 @@ SHA1-Digest: 0ye5nfvkIj6pI35yGQAEL7xtJ+k=
 
 Name: modules/constants.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: bXcNFYoNHgH7Ut8DERrw9w==
-SHA1-Digest: YJ98EXt4ZUC8A9NCHjbj3fOUF6M=
+MD5-Digest: EHGxOf4hgnxhSn5EG9Q3ig==
+SHA1-Digest: uk+B7UWHZ+SGcCrBuSYDEi+lwBE=
 
 Name: modules/contentBridge.js
 Digest-Algorithms: MD5 SHA1
@@ -483,8 +483,8 @@ SHA1-Digest: z+FPUT6tjjGfA52pyzkH0LPYwB0=
 
 Name: modules/window.js
 Digest-Algorithms: MD5 SHA1
-MD5-Digest: wYWu/aoxc/N0JO1GpDROKg==
-SHA1-Digest: 1UMTBrQ27VOYeSz+Lzk2iDFJiuQ=
+MD5-Digest: 2YhxOObDBT3JeYp0wn4Y9Q==
+SHA1-Digest: VhNri9EbLd5snZIeuxlX5G5CuIM=
 
 Name: modules/lib/animationManager.js
 Digest-Algorithms: MD5 SHA1
diff --git a/META-INF/mozilla.rsa b/META-INF/mozilla.rsa
index 3f13926..8a26cc4 100644
Binary files a/META-INF/mozilla.rsa and b/META-INF/mozilla.rsa differ
diff --git a/META-INF/mozilla.sf b/META-INF/mozilla.sf
index 6f46475..36df67f 100644
--- a/META-INF/mozilla.sf
+++ b/META-INF/mozilla.sf
@@ -1,4 +1,4 @@
 Signature-Version: 1.0
-MD5-Digest-Manifest: qqshu9SyS0COjRVzsZbRkw==
-SHA1-Digest-Manifest: /jRGtjTb2V8ydEzI2MuaANhRgMg=
+MD5-Digest-Manifest: T08tnhNEZ1g5FL/L2ZxHZg==
+SHA1-Digest-Manifest: iNKONgCoicdK/P5/AHA1K9bV7zQ=
 
diff --git a/content/treestyletab/bookmarksOverlayEditable.js b/content/treestyletab/bookmarksOverlayEditable.js
index c529c3f..aa5b429 100644
--- a/content/treestyletab/bookmarksOverlayEditable.js
+++ b/content/treestyletab/bookmarksOverlayEditable.js
@@ -218,11 +218,13 @@ var TreeStyleTabBookmarksServiceEditable = inherit(TreeStyleTabBookmarksService,
 					this._doProgressivelyTimers[name] = window.setTimeout(progressiveIteration, interval);
 				}
 			}
-			catch(e if e instanceof StopIteration) {
-				aParams.onComplete();
-			}
 			catch(e) {
-				Components.utils.reportError(e);
+				if (e instanceof StopIteration) {
+					aParams.onComplete();
+				}
+				else {
+					Components.utils.reportError(e);
+				}
 			}
 			finally {
 				this._doProgressivelyTimers[name] = null;
diff --git a/content/treestyletab/config.xul b/content/treestyletab/config.xul
index c790f84..7c06f7c 100644
--- a/content/treestyletab/config.xul
+++ b/content/treestyletab/config.xul
@@ -354,7 +354,7 @@
 		<hbox align="center">
 			<checkbox id="extensions.treestyletab.show.context-item-toggleAutoHide-check"
 				preference="extensions.treestyletab.show.context-item-toggleAutoHide"
-				label="&context.toggleAutoHide.label;"/>
+				label="&context.toggleAutoHide.label.hide;"/>
 			<checkbox id="extensions.treestyletab.show.context-item-toggleFixed-check"
 				preference="extensions.treestyletab.show.context-item-toggleFixed"
 				label="&context.toggleFixed.label;"/>
diff --git a/content/treestyletab/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul b/content/treestyletab/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
index 23e0488..2ecb846 100644
--- a/content/treestyletab/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
+++ b/content/treestyletab/res/bookmarkMultipleTabs_bookmarkPropertiesOverlay.xul
@@ -25,13 +25,13 @@
 (function() {
 	if (!('BookmarkPropertiesPanel' in window) ||
 		!BookmarkPropertiesPanel._determineItemInfo ||
-		BookmarkPropertiesPanel._determineItemInfo.toSource().indexOf('__folderNameOverride') > -1)
+		BookmarkPropertiesPanel.__bookmarkMultipleTabs__determineItemInfo)
 		return;
 
 	// Defined at http://mxr.mozilla.org/mozilla-central/source/browser/components/places/content/bookmarkProperties.js#73
 	const ACTION_ADD = 1;
 
-	BookmarkPropertiesPanel.__treestyletab__determineItemInfo = BookmarkPropertiesPanel._determineItemInfo;
+	BookmarkPropertiesPanel.__bookmarkMultipleTabs__determineItemInfo = BookmarkPropertiesPanel._determineItemInfo;
 	BookmarkPropertiesPanel._determineItemInfo = function(...aArgs) {
 		var folderNameOverride = null;
 		try {
@@ -42,7 +42,7 @@
 		}
 		catch(e) {
 		}
-		var retVal = this.__treestyletab__determineItemInfo.apply(this, aArgs);
+		var retVal = this.__bookmarkMultipleTabs__determineItemInfo.apply(this, aArgs);
 		if (folderNameOverride &&
 			this._action == ACTION_ADD) {
 			let dialogInfo = window.arguments[0];
diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css
index 81c14f5..bae0f28 100644
--- a/content/treestyletab/treestyletab.css
+++ b/content/treestyletab/treestyletab.css
@@ -94,7 +94,13 @@
   tabbrowser[tabcontainer]
   .tabbrowser-strip.treestyletab-tabbar-placeholder+splitter,
 :root[inDOMFullscreen="true"]
-  .treestyletab-tabbar-toggler {
+  .treestyletab-tabbar-toggler,
+:root[inDOMFullscreen="true"]
+  .tabbrowser-tabs[treestyletab-mode="vertical"]
+  .tabbrowser-tab[pinned],
+:root[inDOMFullscreen="true"]
+  .tabbrowser-tabs[treestyletab-mode="vertical"]
+  .tabbrowser-tab[pinned] * /* this is required to hide unexpectedly shown gray rect (ex. .tab-background) */ {
 	visibility: collapse !important;
 }
 
@@ -246,6 +252,8 @@ tabs.tabbrowser-tabs[treestyletab-tabbar-position="left"][treestyletab-invert-sc
 /* hide horizontal tab bar UI for vertical tab bar */
 .tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-arrowscrollbox > .scrollbutton-up,
 .tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-arrowscrollbox > .scrollbutton-down:not([treestyletab-notifybgtab-phase]),
+.tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-arrowscrollbox > .arrowscrollbox-overflow-start-indicator,
+.tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-arrowscrollbox > .arrowscrollbox-overflow-end-indicator,
 .tabbrowser-tabs[treestyletab-mode="vertical"] .tabs-closebutton-box,
 .tabbrowser-tabs[treestyletab-mode="vertical"] .tab-drop-indicator-bar {
 	visibility: collapse !important;
@@ -609,10 +617,6 @@ toolbar.treestyletab-tabbar-toolbar-ready:not([nowindowdrag="true"]),
   .tabbrowser-tab[pinned],
 *[collapsed="true"]
   .tabbrowser-tabs[treestyletab-mode="vertical"]
-  .tabbrowser-tab[pinned] * /* this is required to hide unexpectedly shown gray rect (ex. .tab-background) */,
-.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-dom-fullscreen-activated="true"]
-  .tabbrowser-tab[pinned],
-.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-dom-fullscreen-activated="true"]
   .tabbrowser-tab[pinned] * /* this is required to hide unexpectedly shown gray rect (ex. .tab-background) */ {
 	visibility: collapse;
 }
@@ -643,6 +647,13 @@ window[chromehidden~="toolbar"]
 	visibility: collapse;
 }
 
+/* hide virtual sound indicator icon in subtree-expanded parent tabs */
+.tabbrowser-tab[soundplaying="true"]:not([treestyletab-really-sound-playing="true"]):not([treestyletab-subtree-collapsed="true"])
+  :-moz-any(.tab-icon-sound,
+            .tab-icon-overlay[soundplaying]) {
+	display: none;
+}
+
 
 /* full tooltip */
 
diff --git a/content/treestyletab/treestyletab.xul b/content/treestyletab/treestyletab.xul
index 6c6d7c7..5b7d51d 100644
--- a/content/treestyletab/treestyletab.xul
+++ b/content/treestyletab/treestyletab.xul
@@ -126,7 +126,9 @@
 
 		<menuseparator id="context-separator-toggleAutoHide"/>
 		<menuitem id="context-item-toggleAutoHide"
-			label="&context.toggleAutoHide.label;"
+			label="&context.toggleAutoHide.label.hide;"
+			label-hide="&context.toggleAutoHide.label.hide;"
+			label-shrink="&context.toggleAutoHide.label.shrink;"
 			accesskey="&context.toggleAutoHide.accesskey;"
 			type="checkbox"
 			autocheck="false"
diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js
index 0537e3b..1b35e03 100644
--- a/content/treestyletab/windowHelper.js
+++ b/content/treestyletab/windowHelper.js
@@ -15,7 +15,7 @@ var TreeStyleTabWindowHelper = {
 		gBrowserInit.__treestyletab___delayedStartup = gBrowserInit._delayedStartup;
 		gBrowserInit._delayedStartup = function(...args) {
 			TreeStyleTabWindowHelper.runningDelayedStartup = true;
-			var retVal = this.__treestyletab___delayedStartup.apply(this, args);
+			var retVal = gBrowserInit.__treestyletab___delayedStartup.apply(this, args);
 			TreeStyleTabWindowHelper.runningDelayedStartup = false;
 			return retVal;
 		};
@@ -32,14 +32,14 @@ var TreeStyleTabWindowHelper = {
 					where = TreeStyleTabUtils.prefs.getPref('browser.link.open_newwindow');
 			}
 			TreeStyleTabService.onBeforeBrowserAccessOpenURI(aOpener, where, aContext);
-			return this.__treestyletab__openURI.call(this, aURI, aOpener, aWhere, aContext);
+			return nsBrowserAccess.prototype.__treestyletab__openURI.call(this, aURI, aOpener, aWhere, aContext);
 		};
 
 		nsBrowserAccess.prototype.__treestyletab__openURIInFrame = nsBrowserAccess.prototype.openURIInFrame;
 		nsBrowserAccess.prototype.openURIInFrame = function(aURI, aParams, aWhere, aContext) {
 			if (aWhere === Ci.nsIBrowserDOMWindow.OPEN_NEWTAB)
 				TreeStyleTabService.onBeforeBrowserAccessOpenURI(aParams, aWhere, aContext);
-			return this.__treestyletab__openURIInFrame.call(this, aURI, aParams, aWhere, aContext);
+			return nsBrowserAccess.prototype.__treestyletab__openURIInFrame.call(this, aURI, aParams, aWhere, aContext);
 		};
 
 		if ('TabsInTitlebar' in window) {
@@ -54,13 +54,13 @@ var TreeStyleTabWindowHelper = {
 		window.__treestyletab__BrowserOpenTab = window.BrowserOpenTab;
 		window.BrowserOpenTab = function(...aArgs) {
 			gBrowser.treeStyleTab.onBeforeNewTabCommand();
-			return this.__treestyletab__BrowserOpenTab.apply(this, aArgs);
+			return window.__treestyletab__BrowserOpenTab.apply(this, aArgs);
 		};
 
 		window.__treestyletab__undoCloseTab = window.undoCloseTab;
 		window.undoCloseTab = function(...aArgs) {
 			gBrowser.__treestyletab__doingUndoCloseTab = true;
-			var tab = this.__treestyletab__undoCloseTab.apply(this, aArgs);
+			var tab = window.__treestyletab__undoCloseTab.apply(this, aArgs);
 			if (tab)
 				tab.__treestyletab__restoredByUndoCloseTab = true;
 			setTimeout(function() {
@@ -107,7 +107,7 @@ var TreeStyleTabWindowHelper = {
 			if (TreeStyleTabWindowHelper.runningDelayedStartup &&
 				TreeStyleTabService.tearOffSubtreeFromRemote())
 				return;
-			return this.__treestyletab__swapBrowsersAndCloseOther.apply(this, args);
+			return gBrowser.__treestyletab__swapBrowsersAndCloseOther.apply(this, args);
 		};
 	},
  
@@ -151,7 +151,7 @@ var TreeStyleTabWindowHelper = {
 		else { // Firefox 44 and later
 			aObserver.__treestyletab__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag;
 			aObserver._getDropEffectForTabDrag = function(...aArgs) {
-				var effects = this.__treestyletab__getDropEffectForTabDrag.apply(this, aArgs);
+				var effects = aObserver.__treestyletab__getDropEffectForTabDrag.apply(this, aArgs);
 				if (effects === 'copy' || effects === 'move') {
 					let TSTTabBrowser = this instanceof Element ? (this.tabbrowser || this) : gBrowser ;
 					var TST = TSTTabBrowser.treeStyleTab
@@ -170,25 +170,25 @@ var TreeStyleTabWindowHelper = {
 		nsContextMenu.prototype.__treestyletab__openLinkInTab = nsContextMenu.prototype.openLinkInTab;
 		nsContextMenu.prototype.openLinkInTab = function(...aArgs) {
 			TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
-			return this.__treestyletab__openLinkInTab.apply(this, aArgs);
+			return nsContextMenu.prototype.__treestyletab__openLinkInTab.apply(this, aArgs);
 		};
 
 		nsContextMenu.prototype.__treestyletab__openFrameInTab = nsContextMenu.prototype.openFrameInTab;
 		nsContextMenu.prototype.openFrameInTab = function(...aArgs) {
 			TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
-			return this.__treestyletab__openFrameInTab.apply(this, aArgs);
+			return nsContextMenu.prototype.__treestyletab__openFrameInTab.apply(this, aArgs);
 		};
 
 		nsContextMenu.prototype.__treestyletab__viewMedia = nsContextMenu.prototype.viewMedia;
 		nsContextMenu.prototype.viewMedia = function(aEvent) {
 			TreeStyleTabService.onBeforeViewMedia(aEvent, this.target.ownerDocument.defaultView);
-			return this.__treestyletab__viewMedia.call(this, aEvent);
+			return nsContextMenu.prototype.__treestyletab__viewMedia.call(this, aEvent);
 		};
 
 		nsContextMenu.prototype.__treestyletab__viewBGImage = nsContextMenu.prototype.viewBGImage;
 		nsContextMenu.prototype.viewBGImage = function(aEvent) {
 			TreeStyleTabService.onBeforeViewMedia(aEvent, this.target.ownerDocument.defaultView);
-			return this.__treestyletab__viewBGImage.call(this, aEvent);
+			return nsContextMenu.prototype.__treestyletab__viewBGImage.call(this, aEvent);
 		};
 
 		nsContextMenu.prototype.__treestyletab__addDictionaries = nsContextMenu.prototype.addDictionaries;
@@ -196,37 +196,37 @@ var TreeStyleTabWindowHelper = {
 			var newWindowPref = TreeStyleTabUtils.prefs.getPref('browser.link.open_newwindow');
 			var where = newWindowPref === 3 ? 'tab' : 'window' ;
 			TreeStyleTabService.onBeforeOpenLink(where, this.target.ownerDocument.defaultView);
-			return this.__treestyletab__addDictionaries.apply(this, aArgs);
+			return nsContextMenu.prototype.__treestyletab__addDictionaries.apply(this, aArgs);
 		};
 
 		nsContextMenu.prototype.__treestyletab__viewPartialSource = nsContextMenu.prototype.viewPartialSource;
 		nsContextMenu.prototype.viewPartialSource = function(...aArgs) {
 			TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
-			return this.__treestyletab__viewPartialSource.apply(this, aArgs);
+			return nsContextMenu.prototype.__treestyletab__viewPartialSource.apply(this, aArgs);
 		};
 
 		nsContextMenu.prototype.__treestyletab__viewFrameSource = nsContextMenu.prototype.viewFrameSource;
 		nsContextMenu.prototype.viewFrameSource = function(...aArgs) {
 			TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
-			return this.__treestyletab__viewFrameSource.apply(this, aArgs);
+			return nsContextMenu.prototype.__treestyletab__viewFrameSource.apply(this, aArgs);
 		};
 
 		window.__treestyletab__BrowserViewSource = window.BrowserViewSource;
 		window.BrowserViewSource = function(...aArgs) {
 			TreeStyleTabService.handleNewTabFromCurrent(aArgs[0]);
-			return this.__treestyletab__BrowserViewSource.apply(this, aArgs);
+			return window.__treestyletab__BrowserViewSource.apply(this, aArgs);
 		};
 
 		BrowserSearch.__treestyletab__loadSearch = BrowserSearch._loadSearch;
 		BrowserSearch._loadSearch = function(aSearchText, aUseNewTab, aPurpose) {
 			TreeStyleTabService.onBeforeBrowserSearch(aSearchText, aUseNewTab);
-			return this.__treestyletab__loadSearch.call(this, aSearchText, aUseNewTab, aPurpose);
+			return BrowserSearch.__treestyletab__loadSearch.call(this, aSearchText, aUseNewTab, aPurpose);
 		};
 
 		window.__treestyletab__openLinkIn = window.openLinkIn;
 		window.openLinkIn = function(aUrl, aWhere, aParams) {
 			TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab, aParams.fromChrome);
-			return this.__treestyletab__openLinkIn.call(this, aUrl, aWhere, aParams);
+			return window.__treestyletab__openLinkIn.call(this, aUrl, aWhere, aParams);
 		};
 
 		[
@@ -253,7 +253,7 @@ var TreeStyleTabWindowHelper = {
 			owner[original] = owner[name];
 			owner[name] = function(aEvent, aIsPanelClick, ...aArgs) {
 				TreeStyleTabService.onBeforeOpenNewTabByThirdParty(aEvent.target.ownerDocument.defaultView);
-				return this[original].apply(this, [aEvent, aIsPanelClick].concat(aArgs));
+				return owner[original].apply(this, [aEvent, aIsPanelClick].concat(aArgs));
 			};
 		}, this);
 
@@ -282,14 +282,14 @@ var TreeStyleTabWindowHelper = {
 		FeedHandler.__treestyletab__loadFeed = FeedHandler.loadFeed;
 		FeedHandler.loadFeed = function(aHref, aEvent) {
 			TreeStyleTabService.onBeforeViewMedia(aEvent, gBrowser);
-			return this.__treestyletab__loadFeed.call(this, aHref, aEvent);
+			return FeedHandler.__treestyletab__loadFeed.call(this, aHref, aEvent);
 		};
 
 		if ('showNavToolbox' in FullScreen) { // for Firefox 40 or later
 			FullScreen.__treestyletab__showNavToolbox = FullScreen.showNavToolbox;
 			FullScreen.showNavToolbox = function(...aArgs) {
 				var beforeCollapsed = this._isChromeCollapsed;
-				var retVal = this.__treestyletab__showNavToolbox.apply(this, aArgs);
+				var retVal = FullScreen.__treestyletab__showNavToolbox.apply(this, aArgs);
 				if (beforeCollapsed !== this._isChromeCollapsed)
 					gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN);
 				return retVal;
@@ -298,7 +298,7 @@ var TreeStyleTabWindowHelper = {
 			FullScreen.__treestyletab__hideNavToolbox = FullScreen.hideNavToolbox;
 			FullScreen.hideNavToolbox = function(...aArgs) {
 				var beforeCollapsed = this._isChromeCollapsed;
-				var retVal = this.__treestyletab__hideNavToolbox.apply(this, aArgs);
+				var retVal = FullScreen.__treestyletab__hideNavToolbox.apply(this, aArgs);
 				if (beforeCollapsed !== this._isChromeCollapsed)
 					gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN);
 				return retVal;
@@ -308,7 +308,7 @@ var TreeStyleTabWindowHelper = {
 			FullScreen.__treestyletab__mouseoverToggle = FullScreen.mouseoverToggle;
 			FullScreen.mouseoverToggle = function(...aArgs) {
 				var beforeCollapsed = this._isChromeCollapsed;
-				var retVal = this.__treestyletab__mouseoverToggle.apply(this, aArgs);
+				var retVal = FullScreen.__treestyletab__mouseoverToggle.apply(this, aArgs);
 				if (beforeCollapsed !== this._isChromeCollapsed)
 					gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN);
 				return retVal;
@@ -318,26 +318,29 @@ var TreeStyleTabWindowHelper = {
 		FullScreen.__treestyletab__toggle = FullScreen.toggle;
 		FullScreen.toggle = function(...aArgs) {
 			var enterFS = window.fullScreen;
+			var event = aArgs[0];
+			if (event && event.type == 'fullscreen')
+				enterFS = !enterFS;
 			gBrowser.treeStyleTab.onBeforeFullScreenToggle(enterFS);
-			return this.__treestyletab__toggle.apply(this, aArgs);
+			return FullScreen.__treestyletab__toggle.apply(this, aArgs);
 		};
 
 		PrintUtils.__treestyletab__printPreview = PrintUtils.printPreview;
 		PrintUtils.printPreview = function(...aArgs) {
 			TreeStyleTabService.onPrintPreviewEnter();
-			return this.__treestyletab__printPreview.apply(this, aArgs);
+			return PrintUtils.__treestyletab__printPreview.apply(this, aArgs);
 		};
 		PrintUtils.__treestyletab__exitPrintPreview = PrintUtils.exitPrintPreview;
 		PrintUtils.exitPrintPreview = function(...aArgs) {
 			TreeStyleTabService.onPrintPreviewExit();
-			return this.__treestyletab__exitPrintPreview.apply(this, aArgs);
+			return PrintUtils.__treestyletab__exitPrintPreview.apply(this, aArgs);
 		};
 
 		SidebarUI.__treestyletab__show = SidebarUI.show;
 		SidebarUI.show = function(...aArgs) {
 			var opened = this.isOpen;
 			var width = this.browser.boxObject.width;
-			return this.__treestyletab__show.apply(this, aArgs)
+			return SidebarUI.__treestyletab__show.apply(this, aArgs)
 					.then((function(aResult) {
 						if (opened !== this.isOpen ||
 							width !== this.browser.boxObject.width)
@@ -349,7 +352,7 @@ var TreeStyleTabWindowHelper = {
 		SidebarUI.hide = function(...aArgs) {
 			var opened = this.isOpen;
 			var width = this.browser.boxObject.width;
-			var retVal = this.__treestyletab__hide.apply(this, aArgs);
+			var retVal = SidebarUI.__treestyletab__hide.apply(this, aArgs);
 			if (opened !== this.isOpen ||
 				width !== this.browser.boxObject.width)
 				gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);
@@ -390,7 +393,7 @@ var TreeStyleTabWindowHelper = {
 			searchbar.__treestyletab__original_doSearch = searchbar.doSearch;
 			searchbar.doSearch = function(...aArgs) {
 				TreeStyleTabService.onBeforeBrowserSearch(aArgs[0]);
-				var retVal = this.__treestyletab__original_doSearch.apply(this, aArgs);
+				var retVal = searchbar.__treestyletab__original_doSearch.apply(this, aArgs);
 				TreeStyleTabService.stopToOpenChildTab();
 				return retVal;
 			};
@@ -534,9 +537,9 @@ var TreeStyleTabWindowHelper = {
 
 		b.__treestyletab__removeCurrentTab = b.removeCurrentTab;
 		b.removeCurrentTab = function(...aArgs) {
-			if (!this.treeStyleTab.warnAboutClosingTabSubtreeOf(this.selectedTab))
+			if (!b.treeStyleTab.warnAboutClosingTabSubtreeOf(this.selectedTab))
 				return;
-			return this.__treestyletab__removeCurrentTab.apply(this, aArgs);
+			return b.__treestyletab__removeCurrentTab.apply(this, aArgs);
 		};
 	},
  
@@ -550,7 +553,7 @@ var TreeStyleTabWindowHelper = {
 			b.mTabContainer.advanceSelectedTab = function(...aArgs) {
 				if (b.treeStyleTab.handleAdvanceSelectedTab(aArgs[0], aArgs[1]))
 					return;
-				return this.__treestyletab__advanceSelectedTab.apply(this, aArgs);
+				return b.mTabContainer.__treestyletab__advanceSelectedTab.apply(this, aArgs);
 			};
 
 		TreeStyleTabUtils.doPatching(b.mTabContainer._notifyBackgroundTab, 'b.mTabContainer._notifyBackgroundTab', function(aName, aSource) {
@@ -619,7 +622,7 @@ var TreeStyleTabWindowHelper = {
 					let shouldScrollNow = aArgs[1] === false;
 					if (b.treeStyleTab.animationEnabled && !shouldScrollNow)
 						return b.treeStyleTab.scrollToTab(aArgs[0]);
-					this.__treestyletab__ensureElementIsVisible.apply(this, aArgs);
+					scrollbox.__treestyletab__ensureElementIsVisible.apply(this, aArgs);
 				};
 			}
 		}
@@ -638,6 +641,20 @@ var TreeStyleTabWindowHelper = {
 			}, 'treeStyleTab');
 		}
 	
+	},
+ 
+	initTabMethods : function TSTWH_initTabMethods(aTab, aTabBrowser) 
+	{
+		if (aTab.__treestyletab__toggleMuteAudio &&
+			aTab.__treestyletab__toggleMuteAudio.toString() != aTab.toggleMuteAudio.toString())
+			return;
+
+		aTab.__treestyletab__toggleMuteAudio = aTab.toggleMuteAudio;
+		aTab.toggleMuteAudio = function(...aArgs) {
+			if (aTabBrowser.treeStyleTab.handleTabToggleMuteAudio(aTab))
+				return;
+			return aTab.__treestyletab__toggleMuteAudio.apply(this, aArgs);
+		};
 	}
  
 }; 
diff --git a/content/treestyletab/windowHelperHacks.js b/content/treestyletab/windowHelperHacks.js
index ba3e709..af5fbb2 100644
--- a/content/treestyletab/windowHelperHacks.js
+++ b/content/treestyletab/windowHelperHacks.js
@@ -254,11 +254,11 @@ TreeStyleTabWindowHelper.overrideExtensionsPreInit = function TSTWH_overrideExte
 		globDndtb.__treestyletab__setOrder = globDndtb.setOrder;
 		globDndtb.setOrder = function() {
 			reinitTabbar();
-			return this.__treestyletab__setOrder.apply(this, arguments);
+			return globDndtb.__treestyletab__setOrder.apply(this, arguments);
 		};
 		globDndtb.__treestyletab__setTheStuff = globDndtb.setTheStuff;
 		globDndtb.setTheStuff = function() {
-			var result = this.__treestyletab__setTheStuff.apply(this, arguments);
+			var result = globDndtb.__treestyletab__setTheStuff.apply(this, arguments);
 			if (this.dndObserver &&
 				this.dndObserver.onDrop &&
 				!this.dndObserver.__treestyletab__onDrop) {
diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js
index 788b7e0..3c2a2ba 100644
--- a/defaults/preferences/treestyletab.js
+++ b/defaults/preferences/treestyletab.js
@@ -566,6 +566,25 @@ pref("extensions.treestyletab.closeParentBehavior", 3);
  */
 pref("extensions.treestyletab.closeParentBehavior.moveDetachedTabsToBottom", false);
 /**
+ * When closeParentBehavior = 3, you'll see infinity promoting for all children like:
+ *  +[A]
+ *   +[A-1]
+ *    +[A-1-1]
+ *    +[A-1-2]
+ *    +[A-1-3]
+ * (close A-1)=>
+ *  +[A]
+ *   +[A-1-1]
+ *    +[A-1-2]
+ *    +[A-1-3]
+ * (close A-1-1)=>
+ *  +[A]
+ *   +[A-1-2]
+ *    +[A-1-3]
+ * This preference prevents such an annoying behavior. However, you can disable this safeguard if you don't want.
+ */
+pref("extensions.treestyletab.closeParentBehavior.promoteAllChildrenWhenParentIsLastChild", true);
+/**
  * How to treat children of a closed root tab (which has no parent).
  *  3 = Promote the first child tab to the new root.
  *  1 = Detach all children from the tree. Children become new root tabs.
diff --git a/install.rdf b/install.rdf
index 69f92be..c377fc1 100644
--- a/install.rdf
+++ b/install.rdf
@@ -5,7 +5,7 @@
   <RDF:Description RDF:about="urn:mozilla:install-manifest"
                    em:id="treestyletab at piro.sakura.ne.jp"
                    em:name="Tree Style Tab"
-                   em:version="0.16.2015111001"
+                   em:version="0.16.2015122501"
                    em:creator="YUKI "Piro" Hiroshi"
                    em:description="Show tabs like a tree."
                    em:homepageURL="http://piro.sakura.ne.jp/xul/_treestyletab.html.en"
@@ -235,7 +235,7 @@
     <em:targetApplication>
       <RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
                        em:minVersion="38.0"
-                       em:maxVersion="45.0a1" />
+                       em:maxVersion="46.0a1" />
     </em:targetApplication>
   </RDF:Description>
 </RDF:RDF>
diff --git a/locale/cs/treestyletab/treestyletab.dtd b/locale/cs/treestyletab/treestyletab.dtd
index 63ab372..c57e86d 100644
--- a/locale/cs/treestyletab/treestyletab.dtd
+++ b/locale/cs/treestyletab/treestyletab.dtd
@@ -178,7 +178,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey   "S">
 <!ENTITY context.expandAllSubtree.label         "Rozbalit všechny stromy">
 <!ENTITY context.expandAllSubtree.accesskey     "R">
-<!ENTITY context.toggleAutoHide.label           "Schovávat lištu panelů">
+<!ENTITY context.toggleAutoHide.label.hide      "Schovávat lištu panelů">
+<!ENTITY context.toggleAutoHide.label.shrink    "Zmenšit lištu panelů">
 <!ENTITY context.toggleAutoHide.accesskey       "l">
 <!ENTITY context.toggleFixed.label              "Ustálit umístění a šířku/výšku lišty panelů">
 <!ENTITY context.toggleFixed.label.horizontal   "Ustálit umístění a výšku lišty panelů">
diff --git a/locale/da-DK/treestyletab/treestyletab.dtd b/locale/da-DK/treestyletab/treestyletab.dtd
index 1b9834b..29da501 100644
--- a/locale/da-DK/treestyletab/treestyletab.dtd
+++ b/locale/da-DK/treestyletab/treestyletab.dtd
@@ -192,7 +192,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "o">
 <!ENTITY context.expandAllSubtree.label "Udvid alle">
 <!ENTITY context.expandAllSubtree.accesskey "v">
-<!ENTITY context.toggleAutoHide.label "Autoskjul fanebjælke">
+<!ENTITY context.toggleAutoHide.label.hide "Autoskjul fanebjælke">
+<!ENTITY context.toggleAutoHide.label.shrink "Auto shrink tab bar">
 <!ENTITY context.toggleAutoHide.accesskey "t">
 <!ENTITY context.toggleFixed.label "Lås fanebjælkens placering/højde">
 <!ENTITY context.toggleFixed.label.horizontal "Lås fanebjælkens placering/højde">
diff --git a/locale/de-DE/treestyletab/treestyletab.dtd b/locale/de-DE/treestyletab/treestyletab.dtd
index e93436f..226d710 100644
--- a/locale/de-DE/treestyletab/treestyletab.dtd
+++ b/locale/de-DE/treestyletab/treestyletab.dtd
@@ -190,7 +190,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "c">
 <!ENTITY context.expandAllSubtree.label     "Alle Zweige aufklappen">
 <!ENTITY context.expandAllSubtree.accesskey "e">
-<!ENTITY context.toggleAutoHide.label     "Tableiste verstecken">
+<!ENTITY context.toggleAutoHide.label.hide      "Tableiste verstecken">
+<!ENTITY context.toggleAutoHide.label.shrink    "Tableiste verkleinert anzeigen">
 <!ENTITY context.toggleAutoHide.accesskey "h">
 <!ENTITY context.toggleFixed.label            "Feste Position und Größe der Tableiste">
 <!ENTITY context.toggleFixed.label.horizontal "Feste Position und Höhe der Tableiste">
diff --git a/locale/en-US/treestyletab/treestyletab.dtd b/locale/en-US/treestyletab/treestyletab.dtd
index 6a63bc7..a780985 100644
--- a/locale/en-US/treestyletab/treestyletab.dtd
+++ b/locale/en-US/treestyletab/treestyletab.dtd
@@ -178,7 +178,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey   "c">
 <!ENTITY context.expandAllSubtree.label         "Expand All Trees">
 <!ENTITY context.expandAllSubtree.accesskey     "e">
-<!ENTITY context.toggleAutoHide.label           "Auto hide tab bar">
+<!ENTITY context.toggleAutoHide.label.hide      "Auto hide tab bar">
+<!ENTITY context.toggleAutoHide.label.shrink    "Auto shrink tab bar">
 <!ENTITY context.toggleAutoHide.accesskey       "h">
 <!ENTITY context.toggleFixed.label              "Fix position and width/height of tab bar">
 <!ENTITY context.toggleFixed.label.horizontal   "Fix position and height of tab bar">
diff --git a/locale/es-ES/treestyletab/treestyletab.dtd b/locale/es-ES/treestyletab/treestyletab.dtd
index 8519d53..8e3de37 100644
--- a/locale/es-ES/treestyletab/treestyletab.dtd
+++ b/locale/es-ES/treestyletab/treestyletab.dtd
@@ -189,7 +189,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "c">
 <!ENTITY context.expandAllSubtree.label     "Expandir todos los árboles">
 <!ENTITY context.expandAllSubtree.accesskey "e">
-<!ENTITY context.toggleAutoHide.label     "Auto-ocultar la barra de pestañas">
+<!ENTITY context.toggleAutoHide.label.hide     "Auto-ocultar la barra de pestañas">
+<!ENTITY context.toggleAutoHide.label.shrink   "Auto encoger la barra de pestañas">
 <!ENTITY context.toggleAutoHide.accesskey "h">
 <!ENTITY context.toggleFixed.label            "Anclar posición, altura y ancho de la barra de pestañas">
 <!ENTITY context.toggleFixed.label.horizontal "Anclar posición y altura de la barra de pestañas">
diff --git a/locale/fr-FR/treestyletab/treestyletab.dtd b/locale/fr-FR/treestyletab/treestyletab.dtd
index 5d80487..6f7fad5 100644
--- a/locale/fr-FR/treestyletab/treestyletab.dtd
+++ b/locale/fr-FR/treestyletab/treestyletab.dtd
@@ -177,7 +177,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey   "c">
 <!ENTITY context.expandAllSubtree.label         "Déplier toutes les arborescences">
 <!ENTITY context.expandAllSubtree.accesskey     "e">
-<!ENTITY context.toggleAutoHide.label           "Masquage automatique du panneau des onglets">
+<!ENTITY context.toggleAutoHide.label.hide      "Masquage automatique du panneau des onglets">
+<!ENTITY context.toggleAutoHide.label.shrink    "Auto shrink tab bar">
 <!ENTITY context.toggleAutoHide.accesskey       "h">
 <!ENTITY context.toggleFixed.label              "Fixer la position et la largeur/hauteur du panneau des onglets">
 <!ENTITY context.toggleFixed.label.horizontal   "Fixer la position et la hauteur du panneau des onglets">
diff --git a/locale/it-IT/treestyletab/treestyletab.dtd b/locale/it-IT/treestyletab/treestyletab.dtd
index eb4e656..a11fdb7 100644
--- a/locale/it-IT/treestyletab/treestyletab.dtd
+++ b/locale/it-IT/treestyletab/treestyletab.dtd
@@ -187,7 +187,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "o">
 <!ENTITY context.expandAllSubtree.label     "Espandi tutti i sottoalberi">
 <!ENTITY context.expandAllSubtree.accesskey "E">
-<!ENTITY context.toggleAutoHide.label     "Nascondi automaticamente la barra delle schede">
+<!ENTITY context.toggleAutoHide.label.hide   "Nascondi automaticamente la barra delle schede">
+<!ENTITY context.toggleAutoHide.label.shrink "Riduci automaticamente la barra delle schede">
 <!ENTITY context.toggleAutoHide.accesskey "b">
 <!ENTITY context.toggleFixed.label            "Fix position and width/height of tab bar">
 <!ENTITY context.toggleFixed.label.horizontal "Fix position and height of tab bar">
diff --git a/locale/ja/treestyletab/treestyletab.dtd b/locale/ja/treestyletab/treestyletab.dtd
index be13147..45f3534 100644
--- a/locale/ja/treestyletab/treestyletab.dtd
+++ b/locale/ja/treestyletab/treestyletab.dtd
@@ -177,7 +177,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey   "c">
 <!ENTITY context.expandAllSubtree.label         "ツリーをすべて展開する">
 <!ENTITY context.expandAllSubtree.accesskey     "e">
-<!ENTITY context.toggleAutoHide.label           "タブバーを自動的に隠す">
+<!ENTITY context.toggleAutoHide.label.hide      "タブバーを自動的に隠す">
+<!ENTITY context.toggleAutoHide.label.shrink    "タブバーを自動的に縮める">
 <!ENTITY context.toggleAutoHide.accesskey       "h">
 <!ENTITY context.toggleFixed.label              "タブバーの位置と幅/高さを固定">
 <!ENTITY context.toggleFixed.label.horizontal   "タブバーの位置と高さを固定">
diff --git a/locale/pl/treestyletab/treestyletab.dtd b/locale/pl/treestyletab/treestyletab.dtd
index 6bece92..a08be90 100644
--- a/locale/pl/treestyletab/treestyletab.dtd
+++ b/locale/pl/treestyletab/treestyletab.dtd
@@ -182,7 +182,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "T">
 <!ENTITY context.expandAllSubtree.label     "Rozwiń wszystkie drzewa">
 <!ENTITY context.expandAllSubtree.accesskey "Y">
-<!ENTITY context.toggleAutoHide.label     "Ukryj pasek kart">
+<!ENTITY context.toggleAutoHide.label.hide   "Ukryj pasek kart">
+<!ENTITY context.toggleAutoHide.label.shrink "Auto shrink tab bar">
 <!ENTITY context.toggleAutoHide.accesskey "U">
 <!ENTITY context.toggleFixed.label            "Stała pozycja i szerokość/wysokość paska kart">
 <!ENTITY context.toggleFixed.label.horizontal "Stała pozycja i wysokość paska kart">
diff --git a/locale/ru/treestyletab/treestyletab.dtd b/locale/ru/treestyletab/treestyletab.dtd
index 67895fc..6005e15 100755
--- a/locale/ru/treestyletab/treestyletab.dtd
+++ b/locale/ru/treestyletab/treestyletab.dtd
@@ -183,7 +183,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "С">
 <!ENTITY context.expandAllSubtree.label     "Развернуть все деревья">
 <!ENTITY context.expandAllSubtree.accesskey "Р">
-<!ENTITY context.toggleAutoHide.label     "Автоскрытие панели вкладок">
+<!ENTITY context.toggleAutoHide.label.hide   "Автоскрытие панели вкладок">
+<!ENTITY context.toggleAutoHide.label.shrink "Автосжатие панели вкладок">
 <!ENTITY context.toggleAutoHide.accesskey "А">
 <!ENTITY context.toggleFixed.label            "Зафиксировать положение и ширину/высоту панели вкладок">
 <!ENTITY context.toggleFixed.label.horizontal "Зафиксировать положение и высоту панели вкладок">
diff --git a/locale/sv-SE/treestyletab/treestyletab.dtd b/locale/sv-SE/treestyletab/treestyletab.dtd
index bc7ccd7..b153eb2 100644
--- a/locale/sv-SE/treestyletab/treestyletab.dtd
+++ b/locale/sv-SE/treestyletab/treestyletab.dtd
@@ -191,7 +191,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey   "M">
 <!ENTITY context.expandAllSubtree.label         "Expandera alla träd">
 <!ENTITY context.expandAllSubtree.accesskey     "E">
-<!ENTITY context.toggleAutoHide.label           "Dölj flikfältet automatiskt">
+<!ENTITY context.toggleAutoHide.label.hide      "Dölj flikfältet automatiskt">
+<!ENTITY context.toggleAutoHide.label.shrink    "Krymp flikfältet automatiskt">
 <!ENTITY context.toggleAutoHide.accesskey       "D">
 <!ENTITY context.toggleFixed.label              "Lås position och bredd/höjd för flikfältet">
 <!ENTITY context.toggleFixed.label.horizontal   "Lås position och höjd för flikfältet">
diff --git a/locale/zh-CN/treestyletab/treestyletab.dtd b/locale/zh-CN/treestyletab/treestyletab.dtd
index 1b3dd50..527fcdf 100644
--- a/locale/zh-CN/treestyletab/treestyletab.dtd
+++ b/locale/zh-CN/treestyletab/treestyletab.dtd
@@ -190,7 +190,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey   "c">
 <!ENTITY context.expandAllSubtree.label         "展开所有树">
 <!ENTITY context.expandAllSubtree.accesskey     "e">
-<!ENTITY context.toggleAutoHide.label           "自动隐藏标签栏">
+<!ENTITY context.toggleAutoHide.label.hide      "自动隐藏标签栏">
+<!ENTITY context.toggleAutoHide.label.shrink    "自动缩小标签栏">
 <!ENTITY context.toggleAutoHide.accesskey       "h">
 <!ENTITY context.toggleFixed.label              "固定标签栏位置/高/宽度">
 <!ENTITY context.toggleFixed.label.horizontal   "固定标签栏位置/高度">
diff --git a/locale/zh-TW/treestyletab/treestyletab.dtd b/locale/zh-TW/treestyletab/treestyletab.dtd
index 247ed9f..5102cd5 100644
--- a/locale/zh-TW/treestyletab/treestyletab.dtd
+++ b/locale/zh-TW/treestyletab/treestyletab.dtd
@@ -178,7 +178,8 @@
 <!ENTITY context.collapseAllSubtree.accesskey "c">
 <!ENTITY context.expandAllSubtree.label     "展開全部樹目錄">
 <!ENTITY context.expandAllSubtree.accesskey "e">
-<!ENTITY context.toggleAutoHide.label     "自動隱藏分頁工具列">
+<!ENTITY context.toggleAutoHide.label.hide   "自動隱藏分頁工具列">
+<!ENTITY context.toggleAutoHide.label.shrink "自動縮小分頁工具列">
 <!ENTITY context.toggleAutoHide.accesskey "h">
 <!ENTITY context.toggleFixed.label            "固定分頁工具列的位置、寬高">
 <!ENTITY context.toggleFixed.label.horizontal "固定分頁工具列的位置和高度">
diff --git a/modules/autoHide.js b/modules/autoHide.js
index c6eb9e0..782d504 100644
--- a/modules/autoHide.js
+++ b/modules/autoHide.js
@@ -131,6 +131,14 @@ AutoHideBase.prototype = inherit(AutoHideConstants, {
 		return aValue;
 	},
 
+	get shouldShrink()
+	{
+		var toggleKey = 'tabbar.autoHide.mode.toggle';
+		if (this.window.fullScreen)
+			toggleKey += '.fullscreen';
+		return utils.getTreePref(toggleKey) == this.kMODE_SHRINK;
+	},
+
 	get lastNormalMode()
 	{
 		var lastMode = this.treeStyleTab.getWindowValue(this.kMODE + '-normal');
@@ -487,8 +495,8 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
 
 		this.screen.addEventListener('mousemove', this, true);
 		ReferenceCounter.add('screen,mousemove,AHW,true');
-		this.treeStyleTab.tabStripPlaceHolder.addEventListener('mousemove', this, true);
-		ReferenceCounter.add('tabStripPlaceHolder,mousemove,AHW,true');
+		this.treeStyleTab.browser.addEventListener('mousemove', this, true);
+		ReferenceCounter.add('browser,mousemove,AHW,true');
 		this.treeStyleTab.tabStrip.addEventListener('mousemove', this, true);
 		ReferenceCounter.add('tabStrip,mousemove,AHW,true');
 		this.toggler.addEventListener('mousemove', this, true);
@@ -508,8 +516,8 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
 
 		this.screen.removeEventListener('mousemove', this, true);
 		ReferenceCounter.remove('screen,mousemove,AHW,true');
-		this.treeStyleTab.tabStripPlaceHolder.removeEventListener('mousemove', this, true);
-		ReferenceCounter.remove('tabStripPlaceHolder,mousemove,AHW,true');
+		this.treeStyleTab.browser.removeEventListener('mousemove', this, true);
+		ReferenceCounter.remove('browser,mousemove,AHW,true');
 		this.treeStyleTab.tabStrip.removeEventListener('mousemove', this, true);
 		ReferenceCounter.remove('tabStrip,mousemove,AHW,true');
 		this.toggler.removeEventListener('mousemove', this, true);
@@ -810,6 +818,9 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
 			aNode.setAttribute('checked', true);
 		else
 			aNode.removeAttribute('checked');
+
+		var labelAttribute = this.shouldShrink ? 'label-shrink' : 'label-hide' ;
+		aNode.setAttribute('label', aNode.getAttribute(labelAttribute));
 	},
  
 	// show/hide tabbar 
diff --git a/modules/base.js b/modules/base.js
index 778b454..3a4452f 100644
--- a/modules/base.js
+++ b/modules/base.js
@@ -2516,17 +2516,19 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
 		};
 		var originalExpanded = size.expanded;
 		var originalShrunken = size.shrunken;
+		var maxSize = this.browserWindow.gBrowser.boxObject.width * this.MAX_TABBAR_SIZE_RATIO;
 		if (aModifiedTarget.indexOf('shrunken') > -1) {
 			if (size.expanded <= size.shrunken)
-				size.expanded = parseInt(size.shrunken / this.DEFAULT_SHRUNKEN_WIDTH_RATIO)
-			let w = this.browserWindow;
-			if (w && size.expanded > w.gBrowser.boxObject.width) {
-				size.expanded = w.gBrowser.boxObject.width * this.MAX_TABBAR_SIZE_RATIO;
+				size.expanded = parseInt(size.shrunken / this.DEFAULT_SHRUNKEN_WIDTH_RATIO);
+			if (size.expanded > maxSize) {
+				size.expanded = maxSize;
 				if (size.expanded <= size.shrunken)
 					size.shrunken = parseInt(size.expanded * this.DEFAULT_SHRUNKEN_WIDTH_RATIO)
 			}
 		}
 		else {
+			if (size.expanded > maxSize)
+				size.expanded = maxSize;
 			if (size.expanded <= size.shrunken)
 				size.shrunken = parseInt(size.expanded * this.DEFAULT_SHRUNKEN_WIDTH_RATIO);
 		}
diff --git a/modules/browser.js b/modules/browser.js
index afd0948..e6e59e0 100644
--- a/modules/browser.js
+++ b/modules/browser.js
@@ -75,6 +75,11 @@ function wait(aMilliSeconds) {
 	});
 }
 
+function mydump(aString) {
+	if (utils.isDebugging('browser'))
+		dump(aString);
+}
+
 Cu.import('resource://treestyletab-modules/window.js');
  
 function TreeStyleTabBrowser(aWindowService, aTabBrowser) 
@@ -842,6 +847,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		w.addEventListener('SSWindowStateBusy', this, false);
 		ReferenceCounter.add('w,SSWindowStateBusy,TSTBrowser,false');
 
+		b.addEventListener('DOMAudioPlaybackStarted', this, false);
+		ReferenceCounter.add('b,DOMAudioPlaybackStarted,TSTBrowser,false');
+		b.addEventListener('DOMAudioPlaybackStopped', this, false);
+		ReferenceCounter.add('b,DOMAudioPlaybackStopped,TSTBrowser,false');
+
 		b.addEventListener('nsDOMMultipleTabHandlerTabsClosing', this, false);
 		ReferenceCounter.add('b,nsDOMMultipleTabHandlerTabsClosing,TSTBrowser,false');
 
@@ -1068,6 +1078,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 
 		this.initTabAttributes(aTab);
 		this.initTabContents(aTab);
+		this.window.TreeStyleTabWindowHelper.initTabMethods(aTab, this.mTabBrowser);
 
 		if (!aTab.hasAttribute(this.kNEST))
 			aTab.setAttribute(this.kNEST, 0);
@@ -1600,7 +1611,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 				delayedPostProcess(this, b, splitter, toggler);
 				this.updateTabbarOverflow();
 				this.updateAllTabsButton(b);
-				this.updateAllTabsCount();
+				this.updateAllTabsAsParent();
 				delayedPostProcess = null;
 				this.mTabBrowser.style.visibility = '';
 
@@ -1650,6 +1661,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		ReferenceCounter.add('tabContainer,TabShow,TSTBrowser,true');
 		tabContainer.addEventListener('TabHide',        this, true);
 		ReferenceCounter.add('tabContainer,TabHide,TSTBrowser,true');
+		tabContainer.addEventListener('TabAttrModified', this, true);
+		ReferenceCounter.add('tabContainer,TabAttrModified,TSTBrowser,true');
 		tabContainer.addEventListener('SSTabRestoring', this, true);
 		ReferenceCounter.add('tabContainer,SSTabRestoring,TSTBrowser,true');
 		tabContainer.addEventListener('SSTabRestored',  this, true);
@@ -1687,6 +1700,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 	{
 		var d = this.document;
 		var splitter = this.splitter;
+		var grippy;
 
 		// We always have to re-create splitter, because its "collapse"
 		// behavior becomes broken by repositioning of the tab bar.
@@ -1694,6 +1708,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			this._destroyOldSplitter();
 			let oldSplitter = splitter;
 			splitter = oldSplitter.cloneNode(true);
+			grippy = splitter.firstChild;
 			oldSplitter.parentNode.removeChild(oldSplitter);
 		}
 		else {
@@ -1701,8 +1716,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			splitter.setAttribute(this.kTAB_STRIP_ELEMENT, true);
 			splitter.setAttribute('state', 'open');
 			splitter.setAttribute('layer', true); // https://bugzilla.mozilla.org/show_bug.cgi?id=590468
-			let grippy = d.createElement('grippy')
+			grippy = d.createElement('grippy')
 			grippy.setAttribute(this.kTAB_STRIP_ELEMENT, true);
+			splitter.appendChild(grippy);
+		}
+		{
 			// Workaround for bugs:
 			//  * https://github.com/piroor/treestyletab/issues/593
 			//  * https://github.com/piroor/treestyletab/issues/783
@@ -1720,7 +1738,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			// So, we have to turn the actual tab bar visible manually
 			// when the grippy is clicked.
 			let tabContainer = this.mTabBrowser.tabContainer;
-			let grippyOnClick = function() {
+			grippy.grippyOnClick = function() {
 				tabContainer.ownerDocument.defaultView.setTimeout(function() {
 					var visible = grippy.getAttribute('state') != 'collapsed';
 					if (visible != tabContainer.visible)
@@ -1729,7 +1747,6 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			};
 			grippy.addEventListener('click', grippy.grippyOnClick, true);
 			ReferenceCounter.add('grippy,click,grippy.grippyOnClick,true');
-			splitter.appendChild(grippy);
 		}
 
 		var splitterClass = splitter.getAttribute('class') || '';
@@ -1936,7 +1953,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 	{
 		aReason = aReason || this.kTABBAR_UPDATE_BY_UNKNOWN_REASON;
 
-		if (utils.isDebugging('browser')) {
+		{
 			let humanReadableReason =
 				(aReason & this.kTABBAR_UPDATE_BY_RESET ? 'reset ' : '' ) +
 				(aReason & this.kTABBAR_UPDATE_BY_PREF_CHANGE ? 'prefchange ' : '' ) +
@@ -1948,7 +1965,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 				(aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE ? 'autohide ' : '' ) +
 				(aReason & this.kTABBAR_UPDATE_BY_INITIALIZE ? 'initialize ' : '' ) +
 				(aReason & this.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR ? 'toggle-sidebar ' : '' );
-			dump('TSTBrowser_updateFloatingTabbarInternal: ' + humanReadableReason + '\n');
+			mydump('TSTBrowser_updateFloatingTabbarInternal: ' + humanReadableReason + '\n');
 		}
 
 		var d = this.document;
@@ -2081,6 +2098,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			this.notifyingRenderedEvent = false;
 
 			if (!collapsed &&
+				this.autoHide.mode == this.autoHide.kMODE_HIDE &&
 				aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE &&
 				this.browser) // ignore calling after destroyed...
 				this.scrollToTab(this.browser.selectedTab);
@@ -2239,7 +2257,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		}
 	},
  
-	reinitAllTabs : function TSTBrowser_reinitAllTabs(aSouldUpdateCount) 
+	reinitAllTabs : function TSTBrowser_reinitAllTabs(aSouldUpdateAsParent) 
 	{
 		var tabs = this.getAllTabs(this.mTabBrowser);
 		for (let i = 0, maxi = tabs.length; i < maxi; i++)
@@ -2247,8 +2265,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			let tab = tabs[i];
 			this.initTabAttributes(tab);
 			this.initTabContents(tab);
-			if (aSouldUpdateCount)
-				this.updateTabsCount(tab);
+			if (aSouldUpdateAsParent)
+				this.updateTabAsParent(tab, {
+					dontUpdateAncestor : true
+				});
+			this.window.TreeStyleTabWindowHelper.initTabMethods(tab, this.mTabBrowser);
 		}
 	},
   
@@ -2322,6 +2343,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		w.removeEventListener('SSWindowStateBusy', this, false);
 		ReferenceCounter.remove('w,SSWindowStateBusy,TSTBrowser,false');
 
+		b.removeEventListener('DOMAudioPlaybackStarted', this, false);
+		ReferenceCounter.remove('b,DOMAudioPlaybackStarted,TSTBrowser,false');
+		b.removeEventListener('DOMAudioPlaybackStopped', this, false);
+		ReferenceCounter.remove('b,DOMAudioPlaybackStopped,TSTBrowser,false');
+
 		b.removeEventListener('nsDOMMultipleTabHandlerTabsClosing', this, false);
 		ReferenceCounter.remove('b,nsDOMMultipleTabHandlerTabsClosing,TSTBrowser,false');
 
@@ -2388,6 +2414,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		ReferenceCounter.remove('tabContainer,TabShow,TSTBrowser,true');
 		tabContainer.removeEventListener('TabHide',        this, true);
 		ReferenceCounter.remove('tabContainer,TabHide,TSTBrowser,true');
+		tabContainer.removeEventListener('TabAttrModified', this, true);
+		ReferenceCounter.remove('tabContainer,TabAttrModified,TSTBrowser,true');
 		tabContainer.removeEventListener('SSTabRestoring', this, true);
 		ReferenceCounter.remove('tabContainer,SSTabRestoring,TSTBrowser,true');
 		tabContainer.removeEventListener('SSTabRestored',  this, true);
@@ -2766,7 +2794,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 						clearTimeout(this.timers[aPrefName]);
 					this.timers[aPrefName] = setTimeout((function() {
 						try {
-							this.updateAllTabsCount();
+							this.updateAllTabsAsParent();
 						}
 						catch(e) {
 							this.defaultErrorHandler(e);
@@ -2781,7 +2809,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 						clearTimeout(this.timers[aPrefName]);
 					this.timers[aPrefName] = setTimeout((function() {
 						try {
-							this.updateAllTabsCount();
+							this.updateAllTabsAsParent();
 						}
 						catch(e) {
 							this.defaultErrorHandler(e);
@@ -2876,6 +2904,39 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			case 'TabHide':
 				return this.onTabVisibilityChanged(aEvent);
 
+			case 'TabAttrModified':
+				{
+					let tab = aEvent.originalTarget;
+					// on Fireofx 38 the event has no "detail" information.
+					if (!aEvent.detail)
+						return;
+					aEvent.detail.changed.forEach(function(aAttrName) {
+						switch (aAttrName)
+						{
+							case 'soundplaying': // mainly for restored tab
+								if (tab.getAttribute('soundplaying') == 'true')
+									this.setTabValue(tab, this.kREALLY_SOUND_PLAYING, true);
+								else
+									this.deleteTabValue(tab, this.kREALLY_SOUND_PLAYING);
+								this.updateTabAsParent(tab, {
+									dontUpdateCount : true
+								});
+								return;
+
+							case 'muted':
+								if (tab.getAttribute('muted') == 'true')
+									this.setTabValue(tab, this.kREALLY_MUTED, true);
+								else
+									this.deleteTabValue(tab, this.kREALLY_MUTED);
+								this.updateTabAsParent(tab, {
+									dontUpdateCount : true
+								});
+								return;
+						}
+					}, this);
+				}
+				return;
+
 			case 'SSTabRestoring':
 				return this.onTabRestoring(aEvent);
 
@@ -2991,6 +3052,27 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 				return this.needRestoreTree = true;
 
 
+			case 'DOMAudioPlaybackStarted':
+				{
+					let tab = this.getTabFromBrowser(aEvent.originalTarget);
+					this.setTabValue(tab, this.kREALLY_SOUND_PLAYING, true);
+					this.updateTabAsParent(tab, {
+						dontUpdateCount : true
+					});
+				}
+				return;
+
+			case 'DOMAudioPlaybackStopped':
+				{
+					let tab = this.getTabFromBrowser(aEvent.originalTarget);
+					this.deleteTabValue(tab, this.kREALLY_SOUND_PLAYING);
+					this.updateTabAsParent(tab, {
+						dontUpdateCount : true
+					});
+				}
+				return;
+
+
 			case 'nsDOMMultipleTabHandlerTabsClosing':
 				if (!this.onTabsClosing(aEvent))
 					aEvent.preventDefault();
@@ -3077,14 +3159,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		var pareintIndexInTree = hasStructure ? this.treeStructure.shift() : 0 ;
 		var lastRelatedTab = b._lastRelatedTab;
 
-		if (utils.isDebugging('browser')) {
-			dump('TSTBrowser_onTabOpen\n  ' + [
-			  'readiedToAttachNewTab: '+this.readiedToAttachNewTab,
-			  'parentTab: '+this.parentTab + ' (' + this.getTabById(this.parentTab) + ')',
-			  'insertBefore: '+this.insertBefore,
-			  'treeStructure: '+this.treeStructure
-			].join('\n  ') + '\n');
-		}
+		mydump('TSTBrowser_onTabOpen\n  ' + [
+		  'readiedToAttachNewTab: '+this.readiedToAttachNewTab,
+		  'parentTab: '+this.parentTab + ' (' + this.getTabById(this.parentTab) + ')',
+		  'insertBefore: '+this.insertBefore,
+		  'treeStructure: '+this.treeStructure
+		].join('\n  ') + '\n');
 
 		if (this.readiedToAttachNewTab) {
 			if (pareintIndexInTree < 0) { // there is no parent, so this is a new parent!
@@ -3267,8 +3347,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		var closeParentBehavior = this.getCloseParentBehaviorForTab(tab);
 
 		var backupAttributes = this._collectBackupAttributes(tab);
-		if (utils.isDebugging('browser'))
-			dump('onTabClose: backupAttributes = '+JSON.stringify(backupAttributes)+'\n');
+		mydump('onTabClose: backupAttributes = '+JSON.stringify(backupAttributes)+'\n');
 
 		if (closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_CLOSE_ALL_CHILDREN ||
 			this.isSubtreeCollapsed(tab))
@@ -3493,7 +3572,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 	{
 		var tab = aEvent.originalTarget;
 		var b   = this.mTabBrowser;
-		tab.__treestyletab__previousPosition = aEvent.detail;
+
+		var prevPosition = aEvent.detail;
+		tab.__treestyletab__previousPosition = prevPosition;
 
 		// When the tab was moved before TabOpen event is fired, we have to update manually.
 		var newlyOpened = !this.isTabInitialized(tab) && this.onTabOpen(null, tab);
@@ -3503,6 +3584,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		// twisty vanished after the tab is moved!!
 		this.initTabContents(tab);
 
+		this.window.TreeStyleTabWindowHelper.initTabMethods(tab, b);
+
 		// On Firefox 29, 30 and laters, reopened (restored) tab can be
 		// placed in wrong place, because "TabMove" event fires before
 		// "SSTabRestoring" event and "kINSERT_BEFORE" information is
@@ -3519,10 +3602,21 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			this.moveTabSubtreeTo(tab, tab._tPos);
 		}
 
-		this.updateTabsCount(tab, true);
+		this.updateTabAsParent(tab);
 
 		var tabsToBeUpdated = [tab];
 
+		var allTabs = this.getAllTabs(this.mTabBrowser);
+		tabsToBeUpdated.push(allTabs[prevPosition]);
+		if (prevPosition > tab._tPos) { // from bottom to top
+			if (prevPosition < allTabs.length - 1)
+				tabsToBeUpdated.push(allTabs[prevPosition + 1]);
+		}
+		else { // from top to bottom
+			if (prevPosition > 0)
+				tabsToBeUpdated.push(allTabs[prevPosition - 1]);
+		}
+
 		var parentTab = this.getParentTab(tab);
 		if (parentTab) {
 			let children = this.getChildTabs(parentTab);
@@ -3541,7 +3635,14 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 				this.updateChildrenArray(parentTab);
 		}
 
-		tabsToBeUpdated.forEach(this.updateInsertionPositionInfo, this);
+		var updatedTabs = new WeakMap();
+		tabsToBeUpdated.forEach(function(aTab) {
+			if (updatedTabs.has(aTab))
+				return;
+			updatedTabs.set(aTab, true);
+			this.updateInsertionPositionInfo(aTab);
+		}, this);
+		updatedTabs = undefined;
 
 		this.positionPinnedTabsWithDelay();
 
@@ -3583,10 +3684,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			delta = Math.abs(pos - oldPos);
 		}
 
-		if (utils.isDebugging('browser')) {
-			dump('attachTabFromPosition '+aTab._tPos+' / '+aOldPosition+'\n');
-			dump((new Error()).stack.replace(/^/gm, '  ')+'\n');
-		}
+		mydump('attachTabFromPosition '+aTab._tPos+' / '+aOldPosition+'\n');
+		mydump((new Error()).stack.replace(/^/gm, '  ')+'\n');
 
 		var prevTab = this.getPreviousTab(aTab);
 		var nextTab = this.getNextTab(aTab);
@@ -3604,26 +3703,33 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 
 		var newParent;
 
-		if (!prevTab) { // moved to topmost position
+		if (!prevTab) {
+			mydump(' => moved to topmost position\n');
 			newParent = null;
 		}
-		else if (!nextTab) { // moved to last position
+		else if (!nextTab) {
+			mydump(' => movedmoved to last position\n');
 			newParent = (delta > 1) ? prevParent : parent ;
 		}
-		else if (prevParent == nextParent) { // moved into existing tree
+		else if (prevParent == nextParent) {
+			mydump(' => moved into existing tree\n');
 			newParent = prevParent;
 		}
-		else if (prevLevel > nextLevel) { // moved to end of existing tree
-			if (this.mTabBrowser.selectedTab != aTab) { // maybe newly opened tab
+		else if (prevLevel > nextLevel) {
+			mydump(' => moved to end of existing tree\n');
+			if (this.mTabBrowser.selectedTab != aTab) { 
+				mydump('    => maybe newly opened tab\n');
 				newParent = prevParent;
 			}
-			else { // maybe drag and drop
+			else {
+				mydump('    => maybe drag and drop\n');
 				var realDelta = Math.abs(aTab._tPos - aOldPosition);
 				newParent = realDelta < 2 ? prevParent : (parent || nextParent) ;
 			}
 		}
-		else if (prevLevel < nextLevel) { // moved to first child position of existing tree
-			newParent = parent || nextParent;
+		else if (prevLevel < nextLevel) {
+			mydump(' => moved to first child position of existing tree\n');
+			newParent = prevTab || parent || nextParent;
 		}
 
 		if (newParent != parent) {
@@ -3937,8 +4043,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 	handleRestoredTab : function TSTBrowser_handleRestoredTab(aTab) 
 	{
 		if (aTab.__treestyletab__restoreState === undefined) {
-			if (utils.isDebugging('browser'))
-				dump('handleRestoredTab: ' + aTab._tPos + ' is already restored!\n');
+			mydump('handleRestoredTab: ' + aTab._tPos + ' is already restored!\n');
 			return false;
 		}
 
@@ -4166,8 +4271,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		var restoringMultipleTabs = this.windowService.restoringTree;
 		var position = this._prepareInsertionPosition(aTab, aMayBeDuplicated);
 		var parent = position.parent;
-		if (utils.isDebugging('browser'))
-			dump('handleRestoredTab: found parent = ' + parent+'\n');
+		mydump('handleRestoredTab: found parent = ' + parent+'\n');
 		if (parent) {
 			aTab.removeAttribute(this.kPARENT);
 			parent = this.getTabById(parent);
@@ -4213,8 +4317,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		}
 
 		var ancestors = (this.getTabValue(aTab, this.kANCESTORS) || this.getTabValue(aTab, this.kPARENT)).split('|');
-		if (utils.isDebugging('browser'))
-			dump('handleRestoredTab: ancestors = ' + ancestors+'\n');
+		mydump('handleRestoredTab: ancestors = ' + ancestors+'\n');
 		var parent = null;
 		for (let i in ancestors)
 		{
@@ -4236,8 +4339,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		 */
 		if (!parent) {
 			parent = aTab.getAttribute(this.kPARENT);
-			if (utils.isDebugging('browser'))
-				dump('handleRestoredTab: parent = ' + parent+'\n');
+			mydump('handleRestoredTab: parent = ' + parent+'\n');
 			if (parent && !next)
 				next = this.getNextSiblingTab(aTab);
 		}
@@ -4268,6 +4370,19 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			this.mTabBrowser.moveTabTo(aTab, newPos);
 	},
   
+	handleTabToggleMuteAudio : function TSTBrowser_handleTabToggleMuteAudio(aTab) 
+	{
+		if (this.isCollapsed(aTab) || this.isSubtreeCollapsed(aTab)) {
+			let children = this.getChildTabs(aTab);
+			let parentStatus = aTab.getAttribute('muted');
+			children.forEach(function(aChild) {
+				if (aChild.getAttribute('muted') == parentStatus)
+					aChild.toggleMuteAudio();
+			}, this);
+		}
+		return this.getTabValue(aTab, this.kREALLY_SOUND_PLAYING) != 'true';
+	},
+ 
 	correctChildTabsOrderWithDelay : function TSTBrowser_correctChildTabsOrderWithDelay(aTab) 
 	{
 		if (aTab.correctChildTabsOrderWithDelayTimer)
@@ -4492,6 +4607,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
    
 	onTabRestored : function TSTBrowser_onTabRestored(aEvent) 
 	{
+		this.updateTabAsParent(aEvent.originalTarget, {
+			dontUpdateCount : true
+		});
 		delete aEvent.originalTarget.__treestyletab__restoredByUndoCloseTab;
 	},
  
@@ -4977,11 +5095,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		}
 
 		if (isContentResize || isChromeResize) {
-			if (utils.isDebugging('browser')) {
-				dump('TSTBrowser_onResize\n');
-				dump('  isContentResize = '+isContentResize+'\n');
-				dump('  isChromeResize = '+isChromeResize+'\n');
-			}
+			mydump('TSTBrowser_onResize\n');
+			mydump('  isContentResize = '+isContentResize+'\n');
+			mydump('  isChromeResize = '+isChromeResize+'\n');
 			this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
 			this.updateInvertedTabContentsOrder(true);
 			this.mTabBrowser.mTabContainer.adjustTabstrip();
@@ -5143,7 +5259,10 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
   
 	onBeforeFullScreenToggle : function TSTBrowser_onBeforeFullScreenToggle(aEnterFS)
 	{
+		mydump('onBeforeFullScreenToggle / ' + this.position + '\n');
 		if (this.position != 'top') {
+			mydump('  this.document.mozFullScreen => ' + this.document.mozFullScreen + '\n');
+			mydump('  aEnterFS => ' + aEnterFS + '\n');
 			// ignore entering to the DOM-fullscreen (ex. YouTube Player)
 			if (!this.document.mozFullScreen) {
 				if (aEnterFS)
@@ -5384,7 +5503,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		this.setTabValue(aParent, this.kCHILDREN, children.join('|'));
 		this.setTabValue(aChild, this.kPARENT, aParent.getAttribute(this.kID));
 
-		this.updateTabsCount(aParent);
+		this.updateTabAsParent(aParent);
 		if (shouldInheritIndent && !aInfo.dontUpdateIndent)
 			this.inheritTabIndent(aChild, aParent);
 
@@ -5484,7 +5603,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		if (!this.hasChildTabs(parentTab))
 			this.setTabValue(parentTab, this.kSUBTREE_COLLAPSED, true);
 
-		this.updateTabsCount(parentTab);
+		this.updateTabAsParent(parentTab);
 
 		if (!aInfo.dontUpdateIndent) {
 			this.updateTabsIndent([aChild], undefined, aInfo.dontAnimate);
@@ -5621,9 +5740,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 						(!parentTab && closeParentBehavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN) ?
 							closeRootBehavior :
 							closeParentBehavior ;
+		// Promote all children to upper level, if this is the last child of the parent.
+		// This is similar to "taking by representation".
 		if (behavior == this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST_CHILD &&
 			parentTab &&
-			this.getChildTabs(parentTab).length == 1)
+			this.getChildTabs(parentTab).length == 1 &&
+			utils.getTreePref('closeParentBehavior.promoteAllChildrenWhenParentIsLastChild'))
 			behavior = this.kCLOSE_PARENT_BEHAVIOR_PROMOTE_ALL_CHILDREN;
 
 		return behavior;
@@ -5898,32 +6020,69 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 		}
 	},
  
-	updateTabsCount : function TSTBrowser_updateTabsCount(aTab, aDontUpdateAncestor) 
+	updateTabAsParent : function TSTBrowser_updateTabAsParent(aTab, aOptions) 
 	{
-		if (!aTab.parentNode) // do nothing for closed tab!
+		if (!aTab ||
+			!aTab.parentNode) // do nothing for closed tab!
 			 return;
 
+		aOptions = aOptions || {};
+
+		if (!aOptions.dontUpdateCount)
+			this.updateTabsCount(aTab);
+
+		this.updateTabSoundIndicator(aTab);
+
+		if (!aOptions.dontUpdateAncestor) {
+			let parent = this.getParentTab(aTab);
+			if (parent)
+				this.updateTabAsParent(parent, aOptions);
+		}
+	},
+	updateTabsCount : function TSTBrowser_updateTabsCount(aTab) 
+	{
+		var descendants = this.getDescendantTabs(aTab);
 		var count = this.document.getAnonymousElementByAttribute(aTab, 'class', this.kCOUNTER);
 		if (count) {
-			let value = this.getDescendantTabs(aTab).length;
+			let value = descendants.length;
 			if (this.counterRole == this.kCOUNTER_ROLE_ALL_TABS)
 				value += 1;
 			count.setAttribute('value', value);
 		}
-		if (!aDontUpdateAncestor) {
-			let parent = this.getParentTab(aTab);
-			if (parent)
-				this.updateTabsCount(parent);
-		}
+	},
+	updateTabSoundIndicator : function TSTBrowser_updateTabSoundIndicator(aTab)
+	{
+		var children = this.getChildTabs(aTab);
+
+		var hasSoundPlayingChild = children.some(function(aChild) {
+				return aChild.getAttribute('soundplaying') == 'true';
+			}, this);
+		var reallySoundPlaying = this.getTabValue(aTab, this.kREALLY_SOUND_PLAYING) == 'true';
+		if (hasSoundPlayingChild ||
+			reallySoundPlaying)
+			aTab.setAttribute('soundplaying', true);
+		else
+			aTab.removeAttribute('soundplaying');
+
+		var allChildrenMuted = children.length > 0 && children.every(function(aChild) {
+				return aChild.getAttribute('muted') == 'true';
+			}, this);
+		if ((allChildrenMuted && !reallySoundPlaying) ||
+			this.getTabValue(aTab, this.kREALLY_MUTED) == 'true')
+			aTab.setAttribute('muted', true);
+		else
+			aTab.removeAttribute('muted');
 	},
  
-	updateAllTabsCount : function TSTBrowser_updateAllTabsCount() 
+	updateAllTabsAsParent : function TSTBrowser_updateAllTabsAsParent() 
 	{
-		var tabs = this.rootTabs;
+		var tabs = this.getAllTabs(this.mTabBrowser);
 		for (let i = 0, maxi = tabs.length; i < maxi; i++)
 		{
 			let tab = tabs[i];
-			this.updateTabsCount(tab, this);
+			this.updateTabAsParent(tab, {
+				dontUpdateAncestor : true
+			});
 		}
 	},
  
@@ -6880,11 +7039,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			Components.utils.reportError(new Error('There is no property named "_browserEpochs"!!'));
 		}
 
-		if (utils.isDebugging('browser')) {
-			dump('TSTBrowser::restoreTree\n');
-			dump('  level = '+level+'\n');
-			dump('  tabsToRestore = '+tabsToRestore+'\n');
-		}
+		mydump('TSTBrowser::restoreTree\n');
+		mydump('  level = '+level+'\n');
+		mydump('  tabsToRestore = '+tabsToRestore+'\n');
 
 		if (
 			level <= this.kRESTORE_TREE_LEVEL_NONE ||
@@ -6907,8 +7064,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
 			);
 		});
 
-		if (utils.isDebugging('browser'))
-			dump('  restoring member tabs = '+tabs.length+' ('+tabs.map(function(aTab) { return aTab._tPos; })+')\n');
+		mydump('  restoring member tabs = '+tabs.length+' ('+tabs.map(function(aTab) { return aTab._tPos; })+')\n');
 
 		if (tabs.length <= 1)
 			return;
diff --git a/modules/constants.js b/modules/constants.js
index a3578ce..9cc4c25 100644
--- a/modules/constants.js
+++ b/modules/constants.js
@@ -61,6 +61,8 @@ var TreeStyleTabConstants = Object.freeze({
 	kALLOW_COLLAPSE     : 'treestyletab-allow-subtree-collapse',
 	kALLOW_STACK        : 'treestyletab-stack-collapsed-tabs',
 	kREMOVED            : 'treestyletab-removed',
+	kREALLY_SOUND_PLAYING : 'treestyletab-really-sound-playing',
+	kREALLY_MUTED       : 'treestyletab-really-muted',
 
 	kX_OFFSET           : 'treestyletab-x-offset',
 	kY_OFFSET           : 'treestyletab-y-offset',
@@ -204,7 +206,7 @@ var TreeStyleTabConstants = Object.freeze({
 	kCOUNTER_ROLE_ALL_TABS       : 1,
 	kCOUNTER_ROLE_CONTAINED_TABS : 2,
 
-	MAX_TABBAR_SIZE_RATIO        : 0.8,
+	MAX_TABBAR_SIZE_RATIO        : 0.5,
 	DEFAULT_SHRUNKEN_WIDTH_RATIO : 0.67,
 	MIN_TABBAR_WIDTH : 24,
 	MIN_TABBAR_HEIGHT : 24,
diff --git a/modules/window.js b/modules/window.js
index 866a890..d9b15dd 100644
--- a/modules/window.js
+++ b/modules/window.js
@@ -1009,9 +1009,15 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
 		ReferenceCounter.add('currentTarget,mousemove,TSTWindow,false');
 
 		var b = this.getTabBrowserFromChild(aEvent.currentTarget);
-		var box = aEvent.currentTarget.id == 'treestyletab-tabbar-resizer-splitter' ?
-					this.getTabStrip(b) :
-					b.treeStyleTab.tabStripPlaceHolder || b.tabContainer ;
+		var box;
+		if (aEvent.currentTarget.id == 'treestyletab-tabbar-resizer-splitter') {
+			box = this.getTabStrip(b);
+		}
+		else {
+			box = b.treeStyleTab.tabStripPlaceHolder || b.tabContainer;
+		}
+		b.treeStyleTab.tabStripPlaceHolder.setAttribute('maxwidth', b.boxObject.width * this.MAX_TABBAR_SIZE_RATIO);
+
 		this.tabbarResizeStartWidth  = box.boxObject.width;
 		this.tabbarResizeStartHeight = box.boxObject.height;
 		this.tabbarResizeStartX = aEvent.screenX;
@@ -1044,6 +1050,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
 			catch(e) {
 				this.defaultErrorHandler(e);
 			}
+			b.treeStyleTab.tabStripPlaceHolder.removeAttribute('maxwidth');
 		}).bind(this), 0);
 	},
 	onTabbarResizing : function TSTWindow_onTabbarResizing(aEvent)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tree-style-tab.git



More information about the Pkg-mozext-commits mailing list