[Pkg-mozext-commits] [tree-style-tab] 02/05: New upstream version 0.18.2016090601
Ximin Luo
infinity0 at debian.org
Wed Sep 7 12:58:44 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 4cdd146753222cb30aa26332a88e6016d1ea20c4
Author: Ximin Luo <infinity0 at debian.org>
Date: Wed Sep 7 14:50:25 2016 +0200
New upstream version 0.18.2016090601
---
META-INF/manifest.mf | 858 --------------
META-INF/mozilla.rsa | Bin 4189 -> 0 bytes
META-INF/mozilla.sf | 4 -
components/AboutGroup.js | 21 +-
content/treestyletab/content-utils.js | 56 +-
content/treestyletab/res/tabsDragUtils.js | 454 ++++----
content/treestyletab/treestyletab-tmp.css | 1 -
content/treestyletab/treestyletab.css | 151 +--
content/treestyletab/treestyletab.xul | 44 +-
content/treestyletab/windowHelper.js | 505 ++++----
content/treestyletab/windowHelperHacks.js | 1210 ++++----------------
defaults/preferences/treestyletab.js | 38 +-
install.rdf | 19 +-
modules/autoHide.js | 41 +-
modules/base.js | 59 +-
modules/bookmark.js | 4 +-
modules/browser.js | 270 ++++-
modules/constants.js | 3 +-
modules/contentBridge.js | 27 +-
.../AboutGroup.js => modules/getHashString.js | 115 +-
modules/lib/extended-immutable.js | 80 ++
modules/tabbarDNDObserver.js | 53 +-
modules/themeManager.js | 1 +
modules/utils.js | 7 +
modules/window.js | 71 +-
skin/classic/treestyletab/Linux-base.css | 5 +-
skin/classic/treestyletab/Linux-styled.css | 1 -
skin/classic/treestyletab/WINNT-styled.css | 1 -
.../classic/treestyletab/base-colors.css | 114 +-
skin/classic/treestyletab/base.css | 50 +-
skin/classic/treestyletab/config.css | 27 -
skin/classic/treestyletab/group.css | 3 -
skin/classic/treestyletab/metal/aero.css | 1 -
skin/classic/treestyletab/metal/base.css | 7 +-
skin/classic/treestyletab/metal/tab.css | 112 +-
skin/classic/treestyletab/sidebar/aero.css | 1 -
skin/classic/treestyletab/sidebar/sidebar.css | 59 +-
skin/classic/treestyletab/square/Darwin.css | 8 +-
skin/classic/treestyletab/square/Linux.css | 4 +-
skin/classic/treestyletab/square/base.css | 118 +-
skin/classic/treestyletab/square/dropshadow.css | 5 -
skin/classic/treestyletab/square/mixed.css | 30 +-
skin/classic/treestyletab/square/tab-surface.css | 23 +-
skin/classic/treestyletab/square/vertigo.css | 32 +-
skin/classic/treestyletab/tmp.css | 9 +-
skin/classic/treestyletab/twisty/twisty.css | 3 -
skin/classic/treestyletab/ui-base.css | 61 +-
47 files changed, 1742 insertions(+), 3024 deletions(-)
diff --git a/META-INF/manifest.mf b/META-INF/manifest.mf
deleted file mode 100644
index 06ef36e..0000000
--- a/META-INF/manifest.mf
+++ /dev/null
@@ -1,858 +0,0 @@
-Manifest-Version: 1.0
-
-Name: install.rdf
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: NaySELHCthbe7a4P8YrC+w==
-SHA1-Digest: 2TCWsuVyH7uhYsM9VOJY23f7a/w=
-
-Name: chrome.manifest
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: MGoVXpTug24gycfhAQt3yQ==
-SHA1-Digest: 6ajkbSBG0SEgLuGzxZ+ZxXaUhoo=
-
-Name: icon.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: b26p1vuhLB2vYtkJ0EpFZg==
-SHA1-Digest: T9f7i8A7iAz/ElpA361lLRpnbWc=
-
-Name: components/AboutGroup.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: D+AXOvn4yNMXf8GhIKbFrA==
-SHA1-Digest: XLM7zjvCkIi09SoAGOVOZdeQofY=
-
-Name: content/treestyletab/bookmarksOverlay.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: w3yRAETKAdZTGAbBG3Em7Q==
-SHA1-Digest: wihCEtZ16DVkz+waXI6bdMxzAdI=
-
-Name: content/treestyletab/bookmarksOverlay.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: aw8atg7bu14/W1Crfty5/Q==
-SHA1-Digest: W20IiyleTVAkp1ui/2jZZLRJPvU=
-
-Name: content/treestyletab/bookmarksOverlayEditable.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: y+8JAVdPMb4so6IEvtgzTw==
-SHA1-Digest: /V6d117O8c9Qgt7NoCuVRN2bOF0=
-
-Name: content/treestyletab/bookmarksOverlayEditable.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: u6u3KPfJJdx4eWOpykXXAA==
-SHA1-Digest: zh1Sx8pycIsT2yk/kjw3eBA9cTk=
-
-Name: content/treestyletab/bookmarksOverlayEditable.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: xw2+1EFpMj/QoZzNOit9iw==
-SHA1-Digest: DoFHkl8xDTFaUnc9oQcEXOTSg+A=
-
-Name: content/treestyletab/config.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: CQeMI6LnYw01DCeicW8Zaw==
-SHA1-Digest: ougZFbteusnzVn8djm/xTObCf4Y=
-
-Name: content/treestyletab/config.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ie+GjjbEG2WOfpzBiyYkNQ==
-SHA1-Digest: 3/2tCyYn4fv23b/+vXMJik7JcjU=
-
-Name: content/treestyletab/config.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: oWFtj0roEP0prwGgmIbHNQ==
-SHA1-Digest: b9JTBbMbqyEb/TEap1A4V6xMBB8=
-
-Name: content/treestyletab/content-utils-autohide.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 5LerXpT+fFUV2k1YOWLOCw==
-SHA1-Digest: UoiQ5kghSuZB2O1NOtmcO82G6ZY=
-
-Name: content/treestyletab/content-utils.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: u5TSTFqsmy3oW+pn6MvYGQ==
-SHA1-Digest: XPRa16z/xWO9CPGCemcNYgi2Lwk=
-
-Name: content/treestyletab/group.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 36AhehtnHOpGrElzTkAIzQ==
-SHA1-Digest: rrjIlOUkUzJsucg+fWIEE+E87n8=
-
-Name: content/treestyletab/hide-embed.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: sm1uHHT3GIl7tIYUz8oS5A==
-SHA1-Digest: dVIKETt9CnpIKynmf5iCpf1jDNo=
-
-Name: content/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: X5GHdwU0794vTcmyBMKgLA==
-SHA1-Digest: cpaNFJaakJy4ZMTl+Bku6h5c2Nc=
-
-Name: content/treestyletab/multipletabConfigOverlay.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: AI3+5oxDcuSxtrEn0S4kpQ==
-SHA1-Digest: TQBJwrZ+GwwBSHbAvzc4nnoSahw=
-
-Name: content/treestyletab/treestyletab-tmp.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Kyvx7VXMs8hS4lchMJpfFg==
-SHA1-Digest: dUnh9cVls70LC0cO+AzOTyJ+7Bc=
-
-Name: content/treestyletab/treestyletab.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: LGIxXslHKxsy9dCqauTl4A==
-SHA1-Digest: CkfONqIj2tBVFlf27/FtrTvr1m8=
-
-Name: content/treestyletab/treestyletab.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 6E9tmEesiujXo1RfuXj+tw==
-SHA1-Digest: NWhDnh0jSiQ+8Yn2qWWKZl+smqA=
-
-Name: content/treestyletab/treestyletab.xml
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 0AJ4PM4kkHzJ6Skr4X5XwQ==
-SHA1-Digest: yI4r2a9JmBDqDI8qcvvn6R1wG4M=
-
-Name: content/treestyletab/treestyletab.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ZOu6Dnitaf7CLhXoZCoh1A==
-SHA1-Digest: z9Vv2ybo5X1MXss9QxnjlRJ4+BE=
-
-Name: content/treestyletab/windowHelper.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Y+gM+DMgX8n7u7r82qRo8w==
-SHA1-Digest: ymgmZOavDLyDwyEhxQ0rrMsvkws=
-
-Name: content/treestyletab/windowHelperHacks.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: tIusMKnymHkV00GpE4vqNg==
-SHA1-Digest: 7ALqU8yWobS7ys5FjKr+tlBz+VY=
-
-Name: content/treestyletab/res/bookmarkMultipleTabs.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: iebNA+/X3W4H8iz0vn/JyQ==
-SHA1-Digest: SIpJbMdGhMrFhN3F1Bg6yykW/oQ=
-
-Name: content/treestyletab/res/bookmarkMultipleTabs_bookmarkPropertiesOv
- erlay.xul
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: VSEjpaFSb9qEEPRyKtLsvw==
-SHA1-Digest: xoiQiW9Pw0EsgOyv+N2piD/IQd0=
-
-Name: content/treestyletab/res/icon.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: b26p1vuhLB2vYtkJ0EpFZg==
-SHA1-Digest: T9f7i8A7iAz/ElpA361lLRpnbWc=
-
-Name: content/treestyletab/res/style-flat.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: yJ5Ng9fWzjXWr6rkY5XnxQ==
-SHA1-Digest: 21fjzektvczaL6gg46YsCnDRAoA=
-
-Name: content/treestyletab/res/style-metal.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: VLW3m1DnBgCJe/CwhatjKQ==
-SHA1-Digest: bDERNcMn+q9be5Hl5vpsOTv9+TA=
-
-Name: content/treestyletab/res/style-mixed.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: LQ+cJ4ypxMeOtrIeNb4zow==
-SHA1-Digest: fwP0Sh/HTfPlNLk8Yo4tbQurrHo=
-
-Name: content/treestyletab/res/style-plain.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: V0aScxDL7YeEz66bvCcdcw==
-SHA1-Digest: cGJJiw5nOPZqyXyvliHjM6vUXeY=
-
-Name: content/treestyletab/res/style-sidebar.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: izAqXI+MBl9HnnvYFEElqA==
-SHA1-Digest: APWbsVjSUEXhi5VaXKH7Pxcasn4=
-
-Name: content/treestyletab/res/style-vertigo.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: mC/u1MvEZzc5Nh+0nMb7aQ==
-SHA1-Digest: peni4eoolSuDI/XvU/G+i1dxU9k=
-
-Name: content/treestyletab/res/tabEffects.svg
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 2kuE/MgWKXof3NwEtoMSsw==
-SHA1-Digest: WzGw9OlK27u2qgwpylJvL+GMB9k=
-
-Name: content/treestyletab/res/tabsDragUtils.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: W9TDKDIlBGpERagCv9lS9A==
-SHA1-Digest: UDF3Oxyej6oju457n513VqAIt88=
-
-Name: content/treestyletab/res/twisty-modern-b.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ID6G7gfZgFGmzZwpoeCllA==
-SHA1-Digest: MFCsvyhs0G1660rX6nr4BWL3j04=
-
-Name: content/treestyletab/res/twisty-modern-w.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: QnmThqcAkwd6z0QfD0KO+A==
-SHA1-Digest: FkPnIvOMGo/VlOT+KQ3ZqLqi67E=
-
-Name: content/treestyletab/res/twisty-osx.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: fqz2wOoq980SOp/541fdxg==
-SHA1-Digest: ItmS1DcUMeOj+uEjj4c8EIUV664=
-
-Name: content/treestyletab/res/twisty-retro.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: el+RHYOnbah9NusYiqI0wQ==
-SHA1-Digest: q0mYa40sk7KoHzdmK6voR/OuGF8=
-
-Name: defaults/preferences/treestyletab.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: JGRAS3FmoBIMhh7dwiPjMQ==
-SHA1-Digest: H0KFSNZge2z1eeNW68YGDlw0+Vg=
-
-Name: locale/cs/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: zszUhNCZbsuXrvk0MyGtqw==
-SHA1-Digest: AmPIaBSAXJtd03ZD/LGrxu3FN3Y=
-
-Name: locale/cs/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: /mX/xFzRkHcwITPow9LgCg==
-SHA1-Digest: WMnWhoa7Igq6/CETJrTdmoqwkl4=
-
-Name: locale/cs/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: O/AN4Uc0E4AQo1aPJY3juw==
-SHA1-Digest: Hqg1966n8g8nZniPCPyx5/gR0iI=
-
-Name: locale/da-DK/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 9OgEctYlcrncB79Zp3Xsyw==
-SHA1-Digest: vjay7k00E2Dhmo0XsTlEeFTRPXI=
-
-Name: locale/da-DK/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: DF/qlqkW+LPOm+xiDtj1tQ==
-SHA1-Digest: COub0FsdcpxqVbVNC7KiWcB4JX8=
-
-Name: locale/da-DK/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: pJBLR6vZgkgLN7GMzqdiMQ==
-SHA1-Digest: SLwGYJeaFtqLRPDA5u1NjAl7g6s=
-
-Name: locale/de-DE/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Bl+6HAZa3Dp3iHyhd2VYIg==
-SHA1-Digest: JdQfP7XjmROHYlyQEMxiYImBB38=
-
-Name: locale/de-DE/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: WccbaoYXPT5hemDgkG02Zw==
-SHA1-Digest: QJZ9Z7S+QkW7fn9PKyR37RQDhec=
-
-Name: locale/de-DE/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 7IS4Rn+9/iCJoYNSq0MBHw==
-SHA1-Digest: +NBZ9kqAfyhgr7+ZdLZzTHldqtc=
-
-Name: locale/en-US/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: mBjJFiEbKENaR38v2Zi3nw==
-SHA1-Digest: /vNGGzRR58QK5AOQjlorkE5GCAI=
-
-Name: locale/en-US/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ASou9ZtsPEgWVQMF2IRQrA==
-SHA1-Digest: 4cR3aYnrXvcG7hwpf0cA1Q+xfNc=
-
-Name: locale/en-US/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 22ZTEPS58VkA7FaHK0sbmQ==
-SHA1-Digest: qD99rSb8+piKakbtwYwzJeQKirU=
-
-Name: locale/es-ES/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 4J565KU4rP1YW2Z7FwAmVw==
-SHA1-Digest: OeORv30Cbr8ylQKVbM0O9Y5n+4Y=
-
-Name: locale/es-ES/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 1ISa3rQP4wr/vUx/rgXTeA==
-SHA1-Digest: BaaGstEvjiFHlWS3XOPTROUY0BY=
-
-Name: locale/es-ES/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 8UfYIPpAbJ3l84WQNoGRpQ==
-SHA1-Digest: vxjQNy3iV4ZzXklxSwO76SQHYKs=
-
-Name: locale/fr-FR/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: QnFbkycbnW1Gsz2FBnB1yg==
-SHA1-Digest: eSqlFr5OnT5gIpY1PF7f/E3bHas=
-
-Name: locale/fr-FR/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: MmU2dKfXeLH4MAtJ6fi3dg==
-SHA1-Digest: X6nsnz03rOIR03C0Enh2cHkPgGI=
-
-Name: locale/fr-FR/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ++Hzis+f+8VGKcUaMXVgyQ==
-SHA1-Digest: GjhFe1p1otrIRII5bMCDGAI+ATM=
-
-Name: locale/it-IT/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: fzikcfeUYYGLBHSPKxs+ZQ==
-SHA1-Digest: DqBJQrV8f3tss7fKSnCdeXNIxYs=
-
-Name: locale/it-IT/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: R8I9lkof+2i7nzfRcCfSRg==
-SHA1-Digest: yvs8t+u6XPVP1d778dAZL3JB6wE=
-
-Name: locale/it-IT/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: OdSG45fnj9cDRt91Y0DXxw==
-SHA1-Digest: KSVrFtHQQ1VuVt1A6Ic0ebJu6g0=
-
-Name: locale/ja/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: mBjJFiEbKENaR38v2Zi3nw==
-SHA1-Digest: /vNGGzRR58QK5AOQjlorkE5GCAI=
-
-Name: locale/ja/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: jlz78yuKfyWP0RqbsJQoLw==
-SHA1-Digest: lFUmY8dsbbw9c1AaRThB5ykK1PI=
-
-Name: locale/ja/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: NoQ0y4vzhtacC7ljT4o6ww==
-SHA1-Digest: kljqqPXCovLL4rLAiEAoIf+opY0=
-
-Name: locale/pl/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: btlopE6fxtFm6BGl2WqSag==
-SHA1-Digest: JwRGjnhAsrasY46ktL+EtP3fxDI=
-
-Name: locale/pl/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 05JWMIjA1YJEJ8QnOPDMzg==
-SHA1-Digest: 112CqdOybA+tAyb1vWPhBsl5g8o=
-
-Name: locale/pl/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: IddHfedr6on89fmT9uVrTA==
-SHA1-Digest: BkllKyZPkRQY7sZyylWMTbnlbjw=
-
-Name: locale/ru/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: optA3x911mM29m/ilijA9Q==
-SHA1-Digest: Ewz5/CWtInQDfBCQoje+iGZbjEE=
-
-Name: locale/ru/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: aGUwY4SQARaxSP5aW8m5Zg==
-SHA1-Digest: kvaRTT8I2w1ed/qOmNwoiriEmz4=
-
-Name: locale/ru/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: RAEGG8HPs7aimdnGgS13Uw==
-SHA1-Digest: lyzaI1FejimAOBu+Z53hyrbRID4=
-
-Name: locale/sv-SE/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: u/nBCeYTsPmbIi9OLhk6Bg==
-SHA1-Digest: Zfn4AKRpBe4E44Sg1HIuoxFmif0=
-
-Name: locale/sv-SE/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: zfQPbROEGag5+VsSQWE9Mg==
-SHA1-Digest: uYkQNqCRb/RGZhwvqKmFRbDOSU0=
-
-Name: locale/sv-SE/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: GnKOXY1MMqBR34lBPvqR0Q==
-SHA1-Digest: iRgiJTH4pwbFyhe8Ubm/psOWxxk=
-
-Name: locale/zh-CN/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Z5mJDGXEoCOvu6WdrlfiBQ==
-SHA1-Digest: CxdX2iIT5cw2WR+1eMh9AA78n+U=
-
-Name: locale/zh-CN/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 9tCPNHJbg5S+2yxxbT86YA==
-SHA1-Digest: Zp3pDIoHeenUkT6SAlxb1I6GKU0=
-
-Name: locale/zh-CN/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: OsR9IYx3zj4zoqhxiheJZA==
-SHA1-Digest: +Q7c8OOvoKSrgZZdgFzU86QHM24=
-
-Name: locale/zh-TW/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Ub9HxVsPH7UbfT/o6UPmxg==
-SHA1-Digest: XVqJMKhADCM73LtM7OFthNdECYo=
-
-Name: locale/zh-TW/treestyletab/treestyletab.dtd
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ZFU8RjBxpI5mULkjIgGmmg==
-SHA1-Digest: BVst1wseNpdYpEJg1GHaawsRzR4=
-
-Name: locale/zh-TW/treestyletab/treestyletab.properties
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: fgsDbaou5f5LcJpduv6aag==
-SHA1-Digest: IjvrITYIupuo8dctlLwODAQN0BA=
-
-Name: modules/autoHide.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: IElxzm/96AIvGK9K6khhtg==
-SHA1-Digest: Gb65QK2DLT8WMmgJs3KM2knf/U4=
-
-Name: modules/base.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 6qTYpA5oMrM7QHlIkgt9OA==
-SHA1-Digest: uQyIL7M2lD17rjrZ+E1z7Q4J4BA=
-
-Name: modules/bookmark.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: +NLpHc0+GiT0lSzGiJtlNA==
-SHA1-Digest: GYZNPm63Yrhqkide8fT3TyXFJvw=
-
-Name: modules/browser.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: yb9w+tgDQ+lDz0igSMCLcw==
-SHA1-Digest: VLM+wqY+tJa7WClTan5o2XIdUmM=
-
-Name: modules/browserUIShowHideObserver.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: dNk/UnlE0F8L4dJZICP6Nw==
-SHA1-Digest: D84Jbg20wtUqqgG4pWCgF9ZdVaw=
-
-Name: modules/constants.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 9+JmxhAghfdCL/mbs03wNg==
-SHA1-Digest: ttHSHEIzqwObjspg2lj97KXGUL4=
-
-Name: modules/contentBridge.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: AxdjgF9qLoOy1Dwpm94DKQ==
-SHA1-Digest: F+2KHUcbSxqlW4FbdoKCOM9Viyo=
-
-Name: modules/fullscreenObserver.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: TKVwSD0v1bAX/oWKo8OerA==
-SHA1-Digest: cc6D7hos4bGfa5ReVduq0YkLnWI=
-
-Name: modules/fullTooltip.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ppTGtCz9CG54M5gxA+rOBA==
-SHA1-Digest: se+y0uUD8czSwVpmCXA7rjwWqaw=
-
-Name: modules/groupTab.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: voU8KIeESbIMxZfx1u8YHg==
-SHA1-Digest: hAjZ00W7g8wtADEBISmiECSgxZw=
-
-Name: modules/pseudoTreeBuilder.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Kpwp2rL3SgFVDGGHaptA+A==
-SHA1-Digest: QURQEkp5d1zyuGJ3JmfZJCcIuXY=
-
-Name: modules/ReferenceCounter.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: /+GL3pEvh8yXhOLV1KTL0g==
-SHA1-Digest: KwYUQNA0W5ensPrOgCQeR2NRGm4=
-
-Name: modules/tabAttributesObserver.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: GnqU1In8Jw/2jscAyXXGyg==
-SHA1-Digest: a4KpeD2z5f3xYaa//UQGtAA5+j0=
-
-Name: modules/tabbarDNDObserver.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: JskBug8SPq/rqzT9eAb0dg==
-SHA1-Digest: t8WJiQkwmVrwgn82UKL2dPT+Bos=
-
-Name: modules/tabContentsObserver.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Mx8Cw+iPLWSjkNjv10xCXg==
-SHA1-Digest: XZJFvYTu9pPIFV+zY9hH2IJsTKM=
-
-Name: modules/tabpanelDNDObserver.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: viIk0SD+R9Tc1k0cMgf98g==
-SHA1-Digest: NGDF4zuUWe9dhiX73LMiqEKgBnk=
-
-Name: modules/themeManager.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: LKIpjU4H0S4zStz+u9J2FQ==
-SHA1-Digest: QRODHmwaRkX+b/zrhPVckxz7kf4=
-
-Name: modules/utils.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: hnAteWvM5MtSlGxrWWmPEA==
-SHA1-Digest: DkdIy4OgGbmzh108IyuvrpmIQ+c=
-
-Name: modules/window.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: kfZbFoYTPQV1kFxRX+uL1A==
-SHA1-Digest: 7fP4bvssOTzh1XivwjDe+0ue5Ho=
-
-Name: modules/lib/animationManager.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: tCTp1R/fbEHkC/s6LAJ+wQ==
-SHA1-Digest: gOzZIMkc9xO9PfqsTDhP2ViCyVw=
-
-Name: modules/lib/autoScroll.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: wR8RRvyDf3rUzLjBt1bsnA==
-SHA1-Digest: pCuyv9MjP2/vihtyX7wv5Uxk/2o=
-
-Name: modules/lib/confirmWithPopup.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: XffmLkDOfTuIK+48IAM4sw==
-SHA1-Digest: aXUJCn5AlQpCzmZRQ/I3czVSNAk=
-
-Name: modules/lib/extensions.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: KNafZne30SXdzyfoGXca6w==
-SHA1-Digest: 3IbYcqoRV/tpDPKB+iE5Y9iCjCo=
-
-Name: modules/lib/inherit.jsm
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 5KlF2H6R+m4TNbqEUCxnag==
-SHA1-Digest: YS9YH8+s/xXoCob9P2p2s2DUouQ=
-
-Name: modules/lib/namespace.jsm
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: mkAS2xBrt57mK5w9IuAxdg==
-SHA1-Digest: fr/zTLjmtBm4oo58uVCZUBv+PPs=
-
-Name: modules/lib/prefs.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: kPuMGdq2ki9wgzsdDkHyQw==
-SHA1-Digest: j4nk7SjmRPBtfA9anGuvpEhf4eo=
-
-Name: modules/lib/stringBundle.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: hLRUNAIgENilF2Gnw7P7WQ==
-SHA1-Digest: ajJwI8sQcc4YyKl9ih/Fqzfr0+Q=
-
-Name: modules/lib/UninstallationListener.js
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: W6mO+4W/jnW4asgnMpJfGA==
-SHA1-Digest: ILq1s7W1VsjNidfgoGrnlHqnp1M=
-
-Name: modules/lib/visuallyselectedTabs.jsm
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: iwd/kfZCQaJsjIkO/emj/A==
-SHA1-Digest: 8xOI2kAUhlzs7UzFQRh5ibWEhDQ=
-
-Name: skin/classic/treestyletab/base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: k1uSZ/eZnD3dd7dsgBlq2A==
-SHA1-Digest: 52slwwaJwRWyCIa4TWXxoZ2nQBk=
-
-Name: skin/classic/treestyletab/config.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ISwBByAPfmonJOHp/ZiYxw==
-SHA1-Digest: QeZLao3kGNtER/glzLQoSqpzL64=
-
-Name: skin/classic/treestyletab/Darwin-base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 5CgXLAOGtw6IqY0tQH4FFA==
-SHA1-Digest: /IPmBc5AJPyaoOrhreWArekX2N8=
-
-Name: skin/classic/treestyletab/Darwin-styled.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: hao95egtOAfEnBBZbhKIrg==
-SHA1-Digest: cWHEYEPCm9gaVVwa/EgpfOm09N8=
-
-Name: skin/classic/treestyletab/dummy.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: gQUbzCzxvt83giSwqT4odw==
-SHA1-Digest: uoq1oCgLlTqpdDX/iUbLy7J1Wic=
-
-Name: skin/classic/treestyletab-group-aero/group.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: WAaFV+uAyxEllkfp3nUzOg==
-SHA1-Digest: SfUa64w243Tsw5GuN3o8JahyFjI=
-
-Name: skin/classic/treestyletab-group-basic/group.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: fVTjGUTsV86sIh2ideYUNQ==
-SHA1-Digest: DvaxcjAmPsnt7a1LFCcI+kZ8O4U=
-
-Name: skin/classic/treestyletab/group.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: bVtmjasGd9xaoQ+mPfcRhw==
-SHA1-Digest: zEImyqm58rRACL8fw/gEVv1BRVY=
-
-Name: skin/classic/treestyletab/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Tc+NDhBc7EP4cr5OqQGQyQ==
-SHA1-Digest: TLhlpxf44EXADPU56xRsRroxdo4=
-
-Name: skin/classic/treestyletab/Linux-base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: jObYHMsAFuzN/olmy/FK4g==
-SHA1-Digest: IwwSyHMrakvDNVtGXz/itt/OdCQ=
-
-Name: skin/classic/treestyletab/Linux-config.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 4GgEa2Q4LfzLmtkB8N4mGA==
-SHA1-Digest: wpeaGpY/43D1mlvqaTnaC6LQOxk=
-
-Name: skin/classic/treestyletab/Linux-styled.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: zsFVyDG8KmOpsn81LOf0oA==
-SHA1-Digest: qeeZLagzbORE5b8b1TAxnZVS998=
-
-Name: skin/classic/treestyletab/pseudo-tree.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: YpzbGadA5uvjsoP1UfTk1g==
-SHA1-Digest: lRJLbWJTt07wa9FVOvoH+717+po=
-
-Name: skin/classic/treestyletab/tmp.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: G5wUtcKXudEZJ/wSGxmKOw==
-SHA1-Digest: 4P2cq4d8IQDoO1Q8TxiQMbJDvH8=
-
-Name: skin/classic/treestyletab/ui-australis.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: oGWteOCIdGeJh4s1CrodBQ==
-SHA1-Digest: /CcGFdIzQT8ebf8twW9s6P1rRRI=
-
-Name: skin/classic/treestyletab/ui-base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 4J55NfuxfInmG+yrwyWLXg==
-SHA1-Digest: 3R9fRWUS30aMN2OlqohDOhKrTnY=
-
-Name: skin/classic/treestyletab/WINNT-base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: fGHJbWeArBzHuxSsxMgFrA==
-SHA1-Digest: C3bc9mMl9hHyEMFT613jBKtvOqY=
-
-Name: skin/classic/treestyletab/WINNT-styled.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ZpxqhUBoR0T7h7s0EmVSlQ==
-SHA1-Digest: a+t1B8umsGCEeoQW7I3Wc4jajZM=
-
-Name: skin/classic/treestyletab/metal/aero.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: A7jxPPPNUL0FokiUuMG2mA==
-SHA1-Digest: OeNgpLNuSgMsZsZ2yp1YXdy3Fg8=
-
-Name: skin/classic/treestyletab/metal/base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: hb/Q9c7Vloc7nVMHsm6cqw==
-SHA1-Digest: hFjIjft5NtFah+z+7vlfITPWBXU=
-
-Name: skin/classic/treestyletab/metal/Darwin.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: TZb3EA3nszWCtkHD9aWR5g==
-SHA1-Digest: YQCNXwVHDahH9S9SCdLFvm2afGs=
-
-Name: skin/classic/treestyletab/metal/icon-bg.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: dPlzlNuH44lFR2S41hhIXA==
-SHA1-Digest: RVQ5erPZ39JFpyMJy+JVEPHIHiI=
-
-Name: skin/classic/treestyletab/metal/shadow-active-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: mmzCLfQAQMHghi7NL51Slw==
-SHA1-Digest: M7TqKBGWXT9bW34NN+bwM898UJE=
-
-Name: skin/classic/treestyletab/metal/shadow-active-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: mB5tgnES7Pkp/lmdd8zwWg==
-SHA1-Digest: b0DAUbFO0NmlfY25pXRZVWFashs=
-
-Name: skin/classic/treestyletab/metal/shadow-inactive-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: y9CW0XGWsvn9WejkzjMB7g==
-SHA1-Digest: FsXsOA/7DGUor3REbDYVXknJLn4=
-
-Name: skin/classic/treestyletab/metal/shadow-inactive-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 9yag/NWzVKsCaa6jAfraTA==
-SHA1-Digest: TdgxoicqWnwwbzLq+jyiuBGT94M=
-
-Name: skin/classic/treestyletab/metal/tab-active-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: B9BZFX0F6XgN1hNnDekmGA==
-SHA1-Digest: n2B+BGWTc7mPc45JyBlQ5HVhoJY=
-
-Name: skin/classic/treestyletab/metal/tab-active-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: xr50vqrLVqxSy6uXBjqtvw==
-SHA1-Digest: I18/nxs9m5/ctfU0e7Scn7T710s=
-
-Name: skin/classic/treestyletab/metal/tab-active-selected-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: aM+vjSb9B1Hc1dcHzXjPlQ==
-SHA1-Digest: H+w+lhUI3Zdsmuk9YnjkYKtyB6Y=
-
-Name: skin/classic/treestyletab/metal/tab-active-selected-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Pb5PisMUoHyG4c6h40AUrw==
-SHA1-Digest: NuatlkwTAYnuy3aXS0ZUgYXjyvI=
-
-Name: skin/classic/treestyletab/metal/tab-inactive-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 4SYlZnEf3p5i0nUnP/yQaA==
-SHA1-Digest: +JvVEjfOE9REL23ElSe+Pd6y3Sk=
-
-Name: skin/classic/treestyletab/metal/tab-inactive-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: HjcLuFl2y8cHmbVx6AxxEw==
-SHA1-Digest: VAXbrcfJdPh73hhh98Gqd8pZPHo=
-
-Name: skin/classic/treestyletab/metal/tab-inactive-selected-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: hlC7QI1Jppv27pbGUB9h1A==
-SHA1-Digest: QqBxmezksTxjCpQ4U4MJAIGUtlU=
-
-Name: skin/classic/treestyletab/metal/tab-inactive-selected-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: C/y9xKa3tfUwPLvpR8fUng==
-SHA1-Digest: u2GHUKdU+s+jbRmxFO5motzr4+0=
-
-Name: skin/classic/treestyletab/metal/tab.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: YmpFmTxB1zpZsREL4keWCQ==
-SHA1-Digest: Tb21M1BRk39XZlAirlB+8obOGvg=
-
-Name: skin/classic/treestyletab/sidebar/aero.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: F9WScbg2zch223DQcGT04w==
-SHA1-Digest: JyNb0crV7EsAtaK5f5b9ijNxuek=
-
-Name: skin/classic/treestyletab/sidebar/closetab-white.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: ciO9HszpuusTRyytCi0h7w==
-SHA1-Digest: zIIsZqEoP7r2dFivr6FdPbOpx+g=
-
-Name: skin/classic/treestyletab/sidebar/closetab.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: SkYytZq4wqVcKz9SKHSLJA==
-SHA1-Digest: hYhVFQRyWevCLcBSTW1t8dg3cP4=
-
-Name: skin/classic/treestyletab/sidebar/dropmarker.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: G7uqA6OvOUP5hQWk1Dd2Ow==
-SHA1-Digest: 3ySucjnqrJTu7fWRs6EehENF6mk=
-
-Name: skin/classic/treestyletab/sidebar/license.txt
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: v9Eq0lPqaRSdBuATG2+oxg==
-SHA1-Digest: VNJPj9nckqPyRb2Ff3HWiGPQE58=
-
-Name: skin/classic/treestyletab/sidebar/sidebar.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 155JQwwaYZLVIoCw3Aqlag==
-SHA1-Digest: kCvPTvoTlPQFEY25DBBdTktUNVo=
-
-Name: skin/classic/treestyletab/square/base.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 7elXQXx/AV+21AEq+84dAw==
-SHA1-Digest: T7j8PUzg8peCmHWYmY26cyrDi2w=
-
-Name: skin/classic/treestyletab/square/Darwin.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Sz6fUNU3tE04ONiRaWWnXw==
-SHA1-Digest: zdWU4lsMupZEO1jfw+Uf5/Gmvm0=
-
-Name: skin/classic/treestyletab/square/disable-closebox-bg.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 8LDHw5xvv9yXYLDJCd3SnQ==
-SHA1-Digest: Sw5lpRR7NRMFYCOrR5ghaVmIqNU=
-
-Name: skin/classic/treestyletab/square/dropshadow.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: gH7jMyo0F+YXqQNMCllSOQ==
-SHA1-Digest: JFXwAAnJv/wYcL0MHhTGAnjuV3s=
-
-Name: skin/classic/treestyletab/square/Linux.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: PmtWBEeufSTU3Y5sXve0Xw==
-SHA1-Digest: 49zyBhf9aiIHZ49IHBS8MynbynA=
-
-Name: skin/classic/treestyletab/square/mixed.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 8sL566Kb3Z8Jvn2CiXpzzA==
-SHA1-Digest: AJDQbZMRY8rRlZTXcBV7i2E3sik=
-
-Name: skin/classic/treestyletab/square/newtab-shadow.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: /0+n+HVPH0by9VBCgNuHfA==
-SHA1-Digest: n/wGfo7dGvxTCtwJY8PhOE3bng8=
-
-Name: skin/classic/treestyletab/square/tab-bg-highlighted.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: T6mzHM9ZoEIITc8gz6ZQzA==
-SHA1-Digest: GZWz47jaTHZqDeuxhEev+hIa9/s=
-
-Name: skin/classic/treestyletab/square/tab-bg-hover.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 7adFA8ElKdBMgDrKt8kJMQ==
-SHA1-Digest: s/iupPpsNzXxzBpfnp46eIHe6lI=
-
-Name: skin/classic/treestyletab/square/tab-bg-selected-hover.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: MKuAAKJcABsHs40VUjTYIA==
-SHA1-Digest: Nm/r/tn7kT3Djy8JXfcXpVuBUHY=
-
-Name: skin/classic/treestyletab/square/tab-bg.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 4J6xqMjhCK3wSS7F3A9y0w==
-SHA1-Digest: CTg4j0P/755VUethbwqkLbDrXcI=
-
-Name: skin/classic/treestyletab/square/tab-surface.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 09Z32P8AYKbhVLtelLGY8A==
-SHA1-Digest: uJCYdd6cnRl0V0Vt+sFUFWmD4oE=
-
-Name: skin/classic/treestyletab/square/vertigo.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: x5bWTAcM++UPB3EJFA3J3A==
-SHA1-Digest: 08KztOOzgQ0M+D/3ayVlOxnPaw4=
-
-Name: skin/classic/treestyletab/twisty/twisty-modern-b-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: Ye0CPTVUEFYWL+QuYWAxig==
-SHA1-Digest: RdJUOwLPIMtDepUSe2V2rdy8aio=
-
-Name: skin/classic/treestyletab/twisty/twisty-modern-b-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: SwrqMx9DnoCHhCBNRLcW6A==
-SHA1-Digest: rVi62rNVpdlxrMcSNDP7DT2xJEs=
-
-Name: skin/classic/treestyletab/twisty/twisty-modern-w-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: xBvmfLgkFKRbEi213k5OPA==
-SHA1-Digest: aTZeSy4hEWKS0oG3t6MFl6zhzso=
-
-Name: skin/classic/treestyletab/twisty/twisty-modern-w-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: h9jqwqr8/ru4ggQHfesoyQ==
-SHA1-Digest: VaiUeO2f5HpJ8gRSkEBXvoNQL14=
-
-Name: skin/classic/treestyletab/twisty/twisty-osx-l.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: PVWQVxSX840AHjIw1vJIrQ==
-SHA1-Digest: x6xlwSveib8J18nwDFCikmE4zGA=
-
-Name: skin/classic/treestyletab/twisty/twisty-osx-r.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: WtoZwIp1hXyoGoMw7aCd/Q==
-SHA1-Digest: 8pXvMI1cCh1ON69K20rdHOfesMo=
-
-Name: skin/classic/treestyletab/twisty/twisty-retro.png
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: 5jRhJ+QQ0POMUddYnVCTOw==
-SHA1-Digest: eNNNko96Xro/9rJtX8odGQznSq0=
-
-Name: skin/classic/treestyletab/twisty/twisty.css
-Digest-Algorithms: MD5 SHA1
-MD5-Digest: M05iN3cITW6rRBXYi2jr9w==
-SHA1-Digest: c+CreKZYaFzJ2AacK/QEjvipQ5Y=
-
diff --git a/META-INF/mozilla.rsa b/META-INF/mozilla.rsa
deleted file mode 100644
index 5f16bd6..0000000
Binary files a/META-INF/mozilla.rsa and /dev/null differ
diff --git a/META-INF/mozilla.sf b/META-INF/mozilla.sf
deleted file mode 100644
index c8d33f2..0000000
--- a/META-INF/mozilla.sf
+++ /dev/null
@@ -1,4 +0,0 @@
-Signature-Version: 1.0
-MD5-Digest-Manifest: 4FHXGA2ea1h1jce/iZRxrg==
-SHA1-Digest-Manifest: FwyNGjMqQp7Akk7ZBeeaj0BlOjY=
-
diff --git a/components/AboutGroup.js b/components/AboutGroup.js
index cf87bc5..81fab1e 100644
--- a/components/AboutGroup.js
+++ b/components/AboutGroup.js
@@ -14,10 +14,11 @@
* The Original Code is the Tree Style Tab.
*
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2009-2012
+ * Portions created by the Initial Developer are Copyright (C) 2009-2016
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
+ * Ohnuma <https://github.com/lv7777>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -47,7 +48,23 @@ AboutGroup.prototype = {
newChannel : function(aURI)
{
- return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
+ const version = Services.appinfo.platformVersion;
+ const compareResult = Services.vc.compare('48.0b1', version);
+ if (compareResult > 0) {
+ return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
+ }
+ else {
+ return Services.io.newChannel2(
+ 'chrome://treestyletab/content/group.xul',
+ null,
+ null,
+ null,
+ Services.scriptSecurityManager.getSystemPrincipal(),
+ Services.scriptSecurityManager.getSystemPrincipal(),
+ Components.interfaces.nsILoadInfo.SEC_REQUIRE_SAME_ORIGIN_DATA_IS_BLOCKED,
+ Components.interfaces.nsIContentPolicy.TYPE_OTHER
+ );
+ }
},
getURIFlags : function(aURI)
diff --git a/content/treestyletab/content-utils.js b/content/treestyletab/content-utils.js
index 511af1d..1efa6d3 100644
--- a/content/treestyletab/content-utils.js
+++ b/content/treestyletab/content-utils.js
@@ -12,13 +12,18 @@
var Cr = Components.results;
var { TreeStyleTabConstants } = Cu.import('resource://treestyletab-modules/constants.js', {});
+ var { getHashString } = Cu.import('resource://treestyletab-modules/getHashString.js', {});
+ var { XPCOMUtils } = Cu.import('resource://gre/modules/XPCOMUtils.jsm', {});
function free() {
cleanup =
Cc = Ci = Cu = Cr =
TreeStyleTabConstants =
+ getHashString =
+ XPCOMUtils =
messageListener =
handleEvent =
+ progressListener =
mydump =
undefined;
}
@@ -31,6 +36,11 @@
case TreeStyleTabConstants.COMMAND_SHUTDOWN:
global.removeMessageListener(TreeStyleTabConstants.MESSAGE_TYPE, messageListener);
global.removeEventListener('selectionchange', handleEvent, true);
+ global.removeEventListener('DOMContentLoaded', handleEvent, true);
+ global.docShell
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebProgress)
+ .removeProgressListener(progressListener);
free();
return;
}
@@ -46,10 +56,54 @@
return;
global.sendAsyncMessage(TreeStyleTabConstants.MESSAGE_TYPE, {
command : TreeStyleTabConstants.COMMAND_REPORT_SELECTION_CHANGE,
- text : aEvent.target.getSelection().toString()
+ text : getHashString(aEvent.target.getSelection().toString().trim())
});
return;
+
+ case 'DOMContentLoaded':
+ progressListener.onLocationChange();
+ return;
}
}
global.addEventListener('selectionchange', handleEvent, true);
+ global.addEventListener('DOMContentLoaded', handleEvent, true);
+
+ var progressListener = {
+ // nsIPorgressListener
+ onStateChange : function() {},
+ onProgressChange : function() {},
+ onLocationChange : function(aWebProgress, aRequest, aLocation, aFlags) {
+ global.sendAsyncMessage(TreeStyleTabConstants.MESSAGE_TYPE, {
+ command : TreeStyleTabConstants.COMMAND_REPORT_LOCATION_CHANGE,
+ locations : this.collectLocations(global.content).map(function(aURI) {
+ return getHashString(aURI);
+ }, this)
+ });
+ },
+ onStatusChange : function() {},
+ onSecurityChange : function() {},
+
+ // nsISupports
+ QueryInterface : XPCOMUtils.generateQI([
+ Ci.nsIWebPorgressListener,
+ Ci.nsISupportsWeakReference,
+ Ci.nsISupports
+ ]),
+
+ collectLocations : function(aFrame, aLocations) {
+ aLocations = aLocations || {};
+ aLocations[aFrame.location.href] = true;
+ Array.forEach(aFrame.document.getElementsByTagName('base'), function(aBase) {
+ aLocations[aBase.href] = true;
+ }, this);
+ Array.forEach(aFrame.frames, function(aSubFrame) {
+ this.collectLocations(aSubFrame, aLocations);
+ }, this);
+ return Object.keys(aLocations);
+ }
+ };
+ global.docShell
+ .QueryInterface(Ci.nsIInterfaceRequestor)
+ .getInterface(Ci.nsIWebProgress)
+ .addProgressListener(progressListener, Ci.nsIWebProgress.NOTIFY_LOCATION);
})(this);
diff --git a/content/treestyletab/res/tabsDragUtils.js b/content/treestyletab/res/tabsDragUtils.js
index a3ea13d..b785bcd 100644
--- a/content/treestyletab/res/tabsDragUtils.js
+++ b/content/treestyletab/res/tabsDragUtils.js
@@ -1,5 +1,5 @@
/*
- Multiple Tabs Drag and Drop Utilities for Firefox 31 or later
+ Multiple Tabs Drag and Drop Utilities for Firefox 45 or later
Usage:
window['piro.sakura.ne.jp'].tabsDragUtils.initTabBrowser(gBrowser);
@@ -15,7 +15,7 @@
http://github.com/piroor/fxaddonlib-tabs-drag-utils
*/
(function() {
- const currentRevision = 35;
+ const currentRevision = 41;
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
@@ -89,7 +89,7 @@
) {
let original = PlacesControllerDragHelper.onDrop;
PlacesControllerDragHelper.__TabsDragUtils_original__onDrop = original;
- if (PlacesControllerDragHelper.onDrop.isAsyncFunction) { // Firefox 35 or later
+ if (PlacesControllerDragHelper.onDrop.isAsyncFunction) {
PlacesControllerDragHelper.onDrop = Task.async(function(insertionPoint, dt) {
dt = new window["piro.sakura.ne.jp"].tabsDragUtils.DOMDataTransferProxy(dt, insertionPoint);
// for Tree Style Tab (save tree structure to bookmarks)
@@ -106,24 +106,6 @@
});
});
}
- else { // Firefox 34 or older
- eval('PlacesControllerDragHelper.onDrop = '+
- original.toSource().replace(
- // for Firefox 3.5 or later
- /(let|var) doCopy =/,
- '$1 tabsDataTransferProxy = dt = new window["piro.sakura.ne.jp"].tabsDragUtils.DOMDataTransferProxy(dt, insertionPoint); $&'
- ).replace( // for Tree Style Tab (save tree structure to bookmarks)
- /(PlacesUIUtils\.ptm|PlacesUtils\.transactionManager)\.doTransaction\(txn\);/,
- 'if (tabsDataTransferProxy && "_tabs" in tabsDataTransferProxy &&' +
- ' "TreeStyleTabBookmarksService" in window)' +
- ' TreeStyleTabBookmarksService.beginAddBookmarksFromTabs(tabsDataTransferProxy._tabs);' +
- '$&' +
- 'if (tabsDataTransferProxy && "_tabs" in tabsDataTransferProxy &&' +
- ' "TreeStyleTabBookmarksService" in window)' +
- ' TreeStyleTabBookmarksService.endAddBookmarksFromTabs();'
- )
- );
- }
PlacesControllerDragHelper.__TabsDragUtils_updated__onDrop = PlacesControllerDragHelper.onDrop;
}
@@ -159,244 +141,212 @@
{
this.updatedTabDNDObservers.push(aObserver);
- if (typeof aObserver._setEffectAllowedForDataTransfer === 'function') { // Firefox 43 and older
- if (aObserver._setEffectAllowedForDataTransfer.toSource().indexOf('tabsDragUtils') < 0) {
- let original = aObserver._setEffectAllowedForDataTransfer;
- aObserver.__TabsDragUtils_original__setEffectAllowedForDataTransfer = original;
- eval('aObserver._setEffectAllowedForDataTransfer = '+
- original.toSource().replace(
- 'dt.mozItemCount > 1',
- '$& && !window["piro.sakura.ne.jp"].tabsDragUtils.isTabsDragging(arguments[0])'
- )
- );
- aObserver.__TabsDragUtils_updated__setEffectAllowedForDataTransfer = aObserver._setEffectAllowedForDataTransfer;
- }
- }
- else { // Firefox 44 and later
- if (typeof aObserver._getDropEffectForTabDrag === 'function' &&
- aObserver._getDropEffectForTabDrag.toSource().indexOf('tabsDragUtils') < 0) {
- let original = aObserver._getDropEffectForTabDrag;
- aObserver.__TabsDragUtils_original__getDropEffectForTabDrag = original;
- eval('aObserver._getDropEffectForTabDrag = '+
- original.toSource().replace(
- 'dt.mozItemCount > 1',
- '$& && !window["piro.sakura.ne.jp"].tabsDragUtils.isTabsDragging(arguments[0])'
- )
- );
- aObserver.__TabsDragUtils_updated__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag;
- }
+ if (typeof aObserver._getDropEffectForTabDrag === 'function' &&
+ !aObserver.__tabsDragUtils__getDropEffectForTabDrag) {
+ aObserver.__tabsDragUtils_original__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag;
+ aObserver._getDropEffectForTabDrag = function(event) {
+/**
+ * Original:
+ * base version: Nightly 51.0a1
+ * date : 2016-09-04
+ * source : https://dxr.mozilla.org/mozilla-central/rev/1789229965bfc5e7b08dfcf1c054c366abe1267a/browser/base/content/tabbrowser.xml#5545
+ */
+//=====================================================================
+ var dt = event.dataTransfer;
+ // Disallow dropping multiple items
+// if (dt.mozItemCount > 1)
+ if (dt.mozItemCount > 1 && !window['piro.sakura.ne.jp'].tabsDragUtils.isTabsDragging(event))
+ return "none";
+
+ var types = dt.mozTypesAt(0);
+ // tabs are always added as the first type
+ if (types[0] == TAB_DROP_TYPE) {
+ let sourceNode = dt.mozGetDataAt(TAB_DROP_TYPE, 0);
+ if (sourceNode instanceof XULElement &&
+ sourceNode.localName == "tab" &&
+ sourceNode.ownerDocument.defaultView instanceof ChromeWindow &&
+ sourceNode.ownerDocument.documentElement.getAttribute("windowtype") == "navigator:browser" &&
+ sourceNode.ownerDocument.defaultView.gBrowser.tabContainer == sourceNode.parentNode) {
+ // Do not allow transfering a private tab to a non-private window
+ // and vice versa.
+ if (PrivateBrowsingUtils.isWindowPrivate(window) !=
+ PrivateBrowsingUtils.isWindowPrivate(sourceNode.ownerDocument.defaultView))
+ return "none";
+
+ if (window.gMultiProcessBrowser !=
+ sourceNode.ownerDocument.defaultView.gMultiProcessBrowser)
+ return "none";
+
+ return dt.dropEffect == "copy" ? "copy" : "move";
+ }
+ }
+
+ if (browserDragAndDrop.canDropLink(event)) {
+ return "link";
+ }
+ return "none";
+//=====================================================================
+ };
+ aObserver.__TabsDragUtils_updated__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag;
}
if ('_animateTabMove' in aObserver &&
- aObserver._animateTabMove.toSource().indexOf('tabsDragUtils') < 0) {
+ !aObserver.__TabsDragUtils_original__animateTabMove) {
let original = aObserver._animateTabMove;
aObserver.__TabsDragUtils_original__animateTabMove = original;
- eval('aObserver._animateTabMove = '+
- original.toSource().replace( // add a new argument
- ')',
- ', aOptions)'
- ).replace(
- '{',
- '{ var TDUContext = window["piro.sakura.ne.jp"].tabsDragUtils.setupContext(event, aOptions);'
- ).replace( // support vertical tab bar
- /\.screenX/g,
- '[TDUContext.position]'
- ).replace( // support vertical tab bar
- /\.width/g,
- '[TDUContext.size]'
- ).replace( // support vertical tab bar
- /(['"])translateX\(/g,
- '$1$1 + TDUContext.translator + $1('
- ).replace( // support vertical tab bar
- /\.scrollX/g,
- '[TDUContext.scroll]'
- ).replace(
- /(let draggedTab = [^;]+;)/,
- '$1\n' +
- 'draggedTab = TDUContext.draggedTab;\n'
- ).replace(
- 'let screenX = event',
- 'TDUContext.utils.setupDraggedTabs(TDUContext);\n' +
- '$&'
- ).replace(
- 'draggedTab._dragData.animLastScreenX = screenX;',
- '$&\n' +
- 'TDUContext.utils.updateDraggedTabs(TDUContext);'
- ).replace(
- 'let leftTab =',
- 'tabs = TDUContext.utils.collectAnimateTabs(tabs, TDUContext);\n' +
- '$&'
- ).replace(
- 'translateX = Math.max(',
- 'leftBound = TDUContext.utils.updateLeftBound(leftBound, TDUContext);\n' +
- 'rightBound = TDUContext.utils.updateRightBound(rightBound, TDUContext);\n' +
- '$&'
- ).replace(
- 'let tabCenter = ',
- 'TDUContext.tabScreenPosition = tabScreenX;\n' +
- 'TDUContext.translateDelta = translateX;\n' +
- 'TDUContext.utils.updateDraggedTabsTransform(TDUContext);\n' +
- 'tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);\n' +
- '$&'
- ).replace(
- 'if (screenX > tabCenter)',
- '/* $& */ if (screenX > TDUContext.lastTabCenter)'
- ).replace(
- 'newIndex = tabs[mid]._tPos;',
- '$&\n' +
- 'TDUContext.tabCenter = tabCenter;\n' +
- 'TDUContext.dropTargetTabScreenPosition = screenX;\n' +
- 'TDUContext.utils.updateDontMove(boxObject, TDUContext);\n'
- ).replace(
- 'if (newIndex >= oldIndex)',
- 'if (TDUContext.utils.checkDontMove(TDUContext)) return;\n' +
- '$&'
- ).replace(
- 'draggedTab._dragData.animDropIndex = newIndex;',
- 'TDUContext.utils.updateDropIndex(newIndex, TDUContext);\n' +
- '$&'
- ).replace(
- '-tabWidth : tabWidth',
- '/* $& */ -TDUContext.tabsSize : TDUContext.tabsSize'
- ).replace(
- 'tabWidth : -tabWidth',
- '/* $& */ TDUContext.tabsSize : -TDUContext.tabsSize'
- ).replace(
- /(\}\)?)$/,
- 'TDUContext.destroy(); $1'
- )
- );
- aObserver.__TabsDragUtils_updated__animateTabMove = aObserver._animateTabMove;
-
+ aObserver._animateTabMove = function _animateTabMove(event, aOptions) {
/**
- * Full version
- * base version: Firefox 17 beta
- * revision : http://hg.mozilla.org/releases/mozilla-beta/rev/20e73f5b19c3
- * date : 2012-11-29
- * source : http://mxr.mozilla.org/mozilla-central/source/browser/base/content/tabbrowser.xml
+ * Original:
+ * base version: Nightly 51.0a1
+ * date : 2016-09-04
+ * source : https://dxr.mozilla.org/mozilla-central/rev/1789229965bfc5e7b08dfcf1c054c366abe1267a/browser/base/content/tabbrowser.xml#5303
*/
-// // function _animateTabMove(event) {
-// function _animateTabMove(event, aOptions) {
-// var TDUContext = window["piro.sakura.ne.jp"].tabsDragUtils.setupContext(event, aOptions);
-//
-// let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
-// draggedTab = TDUContext.draggedTab;
-//
-// if (this.getAttribute("movingtab") != "true") {
-// this.setAttribute("movingtab", "true");
-// this.selectedItem = draggedTab;
-// }
-//
-// if (!("animLastScreenX" in draggedTab._dragData))
-// draggedTab._dragData.animLastScreenX = draggedTab._dragData[TDUContext.position]/*.screenX*/;
-//
-// TDUContext.utils.setupDraggedTabs(TDUContext);
-// let screenX = event[TDUContext.position]/*.screenX*/;
-// if (screenX == draggedTab._dragData.animLastScreenX)
-// return;
-//
-// let draggingRight = screenX > draggedTab._dragData.animLastScreenX;
-// draggedTab._dragData.animLastScreenX = screenX;
-// TDUContext.utils.updateDraggedTabs(TDUContext);
-//
-// let rtl = (window.getComputedStyle(this).direction == "rtl");
-// let pinned = draggedTab.pinned;
-// let numPinned = this.tabbrowser._numPinnedTabs;
-// let tabs = this.tabbrowser.visibleTabs
-// .slice(pinned ? 0 : numPinned,
-// pinned ? numPinned : undefined);
-// if (rtl)
-// tabs.reverse();
-//
-// let tabWidth = draggedTab.getBoundingClientRect()[TDUContext.size]/*.width*/;
-//
-// // Move the dragged tab based on the mouse position.
-//
-// tabs = TDUContext.utils.collectAnimateTabs(tabs, TDUContext);
-// let leftTab = tabs[0];
-// let rightTab = tabs[tabs.length - 1];
-//
-// let tabScreenX = draggedTab.boxObject[TDUContext.position]/*.screenX*/;
-// let translateX = screenX - draggedTab._dragData[offset]/*.offsetX*/;
-// if (!pinned)
-// translateX += this.mTabstrip.scrollPosition - draggedTab._dragData[TDUContext.scroll]/*.scrollX*/;
-// let leftBound = leftTab.boxObject[TDUContext.position]/*.screenX*/ - tabScreenX;
-// let rightBound = (rightTab.boxObject[TDUContext.position]/*.screenX*/ + rightTab.boxObject[TDUContext.size]/*.width*/) -
-// (tabScreenX + tabWidth);
-// leftBound = TDUContext.utils.updateLeftBound(leftBound, TDUContext);
-// rightBound = TDUContext.utils.updateRightBound(rightBound, TDUContext);
-// translateX = Math.max(translateX, leftBound);
-// translateX = Math.min(translateX, rightBound);
-// // draggedTab.style.transform = "translateX(" + translateX + "px)";
-// draggedTab.style.transform = "" + TDUContext.translator + "(" + translateX + "px)";
-//
-// // Determine what tab we're dragging over.
-// // * Point of reference is the center of the dragged tab. If that
-// // point touches a background tab, the dragged tab would take that
-// // tab's position when dropped.
-// // * We're doing a binary search in order to reduce the amount of
-// // tabs we need to check.
-//
-// TDUContext.tabScreenPosition = tabScreenX;
-// TDUContext.translateDelta = translateX;
-// TDUContext.utils.updateDraggedTabsTransform(TDUContext);
-// tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);
-// let tabCenter = Math.round(tabScreenX + translateX + tabWidth / 2);
-// let newIndex = -1;
-// let oldIndex = "animDropIndex" in draggedTab._dragData ?
-// draggedTab._dragData.animDropIndex : draggedTab._tPos;
-// let low = 0;
-// let high = tabs.length - 1;
-// while (low <= high) {
-// let mid = Math.floor((low + high) / 2);
-// if (tabs[mid] == draggedTab &&
-// ++mid > high)
-// break;
-// let boxObject = tabs[mid].boxObject;
-// let screenX = boxObject[TDUContext.position]/*.screenX*/ + getTabShift(tabs[mid], oldIndex);
-// // if (screenX > tabCenter) {
-// if (screenX > TDUContext.lastTabCenter) {
-// high = mid - 1;
-// } else if (screenX + boxObject.width < tabCenter) {
-// low = mid + 1;
-// } else {
-// newIndex = tabs[mid]._tPos;
-// TDUContext.tabCenter = tabCenter;
-// TDUContext.dropTargetTabScreenPosition = screenX;
-// TDUContext.utils.updateDontMove(boxObject, TDUContext);
-// break;
-// }
-// }
-// if (TDUContext.utils.checkDontMove(TDUContext)) return;
-// if (newIndex >= oldIndex)
-// newIndex++;
-// if (newIndex < 0 || newIndex == oldIndex)
-// return;
-// TDUContext.utils.updateDropIndex(newIndex, TDUContext);
-// draggedTab._dragData.animDropIndex = newIndex;
-//
-// // Shift background tabs to leave a gap where the dragged tab
-// // would currently be dropped.
-//
-// for (let tab of tabs) {
-// if (tab != draggedTab) {
-// let shift = getTabShift(tab, newIndex);
-// tab.style.transform = shift ? "" + translator + "(" + shift + "px)" : "";
-// }
-// }
-//
-// function getTabShift(tab, dropIndex) {
-// if (tab._tPos < draggedTab._tPos && tab._tPos >= dropIndex)
-// // return rtl ? -tabWidth : tabWidth;
-// return rtl ? -TDUContext.tabsSize : TDUContext.tabsSize;
-// if (tab._tPos > draggedTab._tPos && tab._tPos < dropIndex)
-// // return rtl ? tabWidth : -tabWidth;
-// return rtl ? TDUContext.tabsSize : -TDUContext.tabsSize;
-// return 0;
-// }
-// TDUContext.destroy();
-//
-// }
+//=====================================================================
+var TDUContext = window["piro.sakura.ne.jp"].tabsDragUtils.setupContext(event, aOptions);
+ let draggedTab = event.dataTransfer.mozGetDataAt(TAB_DROP_TYPE, 0);
+draggedTab = TDUContext.draggedTab;
+
+ if (this.getAttribute("movingtab") != "true") {
+ this.setAttribute("movingtab", "true");
+ this.selectedItem = draggedTab;
+ }
+
+ if (!("animLastScreenX" in draggedTab._dragData)) {
+// draggedTab._dragData.animLastScreenX = draggedTab._dragData.screenX;
+ draggedTab._dragData.animLastScreenX = draggedTab._dragData[TDUContext.position];
+ }
+
+TDUContext.utils.setupDraggedTabs(TDUContext);
+
+// let screenX = event.screenX;
+ let screenX = event[TDUContext.position];
+ if (screenX == draggedTab._dragData.animLastScreenX)
+ return;
+
+ let draggingRight = screenX > draggedTab._dragData.animLastScreenX;
+ draggedTab._dragData.animLastScreenX = screenX;
+
+TDUContext.utils.updateDraggedTabs(TDUContext);
+
+ let rtl = (window.getComputedStyle(this).direction == "rtl");
+ let pinned = draggedTab.pinned;
+ let numPinned = this.tabbrowser._numPinnedTabs;
+ let tabs = this.tabbrowser.visibleTabs
+ .slice(pinned ? 0 : numPinned,
+ pinned ? numPinned : undefined);
+ if (rtl)
+ tabs.reverse();
+// let tabWidth = draggedTab.getBoundingClientRect().width;
+ let tabWidth = draggedTab.getBoundingClientRect()[TDUContext.size];
+
+ // Move the dragged tab based on the mouse position.
+
+tabs = TDUContext.utils.collectAnimateTabs(tabs, TDUContext);
+
+ let leftTab = tabs[0];
+ let rightTab = tabs[tabs.length - 1];
+// let tabScreenX = draggedTab.boxObject.screenX;
+ let tabScreenX = draggedTab.boxObject[TDUContext.position];
+// let translateX = screenX - draggedTab._dragData.screenX;
+ let translateX = screenX - draggedTab._dragData[TDUContext.position];
+ if (!pinned) {
+// translateX += this.mTabstrip.scrollPosition - draggedTab._dragData.scrollX;
+ translateX += this.mTabstrip.scrollPosition - draggedTab._dragData[TDUContext.scroll];
+ }
+// let leftBound = leftTab.boxObject.screenX - tabScreenX;
+ let leftBound = leftTab.boxObject[TDUContext.position] - tabScreenX;
+// let rightBound = (rightTab.boxObject.screenX + rightTab.boxObject.width) -
+// (tabScreenX + tabWidth);
+ let rightBound = (rightTab.boxObject[TDUContext.position] + rightTab.boxObject[TDUContext.size]) -
+ (tabScreenX + tabWidth);
+
+leftBound = TDUContext.utils.updateLeftBound(leftBound, TDUContext);
+rightBound = TDUContext.utils.updateRightBound(rightBound, TDUContext);
+
+ translateX = Math.max(translateX, leftBound);
+ translateX = Math.min(translateX, rightBound);
+// draggedTab.style.transform = "translateX(" + translateX + "px)";
+ draggedTab.style.transform = TDUContext.translator + "(" + translateX + "px)";
+
+ // Determine what tab we're dragging over.
+ // * Point of reference is the center of the dragged tab. If that
+ // point touches a background tab, the dragged tab would take that
+ // tab's position when dropped.
+ // * We're doing a binary search in order to reduce the amount of
+ // tabs we need to check.
+
+TDUContext.tabScreenPosition = tabScreenX;
+TDUContext.translateDelta = translateX;
+TDUContext.utils.updateDraggedTabsTransform(TDUContext);
+tabs = TDUContext.utils.extractNotDraggedTabs(tabs, TDUContext);
+
+ let tabCenter = tabScreenX + translateX + tabWidth / 2;
+ let newIndex = -1;
+ let oldIndex = "animDropIndex" in draggedTab._dragData ?
+ draggedTab._dragData.animDropIndex : draggedTab._tPos;
+ let low = 0;
+ let high = tabs.length - 1;
+ while (low <= high) {
+ let mid = Math.floor((low + high) / 2);
+ if (tabs[mid] == draggedTab &&
+ ++mid > high)
+ break;
+ let boxObject = tabs[mid].boxObject;
+// let screenX = boxObject.screenX + getTabShift(tabs[mid], oldIndex);
+ let screenX = boxObject[TDUContext.position] + getTabShift(tabs[mid], oldIndex);
+// if (screenX > tabCenter) {
+if (screenX > TDUContext.lastTabCenter) {
+ high = mid - 1;
+// } else if (screenX + boxObject.width < tabCenter) {
+ } else if (screenX + boxObject[TDUContext.size] < tabCenter) {
+ low = mid + 1;
+ } else {
+ newIndex = tabs[mid]._tPos;
+
+TDUContext.tabCenter = tabCenter;
+TDUContext.dropTargetTabScreenPosition = screenX;
+TDUContext.utils.updateDontMove(boxObject, TDUContext);
+
+ break;
+ }
+ }
+
+if (TDUContext.utils.checkDontMove(TDUContext)) return;
+
+ if (newIndex >= oldIndex)
+ newIndex++;
+ if (newIndex < 0 || newIndex == oldIndex)
+ return;
+
+TDUContext.utils.updateDropIndex(newIndex, TDUContext);
+
+ draggedTab._dragData.animDropIndex = newIndex;
+
+ // Shift background tabs to leave a gap where the dragged tab
+ // would currently be dropped.
+
+ for (let tab of tabs) {
+ if (tab != draggedTab) {
+ let shift = getTabShift(tab, newIndex);
+// tab.style.transform = shift ? "translateX(" + shift + "px)" : "";
+ tab.style.transform = shift ? TDUContext.translator + "(" + shift + "px)" : "";
+ }
+ }
+
+ function getTabShift(tab, dropIndex) {
+ if (tab._tPos < draggedTab._tPos && tab._tPos >= dropIndex)
+ return rtl ? -TDUContext.tabsSize : TDUContext.tabsSize;
+// return rtl ? -tabWidth : tabWidth;
+ if (tab._tPos > draggedTab._tPos && tab._tPos < dropIndex)
+ return rtl ? TDUContext.tabsSize : -TDUContext.tabsSize;
+// return rtl ? tabWidth : -tabWidth;
+ return 0;
+ }
+
+TDUContext.destroy();
+//=====================================================================
+ };
+ aObserver.__TabsDragUtils_updated__animateTabMove = aObserver._animateTabMove;
}
},
setupContext : function TDU_initTabBrowser(aEvent, aOptions)
diff --git a/content/treestyletab/treestyletab-tmp.css b/content/treestyletab/treestyletab-tmp.css
index 8f6b96a..3e46a44 100644
--- a/content/treestyletab/treestyletab-tmp.css
+++ b/content/treestyletab/treestyletab-tmp.css
@@ -21,7 +21,6 @@
:root[treestyletab-enable-compatibility-tmp="true"]
tabbrowser[treestyletab-mode="vertical"] tabs[flowing] > * .tabs-frame {
- box-flex: 1 !important;
-moz-box-flex: 1 !important;
}
diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css
index 4c505d6..c27e369 100644
--- a/content/treestyletab/treestyletab.css
+++ b/content/treestyletab/treestyletab.css
@@ -60,7 +60,6 @@
max-width: 20px;
min-width: 20px;
width: 20px;
- box-flex: 0;
-moz-box-flex: 0;
mask: url("res/tabEffects.svg#fadein-mask");
}
@@ -171,7 +170,6 @@ tabbrowser[treestyletab-tabbar-autohide-mode="1"][treestyletab-tabbar-autohide="
#treestyletab-autohide-content-area-screen {
- appearance: none;
-moz-appearance: none;
/**
* Don't make this panel completely transparent, because
@@ -202,9 +200,7 @@ tabbrowser[treestyletab-tabbar-autohide-mode="1"][treestyletab-tabbar-autohide="
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-arrowscrollbox
.scrollbox-innerbox {
- box-flex: 1 !important;
-moz-box-flex: 1 !important;
- box-pack: start !important;
-moz-box-pack: start !important;
}
@@ -218,7 +214,6 @@ toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> toolbaritem,
toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> .treestyletab-toolbar-inner-box > toolbaritem {
- box-flex: 0 !important;
-moz-box-flex: 0 !important;
}
@@ -229,7 +224,6 @@ toolbar.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
/* workaround for https://github.com/piroor/treestyletab/issues/100 */
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] .textbox-input-box {
- box-align: stretch;
-moz-box-align: stretch;
}
@@ -286,7 +280,7 @@ tabs.tabbrowser-tabs[treestyletab-tabbar-position="left"][treestyletab-invert-sc
min-height: 1px !important;
opacity: 0 !important;
/**
- * Sometimes "transitionend" event for "max-width" doesn't fire so ghotst
+ * Sometimes "transitionend" event for "max-width" doesn't fire so ghost
* tabs are left. To do cleanup process forcedly, we have to re-define new
* max-width to fire transitionend event.
*/
@@ -421,10 +415,10 @@ toolbar.treestyletab-tabbar-toolbar-ready:not([nowindowdrag="true"]),
.treestyletab-tabbar-toolbar:not([treestyletab-tabbar-position="top"]),
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="top"]:not([treestyletab-tabbar-fixed="true"]) {
- appearance: none !important;
-moz-appearance: none !important;
line-height: 0 !important; /* to avoid an useless space above the tab bar */
position: fixed !important;
+ -moz-window-dragging: default !important;
}
.treestyletab-tabbar-toolbar:not([treestyletab-tabbar-position="top"])
.tabbrowser-tabs,
@@ -441,131 +435,55 @@ toolbar.treestyletab-tabbar-toolbar-ready:not([nowindowdrag="true"]),
/* animation effects */
+:root {
+ --tst-tab-animation-base: opacity 0.15s ease-out,
+ outline-color 0.5s ease-out,
+ min-height 0.15s ease-out,
+ max-height 0.15s ease-out;
+ --tst-tab-animation-firefox-system: min-width 0.15s ease-out,
+ max-width 0.15s ease-out,
+ transform 0.2s ease-out;
+
+ --tst-tab-animation-vertical: margin-left 0.2s ease-out,
+ margin-right 0.2s ease-out,
+ margin-top 0.15s ease-out,
+ var(--tst-tab-animation-base),
+ var(--tst-tab-animation-firefox-system);
+ --tst-tab-animation-top: margin-left 0.15s ease-out,
+ margin-top 0.2s ease-out,
+ var(--tst-tab-animation-base),
+ var(--tst-tab-animation-firefox-system);
+ --tst-tab-animation-bottom: margin-left 0.15s ease-out,
+ margin-bottom 0.2s ease-out,
+ var(--tst-tab-animation-base),
+ var(--tst-tab-animation-firefox-system);
+}
+
.tabbrowser-tabs[treestyletab-animation-enabled="true"][treestyletab-mode="vertical"]
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
- -moz-transition: margin-left 0.2s ease-out,
- margin-right 0.2s ease-out,
- margin-top 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */;
- transition: margin-left 0.2s ease-out,
- margin-right 0.2s ease-out,
- margin-top 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */;
+ transition: var(--tst-tab-animation-vertical);
}
.tabbrowser-tabs[movingtab][treestyletab-animation-enabled="true"][treestyletab-mode="vertical"]
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
- -moz-transition: margin-left 0.2s ease-out,
- margin-right 0.2s ease-out,
- margin-top 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */,
- transform 0.2s ease-out /* for Firefox itself */;
- transition: margin-left 0.2s ease-out,
- margin-right 0.2s ease-out,
- margin-top 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */,
- transform 0.2s ease-out /* for Firefox itself */;
+ transition: var(--tst-tab-animation-vertical);
}
.tabbrowser-tabs[treestyletab-animation-enabled="true"]:not([treestyletab-mode="vertical"]):not([treestyletab-tab-inverted="true"])
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
- -moz-transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-top 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */;
- transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-top 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */;
+ transition: var(--tst-tab-animation-top);
}
.tabbrowser-tabs[movingtab][treestyletab-animation-enabled="true"]:not([treestyletab-mode="vertical"]):not([treestyletab-tab-inverted="true"])
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
- -moz-transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-top 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */,
- transform 0.2s ease-out /* for Firefox itself */;
- transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-top 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */,
- transform 0.2s ease-out /* for Firefox itself */;
+ transition: var(--tst-tab-animation-top);
}
.tabbrowser-tabs[treestyletab-animation-enabled="true"]:not([treestyletab-mode="vertical"])[treestyletab-tab-inverted="true"]
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
- -moz-transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-bottom 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */;
- transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-bottom 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */;
+ transition: var(--tst-tab-animation-bottom);
}
.tabbrowser-tabs[movingtab][treestyletab-animation-enabled="true"]:not([treestyletab-mode="vertical"])[treestyletab-tab-inverted="true"]
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
- -moz-transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-bottom 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */,
- transform 0.2s ease-out /* for Firefox itself */;
- transition: margin-left 0.15s ease-out,
- opacity 0.15s ease-out,
- outline-color 0.5s ease-out,
- margin-bottom 0.2s ease-out,
- min-height 0.15s ease-out,
- max-height 0.15s ease-out,
- min-width 0.15s ease-out /* for Firefox itself */,
- max-width 0.15s ease-out /* for Firefox itself */,
- transform 0.2s ease-out /* for Firefox itself */;
+ transition: var(--tst-tab-animation-bottom);
}
@@ -670,10 +588,6 @@ window[chromehidden~="toolbar"]
/* full tooltip */
#treestyletab-full-tree-tooltip[popup-shown="true"] {
- -moz-transition: margin-left 0.2s ease-out,
- margin-top 0.2s ease-out,
- max-height 0.2s ease-out,
- max-width 0.2s ease-out;
transition: margin-left 0.2s ease-out,
margin-top 0.2s ease-out,
max-height 0.2s ease-out,
@@ -685,7 +599,6 @@ window[chromehidden~="toolbar"]
}
#treestyletab-full-tree-tooltip[popup-shown="true"] > arrowscrollbox {
- -moz-transition: opacity 0.2s ease-out;
transition: opacity 0.2s ease-out;
opacity: 1;
}
diff --git a/content/treestyletab/treestyletab.xul b/content/treestyletab/treestyletab.xul
index db04de7..26be71a 100644
--- a/content/treestyletab/treestyletab.xul
+++ b/content/treestyletab/treestyletab.xul
@@ -1,8 +1,32 @@
<?xml version="1.0"?>
+<!-- ***** BEGIN LICENSE BLOCK *****
+ - Version: MPL 1.1
+ -
+ - The contents of this file are subject to the Mozilla Public License Version
+ - 1.1 (the "License"); you may not use this file except in compliance with
+ - the License. You may obtain a copy of the License at
+ - http://www.mozilla.org/MPL/
+ -
+ - Software distributed under the License is distributed on an "AS IS" basis,
+ - WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ - for the specific language governing rights and limitations under the
+ - License.
+ -
+ - The Original Code is the Tree Style Tab.
+ -
+ - The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
+ - Portions created by the Initial Developer are Copyright (C) 2007-2016
+ - the Initial Developer. All Rights Reserved.
+ -
+ - Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
+ - lv7777 (https://github.com/lv7777)
+ -
+ - ***** END LICENSE BLOCK ***** -->
<?xml-stylesheet href="treestyletab.css" type="text/css"?>
<?xml-stylesheet href="treestyletab-tmp.css" type="text/css"?><!-- hacks for Tab Mix Plus -->
+<?xml-stylesheet href="chrome://treestyletab/skin/base-colors.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/base.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/twisty/twisty.css" type="text/css"?>
<?xml-stylesheet href="chrome://treestyletab/skin/ui.css" type="text/css"?>
@@ -43,13 +67,13 @@
label="&selection.removeTabSubtree.label;"
accesskey="&selection.removeTabSubtree.accesskey;"
oncommand="TreeStyleTabService.removeTabSubtree(MultipleTabService.getSelectedTabs());"
- multipletab-available="selectedTabs.length"/>
+ multipletab-available="any-selected"/>
<menuitem id="multipletab-selection-item-createSubtree"
insertafter="multipletab-selection-splitWindow"
label="&selection.createSubtree.label;"
accesskey="&selection.createSubtree.accesskey;"
oncommand="TreeStyleTabService.createSubtree(MultipleTabService.getSelectedTabs());"
- multipletab-enabled="TreeStyleTabService.canCreateSubtree(selectedTabs)"/>
+ multipletab-enabled="can-create-subtree"/>
</menupopup>
<popupset id="mainPopupSet">
@@ -64,7 +88,7 @@
event.stopPropagation();
this.parentNode.hidePopup();
}"
- multipletab-insertafter="tabContextMenu.querySelector("*[id^='context_reloadTab']")"/>
+ multipletab-insertafter="descendant::*[starts-with(@id, 'context_reloadTab')]"/>
<menuitem id="context-item-reloadDescendantTabs"
label="&context.reloadDescendantTabs.label;"
accesskey="&context.reloadDescendantTabs.accesskey;"
@@ -74,7 +98,7 @@
event.stopPropagation();
this.parentNode.hidePopup();
}"
- multipletab-insertafter="tabContextMenu.querySelector("*[id^='context-item-reloadTabSubtree']")"/>
+ multipletab-insertafter="descendant::*[starts-with(@id, 'context-item-reloadTabSubtree']"/>
<menuitem id="context-item-removeTabSubtree"
label="&context.removeTabSubtree.label;"
@@ -85,9 +109,7 @@
event.stopPropagation();
this.parentNode.hidePopup();
}"
- multipletab-insertbefore="TreeStyleTabUtils.evaluateXPath(
- "(descendant::*[starts-with(@id, 'multipletab-context-removeAll') | starts-with(@id, 'context_closeTab')][1] | child::xul:menuitem[last()])/preceding-sibling::xul:menuseparator[1]"
- , tabContextMenu, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue"/>
+ multipletab-insertbefore="descendant::*[starts-with(@id, 'multipletab-context-removeAll') | starts-with(@id, 'context_closeTab')][1] | child::xul:menuitem[last()])/preceding-sibling::xul:menuseparator[1]"/>
<menuitem id="context-item-removeDescendantTabs"
label="&context.removeDescendantTabs.label;"
accesskey="&context.removeDescendantTabs.accesskey;"
@@ -97,20 +119,18 @@
event.stopPropagation();
this.parentNode.hidePopup();
}"
- multipletab-insertafter="tabContextMenu.querySelector("*[id^='context-item-removeTabSubtree']")"/>
+ multipletab-insertafter="descendant::*[starts-with(@id, 'context-item-removeTabSubtree']"/>
<menuitem id="context-item-removeAllTabsButThisTree"
label="&context.removeAllTabsBut.label;"
accesskey="&context.removeAllTabsBut.accesskey;"
oncommand="TreeStyleTabService.removeAllTabsBut(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);"
- multipletab-insertafter="tabContextMenu.querySelector("*[id^='context_closeOtherTabs']")"/>
+ multipletab-insertafter="descendant::*[starts-with(@id, 'context_closeOtherTabs']"/>
<menuitem id="context-item-bookmarkTabSubtree"
label="&context.bookmarkTabSubtree.label;"
accesskey="&context.bookmarkTabSubtree.accesskey;"
oncommand="TreeStyleTabBookmarksService.bookmarkTabSubtree(TreeStyleTabService.getTabBrowserFromChild(this).mContextTab);"
- multipletab-insertafter="TreeStyleTabUtils.evaluateXPath(
- "descendant::*[starts-with(@id, 'context_bookmarkTab')][1] | descendant::*[@command='Browser:BookmarkAllTabs']/preceding-sibling[1]"
- , tabContextMenu, XPathResult.FIRST_ORDERED_NODE_TYPE).singleNodeValue"/>
+ multipletab-insertafter="descendant::*[starts-with(@id, 'context_bookmarkTab')][1] | descendant::*[@command='Browser:BookmarkAllTabs']/preceding-sibling[1]"/>
<!-- simply appended items -->
diff --git a/content/treestyletab/windowHelper.js b/content/treestyletab/windowHelper.js
index 7a4f978..7b4a943 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(...aArgs) {
TreeStyleTabWindowHelper.runningDelayedStartup = true;
- var retVal = gBrowserInit.__treestyletab___delayedStartup.apply(this, aArgs);
+ var retVal = gBrowserInit.__treestyletab___delayedStartup.call(this, ...aArgs);
TreeStyleTabWindowHelper.runningDelayedStartup = false;
return retVal;
};
@@ -43,24 +43,27 @@ var TreeStyleTabWindowHelper = {
};
if ('TabsInTitlebar' in window) {
- TreeStyleTabUtils.doPatching(TabsInTitlebar._update, 'TabsInTitlebar._update', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- /let fullTabsHeight = /,
- '$& gBrowser.treeStyleTab.position != "top" ? 0 : '
- ));
- }, 'treeStyleTab');
+ TabsInTitlebar.__treestyletab__update = TabsInTitlebar._update;
+ TabsInTitlebar._update = function(...aArgs) {
+ // See: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/browser-tabsintitlebar.js#104
+ let result = this.__treestyletab__update(...aArgs);
+ if (gBrowser.treeStyleTab.position != 'top')
+ document.getElementById('titlebar').style.marginBottom =
+ document.getElementById('titlebar-content').style.marginBottom = '';
+ return result;
+ };
}
window.__treestyletab__BrowserOpenTab = window.BrowserOpenTab;
window.BrowserOpenTab = function(...aArgs) {
gBrowser.treeStyleTab.onBeforeNewTabCommand();
- return window.__treestyletab__BrowserOpenTab.apply(this, aArgs);
+ return window.__treestyletab__BrowserOpenTab.call(this, ...aArgs);
};
window.__treestyletab__undoCloseTab = window.undoCloseTab;
window.undoCloseTab = function(...aArgs) {
gBrowser.__treestyletab__doingUndoCloseTab = true;
- var tab = window.__treestyletab__undoCloseTab.apply(this, aArgs);
+ var tab = window.__treestyletab__undoCloseTab.call(this, ...aArgs);
if (tab)
tab.__treestyletab__restoredByUndoCloseTab = true;
setTimeout(function() {
@@ -77,7 +80,7 @@ var TreeStyleTabWindowHelper = {
});
try {
TreeStyleTabService.onBeforeOpenLinkWithTab(gBrowser.selectedTab, aParams);
- return window.__treestyletab__openLinkIn.apply(this, [aUrl, aWhere, aParams].concat(aArgs));
+ return window.__treestyletab__openLinkIn.call(this, aUrl, aWhere, aParams, ...aArgs);
}
finally {
delete window.__treestyletab__openLinkIn_extraParams;
@@ -91,7 +94,7 @@ var TreeStyleTabWindowHelper = {
linkNode : aLinkNode
};
try {
- return window.__treestyletab__handleLinkClick.apply(this, [aEvent, aHref, aLinkNode].concat(aArgs));
+ return window.__treestyletab__handleLinkClick.call(this, aEvent, aHref, aLinkNode, ...aArgs);
}
finally {
delete window.__treestyletab__openLinkIn_extraParams;
@@ -99,6 +102,18 @@ var TreeStyleTabWindowHelper = {
};
this.overrideExtensionsPreInit(); // windowHelperHacks.js
+
+
+ if ('MultipleTabService' in window &&
+ Array.isArray(MultipleTabService.showHideMenuItemsConditionsProviders)) {
+ MultipleTabService.showHideMenuItemsConditionsProviders.push(
+ function treeProvider(aContextTabs) {
+ return {
+ 'can-create-subtree' : TreeStyleTabService.canCreateSubtree(aContextTabs)
+ };
+ }
+ );
+ }
},
onBeforeBrowserInit : function TSTWH_onBeforeBrowserInit()
@@ -106,17 +121,12 @@ var TreeStyleTabWindowHelper = {
this.overrideExtensionsBeforeBrowserInit(); // windowHelperHacks.js
this.overrideGlobalFunctions();
- // Replacing of gBrowserInit._delayedStartup() with eval()
- // breaks the variable scope of the function and break its
- // functionality completely.
- // Instead, I change the behavior of the method only at the
- // startup process.
gBrowser.__treestyletab__swapBrowsersAndCloseOther = gBrowser.swapBrowsersAndCloseOther;
gBrowser.swapBrowsersAndCloseOther = function(aOurTab, aRemoteTab, ...aArgs) {
if (TreeStyleTabWindowHelper.runningDelayedStartup &&
TreeStyleTabService.tearOffSubtreeFromRemote(aRemoteTab))
return;
- return gBrowser.__treestyletab__swapBrowsersAndCloseOther.apply(this, [aOurTab, aRemoteTab].concat(aArgs));
+ return gBrowser.__treestyletab__swapBrowsersAndCloseOther(aOurTab, aRemoteTab, ...aArgs);
};
},
@@ -136,40 +146,17 @@ var TreeStyleTabWindowHelper = {
)
aObserver = aObserver.tabContainer;
- if (typeof aObserver._setEffectAllowedForDataTransfer === 'function') { // Firefox 43 and older
- TreeStyleTabUtils.doPatching(aObserver._setEffectAllowedForDataTransfer, aObserver+'._setEffectAllowedForDataTransfer', function(aName, aSource) {
- return eval('aObserver._setEffectAllowedForDataTransfer = '+aSource.replace(
- '{',
- '{ var TSTTabBrowser = this instanceof Element ? (this.tabbrowser || this) : gBrowser ; var TST = TSTTabBrowser.treeStyleTab;'
- ).replace(
- /\.screenX/g, '[TST.screenPositionProp]'
- ).replace(
- /\.width/g, '[TST.sizeProp]'
- ).replace(
- /(return (?:true|dt.effectAllowed = "copyMove");)/,
- 'if (!TST.tabbarDNDObserver.canDropTab(arguments[0])) {\n' +
- ' return dt.effectAllowed = "none";\n' +
- '}\n' +
- '$1'
- ).replace(
- 'sourceNode.parentNode == this &&',
- '$& TST.getTabFromEvent(event) == sourceNode &&'
- ));
- }, 'TST');
- }
- else { // Firefox 44 and later
- aObserver.__treestyletab__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag;
- aObserver._getDropEffectForTabDrag = function(...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
- if (!TST.tabbarDNDObserver.canDropTab(aArgs[0]))
- effects = 'none';
- }
- return effects;
- };
- }
+ aObserver.__treestyletab__getDropEffectForTabDrag = aObserver._getDropEffectForTabDrag;
+ aObserver._getDropEffectForTabDrag = function(aEvent, ...aArgs) {
+ var effects = aObserver.__treestyletab__getDropEffectForTabDrag(aEvent, ...aArgs);
+ if (effects === 'copy' || effects === 'move') {
+ let TSTTabBrowser = this instanceof Element ? (this.tabbrowser || this) : gBrowser ;
+ var TST = TSTTabBrowser.treeStyleTab
+ if (!TST.tabbarDNDObserver.canDropTab(aEvent))
+ effects = 'none';
+ }
+ return effects;
+ };
},
overrideGlobalFunctions : function TSTWH_overrideGlobalFunctions()
@@ -178,25 +165,25 @@ var TreeStyleTabWindowHelper = {
nsContextMenu.prototype.__treestyletab__openLinkInTab = nsContextMenu.prototype.openLinkInTab;
nsContextMenu.prototype.openLinkInTab = function(...aArgs) {
- TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
- return nsContextMenu.prototype.__treestyletab__openLinkInTab.apply(this, aArgs);
+ TreeStyleTabService.handleNewTabFromCurrent(gBrowser.selectedTab);
+ return nsContextMenu.prototype.__treestyletab__openLinkInTab.call(this, ...aArgs);
};
nsContextMenu.prototype.__treestyletab__openFrameInTab = nsContextMenu.prototype.openFrameInTab;
nsContextMenu.prototype.openFrameInTab = function(...aArgs) {
- TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
- return nsContextMenu.prototype.__treestyletab__openFrameInTab.apply(this, aArgs);
+ TreeStyleTabService.handleNewTabFromCurrent(gBrowser.selectedTab);
+ return nsContextMenu.prototype.__treestyletab__openFrameInTab.call(this, ...aArgs);
};
nsContextMenu.prototype.__treestyletab__viewMedia = nsContextMenu.prototype.viewMedia;
nsContextMenu.prototype.viewMedia = function(aEvent) {
- TreeStyleTabService.onBeforeViewMedia(aEvent, this.target.ownerDocument.defaultView);
+ TreeStyleTabService.onBeforeViewMedia(aEvent, gBrowser.selectedTab);
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);
+ TreeStyleTabService.onBeforeViewMedia(aEvent, gBrowser.selectedTab);
return nsContextMenu.prototype.__treestyletab__viewBGImage.call(this, aEvent);
};
@@ -204,26 +191,26 @@ var TreeStyleTabWindowHelper = {
nsContextMenu.prototype.addDictionaries = function(...aArgs) {
var newWindowPref = TreeStyleTabUtils.prefs.getPref('browser.link.open_newwindow');
var where = newWindowPref === 3 ? 'tab' : 'window' ;
- TreeStyleTabService.onBeforeOpenLink(where, this.target.ownerDocument.defaultView);
- return nsContextMenu.prototype.__treestyletab__addDictionaries.apply(this, aArgs);
+ TreeStyleTabService.onBeforeOpenLink(where, gBrowser.selectedTab);
+ return nsContextMenu.prototype.__treestyletab__addDictionaries.call(this, ...aArgs);
};
nsContextMenu.prototype.__treestyletab__viewPartialSource = nsContextMenu.prototype.viewPartialSource;
nsContextMenu.prototype.viewPartialSource = function(...aArgs) {
- TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
- return nsContextMenu.prototype.__treestyletab__viewPartialSource.apply(this, aArgs);
+ TreeStyleTabService.handleNewTabFromCurrent(gBrowser.selectedTab);
+ return nsContextMenu.prototype.__treestyletab__viewPartialSource.call(this, ...aArgs);
};
nsContextMenu.prototype.__treestyletab__viewFrameSource = nsContextMenu.prototype.viewFrameSource;
nsContextMenu.prototype.viewFrameSource = function(...aArgs) {
- TreeStyleTabService.handleNewTabFromCurrent(this.target.ownerDocument.defaultView);
- return nsContextMenu.prototype.__treestyletab__viewFrameSource.apply(this, aArgs);
+ TreeStyleTabService.handleNewTabFromCurrent(gBrowser.selectedTab);
+ return nsContextMenu.prototype.__treestyletab__viewFrameSource.call(this, ...aArgs);
};
window.__treestyletab__BrowserViewSource = window.BrowserViewSource;
window.BrowserViewSource = function(...aArgs) {
TreeStyleTabService.handleNewTabFromCurrent(aArgs[0]);
- return window.__treestyletab__BrowserViewSource.apply(this, aArgs);
+ return window.__treestyletab__BrowserViewSource.call(this, ...aArgs);
};
BrowserSearch.__treestyletab__loadSearch = BrowserSearch._loadSearch;
@@ -256,16 +243,10 @@ var TreeStyleTabWindowHelper = {
owner[original] = owner[name];
owner[name] = function(aEvent, aIsPanelClick, ...aArgs) {
TreeStyleTabService.onBeforeOpenNewTabByThirdParty(aEvent.target.ownerDocument.defaultView);
- return owner[original].apply(this, [aEvent, aIsPanelClick].concat(aArgs));
+ return owner[original].call(this, aEvent, aIsPanelClick, ...aArgs);
};
}, this);
- window.__treestyletab__duplicateTabIn = window.duplicateTabIn;
- window.duplicateTabIn = function(aTab, where, delta) {
- gBrowser.treeStyleTab.onBeforeTabDuplicate(aTab, where, delta);
- return window.__treestyletab__duplicateTabIn.call(this, aTab, where, delta);
- };
-
window.__treestyletab__BrowserGoHome = window.BrowserGoHome;
window.BrowserGoHome = function(aEvent) {
aEvent = TreeStyleTabService.onBeforeGoHome(aEvent, gBrowser);
@@ -278,11 +259,11 @@ var TreeStyleTabWindowHelper = {
return FeedHandler.__treestyletab__loadFeed.call(this, aHref, aEvent);
};
- if ('showNavToolbox' in FullScreen) { // for Firefox 40 or later
+ if ('showNavToolbox' in FullScreen) {
FullScreen.__treestyletab__showNavToolbox = FullScreen.showNavToolbox;
FullScreen.showNavToolbox = function(...aArgs) {
var beforeCollapsed = this._isChromeCollapsed;
- var retVal = FullScreen.__treestyletab__showNavToolbox.apply(this, aArgs);
+ var retVal = FullScreen.__treestyletab__showNavToolbox.call(this, ...aArgs);
if (beforeCollapsed !== this._isChromeCollapsed)
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN);
return retVal;
@@ -291,17 +272,7 @@ var TreeStyleTabWindowHelper = {
FullScreen.__treestyletab__hideNavToolbox = FullScreen.hideNavToolbox;
FullScreen.hideNavToolbox = function(...aArgs) {
var beforeCollapsed = this._isChromeCollapsed;
- var retVal = FullScreen.__treestyletab__hideNavToolbox.apply(this, aArgs);
- if (beforeCollapsed !== this._isChromeCollapsed)
- gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN);
- return retVal;
- };
- }
- else if ('mouseoverToggle' in FullScreen) { // for Firefox 39 or older
- FullScreen.__treestyletab__mouseoverToggle = FullScreen.mouseoverToggle;
- FullScreen.mouseoverToggle = function(...aArgs) {
- var beforeCollapsed = this._isChromeCollapsed;
- var retVal = FullScreen.__treestyletab__mouseoverToggle.apply(this, aArgs);
+ var retVal = FullScreen.__treestyletab__hideNavToolbox.call(this, ...aArgs);
if (beforeCollapsed !== this._isChromeCollapsed)
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_FULLSCREEN);
return retVal;
@@ -315,25 +286,25 @@ var TreeStyleTabWindowHelper = {
if (event && event.type == 'fullscreen')
enterFS = !enterFS;
gBrowser.treeStyleTab.onBeforeFullScreenToggle(enterFS);
- return FullScreen.__treestyletab__toggle.apply(this, aArgs);
+ return FullScreen.__treestyletab__toggle.call(this, ...aArgs);
};
PrintUtils.__treestyletab__printPreview = PrintUtils.printPreview;
PrintUtils.printPreview = function(...aArgs) {
TreeStyleTabService.onPrintPreviewEnter();
- return PrintUtils.__treestyletab__printPreview.apply(this, aArgs);
+ return PrintUtils.__treestyletab__printPreview.call(this, ...aArgs);
};
PrintUtils.__treestyletab__exitPrintPreview = PrintUtils.exitPrintPreview;
PrintUtils.exitPrintPreview = function(...aArgs) {
TreeStyleTabService.onPrintPreviewExit();
- return PrintUtils.__treestyletab__exitPrintPreview.apply(this, aArgs);
+ return PrintUtils.__treestyletab__exitPrintPreview.call(this, ...aArgs);
};
SidebarUI.__treestyletab__show = SidebarUI.show;
SidebarUI.show = function(...aArgs) {
var opened = this.isOpen;
var width = this.browser.boxObject.width;
- return SidebarUI.__treestyletab__show.apply(this, aArgs)
+ return SidebarUI.__treestyletab__show.call(this, ...aArgs)
.then((function(aResult) {
if (opened !== this.isOpen ||
width !== this.browser.boxObject.width)
@@ -345,7 +316,7 @@ var TreeStyleTabWindowHelper = {
SidebarUI.hide = function(...aArgs) {
var opened = this.isOpen;
var width = this.browser.boxObject.width;
- var retVal = SidebarUI.__treestyletab__hide.apply(this, aArgs);
+ var retVal = SidebarUI.__treestyletab__hide.call(this, ...aArgs);
if (opened !== this.isOpen ||
width !== this.browser.boxObject.width)
gBrowser.treeStyleTab.updateFloatingTabbar(gBrowser.treeStyleTab.kTABBAR_UPDATE_BY_TOGGLE_SIDEBAR);
@@ -363,17 +334,6 @@ var TreeStyleTabWindowHelper = {
.trim();
});
},
- _getFunction : function TSTWH__getFunction(aFunc)
- {
- var func;
- try {
- eval('func = '+aFunc);
- }
- catch(e) {
- return null;
- }
- return func;
- },
initToolbarItems : function TSTWH_initToolbarItems()
{
@@ -386,7 +346,7 @@ var TreeStyleTabWindowHelper = {
searchbar.__treestyletab__original_doSearch = searchbar.doSearch;
searchbar.doSearch = function(...aArgs) {
TreeStyleTabService.onBeforeBrowserSearch(aArgs[0]);
- var retVal = searchbar.__treestyletab__original_doSearch.apply(this, aArgs);
+ var retVal = searchbar.__treestyletab__original_doSearch.call(this, ...aArgs);
TreeStyleTabService.stopToOpenChildTab();
return retVal;
};
@@ -443,61 +403,44 @@ var TreeStyleTabWindowHelper = {
initTabbrowserMethods : function TSTWH_initTabbrowserMethods(aTabBrowser)
{
var b = aTabBrowser;
+ var { ExtendedImmutable } = Components.utils.import('resource://treestyletab-modules/lib/extended-immutable.js', {});
+
+ b.__treestyletab__moveTabForward = b.moveTabForward;
+ b.moveTabForward = function(...aArgs) {
+ let originalNextTab = this.treeStyleTab.getNextTab(this.mCurrentTab);
+ let nextTab = originalNextTab;
+
+ let descendants = this.treeStyleTab.getDescendantTabs(this.mCurrentTab);
+ if (descendants.indexOf(nextTab) > -1) {
+ let lastDescendant = this.treeStyleTab.getLastDescendantTab(this.mCurrentTab);
+ nextTab = this.treeStyleTab.getNextVisibleTab(lastDescendant || this.mCurrentTab);
+ }
+ if (this.treeStyleTab.hasChildTabs(nextTab) && this.treeStyleTab.isSubtreeCollapsed(nextTab)) {
+ nextTab = this.treeStyleTab.getLastDescendantTab(nextTab);
+ }
+
+ if (nextTab == originalNextTab)
+ return this.__treestyletab__moveTabForward(...aArgs);
+
+ if (nextTab)
+ this.moveTabTo(this.mCurrentTab, nextTab._tPos);
+ else if (this.arrowKeysShouldWrap)
+ this.moveTabToStart();
+ };
- TreeStyleTabUtils.doPatching(b.moveTabForward, 'b.moveTabForward', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- 'if (nextTab)',
- '(function() {\n' +
- ' let descendants = this.treeStyleTab.getDescendantTabs(this.mCurrentTab);\n' +
- ' if (descendants.indexOf(nextTab) > -1) {\n' +
- ' let lastDescendant = this.treeStyleTab.getLastDescendantTab(this.mCurrentTab);\n' +
- ' nextTab = this.treeStyleTab.getNextVisibleTab(lastDescendant || this.mCurrentTab);\n' +
- ' }\n' +
- ' if (this.treeStyleTab.hasChildTabs(nextTab) && this.treeStyleTab.isSubtreeCollapsed(nextTab)) {\n' +
- ' nextTab = this.treeStyleTab.getLastDescendantTab(nextTab);\n' +
- ' }\n' +
- '}).call(this);' +
- '$&'
- ).replace(
- 'this.moveTabToStart();',
- '(function() {\n' +
- ' this.treeStyleTab.internallyTabMovingCount++;\n' +
- ' let parentTab = this.treeStyleTab.getParentTab(this.mCurrentTab);\n' +
- ' if (parentTab) {\n' +
- ' this.moveTabTo(this.mCurrentTab, this.treeStyleTab.getFirstChildTab(parentTab)._tPos);\n' +
- ' this.mCurrentTab.focus();\n' +
- ' }\n' +
- ' else {\n' +
- ' $&\n' +
- ' }\n' +
- ' this.treeStyleTab.internallyTabMovingCount--;\n' +
- '}).call(this);'
- ));
- }, 'treeStyleTab');
-
- TreeStyleTabUtils.doPatching(b.moveTabBackward, 'b.moveTabBackward', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- 'if (previousTab)',
- '(function() {\n' +
- ' previousTab = this.treeStyleTab.getPreviousVisibleTab(this.mCurrentTab);\n' +
- '}).call(this);' +
- '$&'
- ).replace(
- 'this.moveTabToEnd();',
- '(function() {\n' +
- ' this.treeStyleTab.internallyTabMovingCount++;\n' +
- ' let parentTab = this.treeStyleTab.getParentTab(this.mCurrentTab);\n' +
- ' if (parentTab) {\n' +
- ' this.moveTabTo(this.mCurrentTab, this.treeStyleTab.getLastChildTab(parentTab)._tPos);\n' +
- ' this.mCurrentTab.focus();\n' +
- ' }\n' +
- ' else {\n' +
- ' $&\n' +
- ' }\n' +
- ' this.treeStyleTab.internallyTabMovingCount--;\n' +
- '}).call(this);'
- ));
- }, 'treeStyleTab');
+ b.__treestyletab__moveTabBackward = b.moveTabBackward;
+ b.moveTabBackward = function(...aArgs) {
+ let originalPreviousTab = this.treeStyleTab.getPreviousTab(this.mCurrentTab);
+ let previousTab = this.treeStyleTab.getPreviousVisibleTab(this.mCurrentTab);
+
+ if (previousTab == originalPreviousTab)
+ return this.__treestyletab__moveTabBackward(...aArgs);
+
+ if (previousTab)
+ this.moveTabTo(this.mCurrentTab, previousTab._tPos);
+ else if (this.arrowKeysShouldWrap)
+ this.moveTabToStart();
+ };
b.__treestyletab__loadTabs = b.loadTabs;
b.loadTabs = function(aURIs, aLoadInBackground, aReplace, ...aArgs) {
@@ -513,7 +456,7 @@ var TreeStyleTabWindowHelper = {
var firstTabAdded;
try {
tabs = this.treeStyleTab.doAndGetNewTabs((function() {
- result = this.__treestyletab__loadTabs.apply(this, [aURIs, aLoadInBackground, aReplace].concat(aArgs));
+ result = this.__treestyletab__loadTabs.call(this, aURIs, aLoadInBackground, aReplace, ...aArgs);
}).bind(this));
firstTabAdded = tabs[0];
}
@@ -530,21 +473,34 @@ var TreeStyleTabWindowHelper = {
return result;
};
- TreeStyleTabUtils.doPatching(b._beginRemoveTab, 'b._beginRemoveTab', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- 'if (this.tabs.length - this._removingTabs.length == 1) {',
- 'if (this.tabs.length - this._removingTabs.length == 1 || this.treeStyleTab.shouldCloseLastTabSubtreeOf(aTab)) {'
- ).replace(
- 'this._removingTabs.length == 0',
- '(this.treeStyleTab.shouldCloseLastTabSubtreeOf(aTab) || $&)'
- ));
- }, 'treeStyleTab');
+ b.__treestyletab__beginRemoveTab = b._beginRemoveTab;
+ b._beginRemoveTab = function(aTab, ...aArgs) {
+ var originalRemovingTabs = this._removingTabs;
+ var self = this;
+ if (this.treeStyleTab.shouldCloseLastTabSubtreeOf(aTab)) {
+ this._removingTabs = new ExtendedImmutable(originalRemovingTabs, {
+ get length() {
+ // hack for https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/tabbrowser.xml#2371
+ if (aTab.closing) // do nothing after the removing process is started
+ return originalRemovingTabs.length;
+
+ if (window.skipNextCanClose) // the end section of the "close window with last tab" block
+ return 0;
+ else
+ return self.tabs.length - 1; // the beginning of the "close window with last tab" block
+ }
+ });
+ }
+ var result = this.__treestyletab__beginRemoveTab(aTab, ...aArgs);
+ this._removingTabs = originalRemovingTabs;
+ return result;
+ };
b.__treestyletab__removeCurrentTab = b.removeCurrentTab;
b.removeCurrentTab = function(...aArgs) {
if (!b.treeStyleTab.warnAboutClosingTabSubtreeOf(this.selectedTab))
return;
- return b.__treestyletab__removeCurrentTab.apply(this, aArgs);
+ return b.__treestyletab__removeCurrentTab.call(this, ...aArgs);
};
},
@@ -558,60 +514,125 @@ var TreeStyleTabWindowHelper = {
b.mTabContainer.advanceSelectedTab = function(...aArgs) {
if (b.treeStyleTab.handleAdvanceSelectedTab(aArgs[0], aArgs[1]))
return;
- return b.mTabContainer.__treestyletab__advanceSelectedTab.apply(this, aArgs);
+ return b.mTabContainer.__treestyletab__advanceSelectedTab.call(this, ...aArgs);
+ };
+
+ if (!b.tabContainer.__treestyletab__notifyBackgroundTab)
+ b.tabContainer.__treestyletab__notifyBackgroundTab = b.tabContainer._notifyBackgroundTab;
+ // original: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/tabbrowser.xml#5459
+ if (b.mTabContainer._notifyBackgroundTab.toString() === b.mTabContainer.__treestyletab__notifyBackgroundTab.toString())
+ b.tabContainer._notifyBackgroundTab = function(aTab, ...aArgs) {
+ var treeStyleTab = gBrowser.treeStyleTab;
+ if (aTab.pinned ||
+ treeStyleTab.scrollToNewTabMode == 0 ||
+ treeStyleTab.shouldCancelEnsureElementIsVisible())
+ return;
+
+ let scrollRect = this.mTabstrip.scrollClientRect;
+ let tabRect = aTab.getBoundingClientRect();
+ this.mTabstrip._calcTabMargins(aTab);
+
+ tabRect = {
+ start : tabRect[treeStyleTab.startProp],
+ end : tabRect[treeStyleTab.endProp]
+ };
+ tabRect[treeStyleTab.startProp] = tabRect.start;
+ tabRect[treeStyleTab.endProp] = tabRect.end;
+
+ if (tabRect[treeStyleTab.startProp] >= scrollRect[treeStyleTab.startProp] &&
+ tabRect[treeStyleTab.endProp] <= scrollRect[treeStyleTab.endProp])
+ return;
+
+ if (this.mTabstrip.smoothScroll) {
+ let selectedRect = !this.selectedItem.pinned && this.selectedItem.getBoundingClientRect();
+ if (selectedRect) {
+ selectedRect = {
+ start : selectedRect[treeStyleTab.startProp],
+ end : selectedRect[treeStyleTab.endProp]
+ };
+ selectedRect[treeStyleTab.startProp] = selectedRect.start + this.mTabstrip._tabMarginLeft;
+ selectedRect[treeStyleTab.endProp] = selectedRect.end - this.mTabstrip._tabMarginRight;
+ }
+ tabRect[treeStyleTab.startProp] += this.mTabstrip._tabMarginLeft;
+ tabRect[treeStyleTab.endProp] -= this.mTabstrip._tabMarginRight;
+
+ if (!selectedRect ||
+ treeStyleTab.scrollToNewTabMode == 1 &&
+ Math.max(
+ tabRect[treeStyleTab.endProp] - selectedRect[treeStyleTab.startProp],
+ selectedRect[treeStyleTab.endProp] - tabRect[treeStyleTab.startProp]
+ ) <= scrollRect[treeStyleTab.sizeProp]) {
+ this.mTabstrip.ensureElementIsVisible(aTab);
+ return;
+ }
+
+ this.mTabstrip._smoothScrollByPixels(
+ this.mTabstrip._isRTLScrollbox ?
+ selectedRect[treeStyleTab.endProp] - scrollRect[treeStyleTab.endProp] :
+ selectedRect[treeStyleTab.startProp] - scrollRect[treeStyleTab.startProp]
+ );
+ }
+
+ if (!this._animateElement.hasAttribute('notifybgtab')) {
+ this._animateElement.setAttribute('notifybgtab', 'true');
+ setTimeout(function(aAnimateElement) {
+ aAnimateElement.removeAttribute('notifybgtab');
+ }, 150, this._animateElement);
+ }
+
+ treeStyleTab.notifyBackgroundTab();
};
- TreeStyleTabUtils.doPatching(b.mTabContainer._notifyBackgroundTab, 'b.mTabContainer._notifyBackgroundTab', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- '{',
- '{\n' +
- ' var treeStyleTab = TreeStyleTabService.getTabBrowserFromChild(this).treeStyleTab;\n' +
- ' if (treeStyleTab.scrollToNewTabMode == 0 ||\n' +
- ' treeStyleTab.shouldCancelEnsureElementIsVisible())\n' +
- ' return;'
- ).replace(
- /\.screenX/g, '[treeStyleTab.screenPositionProp]'
- ).replace(
- /\.width/g, '[treeStyleTab.sizeProp]'
- ).replace(
- /\.left/g, '[treeStyleTab.startProp]'
- ).replace(
- /\.right/g, '[treeStyleTab.endProp]'
-
- // replace such codes:
- // tab = {left: tab.left, right: tab.right};
- ).replace(
- /left\s*:/g, 'start:'
- ).replace(
- /right\s*:/g, 'end:'
- ).replace(
- /((tab|selected)\s*=\s*\{\s*start:[^\}]+\})/g,
- '$1; $2[treeStyleTab.startProp] = $2.start; $2[treeStyleTab.endProp] = $2.end;'
-
- ).replace(
- '!selected ||',
- '$& treeStyleTab.scrollToNewTabMode == 1 && '
- ).replace(
- /(\}\)?)$/,
- 'treeStyleTab.notifyBackgroundTab(); $1'
- ));
- }, 'TreeStyleTabService.getTabBrowserFromChild');
-
- TreeStyleTabUtils.doPatching(b.tabContainer._getDragTargetTab, 'b.tabContainer._getDragTargetTab', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- /\.screenX/g, '[this.treeStyleTab.screenPositionProp]'
- ).replace(
- /\.width/g, '[this.treeStyleTab.sizeProp]'
- ));
- }, 'treeStyleTab');
-
- TreeStyleTabUtils.doPatching(b.tabContainer._getDropIndex, 'b.tabContainer._getDropIndex', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- /\.screenX/g, '[this.treeStyleTab.screenPositionProp]'
- ).replace(
- /\.width/g, '[this.treeStyleTab.sizeProp]'
- ));
- }, 'treeStyleTab');
+ if (!b.tabContainer.__treestyletab__getDragTargetTab)
+ b.tabContainer.__treestyletab__getDragTargetTab = b.tabContainer._getDragTargetTab;
+ // original: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/tabbrowser.xml#5511
+ if (b.mTabContainer._getDragTargetTab.toString() === b.mTabContainer.__treestyletab__getDragTargetTab.toString())
+ b.tabContainer._getDragTargetTab = function(aEvent, aIsLink, ...aArgs) {
+ var treeStyleTab = gBrowser.treeStyleTab;
+ if (!treeStyleTab.isVertical)
+ return this.__treestyletab__getDragTargetTab(aEvent, aIsLink, ...aArgs);
+
+ var draggedTab = aEvent.target.localName == 'tab' ? aEvent.target : null;
+ if (draggedTab && aIsLink) {
+ let tabBox = draggedTab.boxObject;
+ let tabPosition = tabBox[treeStyleTab.screenPositionProp];
+ let tabSize = tabBox[treeStyleTab.sizeProp];
+ let currentPosition = aEvent[treeStyleTab.screenPositionProp];
+ if (currentPosition < tabPosition + tabSize * 0.25 ||
+ currentPosition > tabPosition + tabSize * 0.75)
+ return null;
+ }
+ return draggedTab;
+ };
+
+ if (!b.tabContainer.__treestyletab__getDropIndex)
+ b.tabContainer.__treestyletab__getDropIndex = b.tabContainer._getDropIndex;
+ // original: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/tabbrowser.xml#5526
+ if (b.mTabContainer._getDropIndex.toString() === b.mTabContainer.__treestyletab__getDropIndex.toString())
+ b.tabContainer._getDropIndex = function(aEvent, aIsLink, ...aArgs) {
+ var treeStyleTab = gBrowser.treeStyleTab;
+ if (!treeStyleTab.isVertical)
+ return this.__treestyletab__getDropIndex(aEvent, aIsLink, ...aArgs);
+
+ var tabs = this.childNodes;
+ var draggedTab = this._getDragTargetTab(aEvent, aIsLink);
+ var currentPosition = aEvent[treeStyleTab.screenPositionProp];
+ var isLTR = window.getComputedStyle(this, null).direction == 'ltr';
+ for (let i = draggedTab ? draggedTab._tPos : 0; i < tabs.length; i++)
+ {
+ let tabBox = tabs[i].boxObject;
+ let tabCenter = tabBox[treeStyleTab.screenPositionProp] + tabBox[treeStyleTab.sizeProp] / 2;
+ if (isLTR) {
+ if (currentPosition < tabCenter)
+ return i;
+ }
+ else {
+ if (currentPosition > tabCenter)
+ return i;
+ }
+ }
+ return tabs.length;
+ };
/**
* The default implementation fails to scroll to tab if it is expanding.
@@ -622,28 +643,46 @@ var TreeStyleTabWindowHelper = {
if (!scrollbox.__treestyletab__ensureElementIsVisible) {
scrollbox.__treestyletab__ensureElementIsVisible = scrollbox.ensureElementIsVisible;
scrollbox.ensureElementIsVisible = function(...aArgs) {
- if (b.treeStyleTab.shouldCancelEnsureElementIsVisible())
+ var treeStyleTab = gBrowser.treeStyleTab;
+ if (treeStyleTab.shouldCancelEnsureElementIsVisible())
return;
let shouldScrollNow = aArgs[1] === false;
- if (b.treeStyleTab.animationEnabled && !shouldScrollNow)
- return b.treeStyleTab.scrollToTab(aArgs[0]);
- scrollbox.__treestyletab__ensureElementIsVisible.apply(this, aArgs);
+ if (treeStyleTab.animationEnabled && !shouldScrollNow)
+ return treeStyleTab.scrollToTab(aArgs[0]);
+ scrollbox.__treestyletab__ensureElementIsVisible.call(this, ...aArgs);
};
}
}
{
let popup = document.getElementById('alltabs-popup');
- TreeStyleTabUtils.doPatching(popup._updateTabsVisibilityStatus, 'popup._updateTabsVisibilityStatus', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- '{',
- '{ var treeStyleTab = gBrowser.treeStyleTab;'
- ).replace(
- /\.screenX/g, '[treeStyleTab.screenPositionProp]'
- ).replace(
- /\.width/g, '[treeStyleTab.sizeProp]'
- ));
- }, 'treeStyleTab');
+ if (!popup.__treestyletab__updateTabsVisibilityStatus)
+ popup.__treestyletab__updateTabsVisibilityStatus = popup._updateTabsVisibilityStatus;
+ // original https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/tabbrowser.xml#6588
+ if (popup._updateTabsVisibilityStatus.toString() === popup.__treestyletab__updateTabsVisibilityStatus.toString())
+ popup._updateTabsVisibilityStatus = function(...aArgs) {
+ var treeStyleTab = gBrowser.treeStyleTab;
+ if (!treeStyleTab.isVertical)
+ return this.__treestyletab__updateTabsVisibilityStatus(...aArgs);
+
+ var tabContainer = gBrowser.tabContainer;
+ if (tabContainer.getAttribute('overflow') != 'true')
+ return;
+
+ var tabbarBox = tabContainer.mTabstrip.scrollBoxObject;
+ Array.forEach(this.childNodes, function(aItem) {
+ let tab = aItem.tab;
+ if (!tab) // not tab item
+ return;
+
+ let tabBox = tab.boxObject;
+ if (tabBox[treeStyleTab.screenPositionProp] >= tabbarBox[treeStyleTab.screenPositionProp] &&
+ tabBox[treeStyleTab.screenPositionProp] + tabBox[treeStyleTab.sizeProp] <= tabbarBox[treeStyleTab.screenPositionProp] + tabbarBox[treeStyleTab.sizeProp])
+ aItem.setAttribute('tabIsVisible', true);
+ else
+ aItem.removeAttribute('tabIsVisible');
+ }, this);
+ };
}
},
@@ -658,7 +697,7 @@ var TreeStyleTabWindowHelper = {
aTab.toggleMuteAudio = function(...aArgs) {
if (aTabBrowser.treeStyleTab.handleTabToggleMuteAudio(aTab))
return;
- return aTab.__treestyletab__toggleMuteAudio.apply(this, aArgs);
+ return aTab.__treestyletab__toggleMuteAudio.call(this, ...aArgs);
};
}
diff --git a/content/treestyletab/windowHelperHacks.js b/content/treestyletab/windowHelperHacks.js
index 5892849..2df4000 100644
--- a/content/treestyletab/windowHelperHacks.js
+++ b/content/treestyletab/windowHelperHacks.js
@@ -18,304 +18,20 @@ TreeStyleTabWindowHelper.extraProperties = [
TreeStyleTabWindowHelper.overrideExtensionsPreInit = function TSTWH_overrideExtensionsPreInit() {
var sv = this.service;
- // Highlander
- // https://addons.mozilla.org/firefox/addon/4086
- if ('Highlander' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.Highlander')) {
- eval('Highlander.overrideHandleLinkClick = '+
- Highlander.overrideHandleLinkClick.toSource().replace(
- /(var )?origHandleLinkClick/g,
- 'window.__treestyletab__highlander__origHandleLinkClick'
- )
- );
- }
-
- // PermaTabs
- // https://addons.mozilla.org/firefox/addon/2558
- // PermaTabs Mod
- // https://addons.mozilla.org/firefox/addon/7816
- if ('permaTabs' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.PermaTabs')) {
- if ('__init' in permaTabs) {
- // without delay, Firefox crashes on startup.
- eval('permaTabs.__init = '+
- permaTabs.__init.toSource().replace(
- 'aTab.setAttribute(\\"image\\", ',
- 'window.setTimeout(function(aTab, aImage) { aTab.setAttribute(\\"image\\", aImage); }, 100, aTab, '
- )
- );
- }
- if ('showPermaTab' in permaTabs) {
- eval('permaTabs.showPermaTab = '+
- permaTabs.showPermaTab.toSource().replace(
- /(\}\)?)$/,
- '(function(tab, id) {\n' +
- ' if (this.ssWillRestore) return;\n' +
- ' var TST = TreeStyleTabService;\n' +
- ' if (this.TSTRestoredPermaTabsInfo === void(0)) {\n' +
- ' try {\n' +
- ' eval("this.TSTRestoredPermaTabsInfo = "+(TreeStyleTabUtils.getTreePref("permaTabsInfo") || "null"));\n' +
- ' }\n' +
- ' catch(e) {\n' +
- ' }\n' +
- ' }\n' +
- ' if (!this.TSTRestoredPermaTabsInfo) return;\n' +
-
- ' var info = this.TSTRestoredPermaTabsInfo[id];\n' +
- ' if (!info) return;\n' +
-
- ' for (var i in info)\n' +
- ' {\n' +
- ' TST.SessionStore.setTabValue(tab, i, String(info[i]));\n' +
- ' }\n' +
- ' var count = 0;\n' +
- ' window.setTimeout(function onTimeout() {\n' +
- ' var b = TST.getTabBrowserFromChild(tab);\n' +
- ' if (!b.treeStyleTab) {\n' +
- ' if (++count < 50)\n' +
- ' window.setTimeout(onTimeout, 100);\n' +
- ' return;\n' +
- ' }\n' +
- ' b.treeStyleTab.handleRestoredTab(tab);\n' +
- ' }, 0);\n' +
- '}).call(this, tab, id)\n' +
- '$1'
- )
- );
- }
- if ('savePermaTabs' in permaTabs) {
- eval('permaTabs.savePermaTabs = '+
- permaTabs.savePermaTabs.toSource().replace(
- '{',
- '{\n' +
- '(function() {\n' +
- ' var tabsInfo = {};\n' +
- ' var TST = TreeStyleTabService;\n' +
- ' var allTabs = getBrowser().mTabContainer.childNodes;\n' +
- ' for (let i = 0, maxi = allTabs.length; i < maxi; i++)\n' +
- ' {\n' +
- ' let tab = allTabs[i];\n' +
- ' let index = this.getPermaTabLocalIndex(tab);\n' +
- ' if (index < 0) continue;\n' +
- ' let info = {};\n' +
- ' for (let i = 0, maxi = TST.extraProperties.length; i < maxi; i++)\n' +
- ' {\n' +
- ' let property = TST.extraProperties[i];\n' +
- ' info[property] = TST.getTabValue(tab, property);\n' +
- ' }\n' +
- ' tabsInfo[this.permaTabs[index].id] = info;\n' +
- ' }\n' +
- ' TreeStyleTabUtils.setTreePref("permaTabsInfo", tabsInfo.toSource());\n' +
- '}).call(this);'
- )
- );
- }
- }
-
// Tab Mix Plus
if (TreeStyleTabUtils.getTreePref('compatibility.TMP')) {
document.documentElement.setAttribute('treestyletab-enable-compatibility-tmp', true);
}
- // Tab Mix Plus, SessionStore API
- if (
- TreeStyleTabUtils.getTreePref('compatibility.TMP') &&
- ('TabmixSessionData' in window || 'SessionData' in window)
- ) {
- let sessionData = window.TabmixSessionData || window.SessionData;
- if ('getTabProperties' in sessionData && 'setTabProperties' in sessionData) {
- let prefix = sv.kTMP_SESSION_DATA_PREFIX;
- let sessionManager = window.TabmixSessionManager || window.SessionManager;
- sessionData.tabTSTProperties = this.extraProperties.map(function(aProperty) {
- return prefix+aProperty;
- });
- eval('sessionData.getTabProperties = '+
- sessionData.getTabProperties.toSource().replace(
- 'return tabProperties;',
- ' for (let i = 0, maxi = this.tabTSTProperties.length; i < maxi; i++)\n' +
- ' {\n' +
- ' let property = this.tabTSTProperties[i];\n' +
- ' tabProperties += "|" + property + "=" + encodeURIComponent(aTab.getAttribute(property));\n' +
- ' }\n' +
- '$&'
- )
- );
- eval('sessionData.setTabProperties = '+
- sessionData.setTabProperties.toSource().replace(
- '{',
- '$&\n' +
- ' var TSTProps = tabProperties.split("|");\n' +
- ' tabProperties = TSTProps.shift();\n' +
- ' for (let i = 0, maxi = TSTProps.length; i < maxi; i++)\n' +
- ' {\n' +
- ' let property = TSTProps[i];\n' +
- ' let index = property.indexOf("=");\n' +
- ' let name = property.substring(0, index);\n' +
- ' let value = decodeURIComponent(property.substring(index+1));\n' +
- ' if (name && value)\n' +
- ' aTab.setAttribute(name, value);\n' +
- ' }'
- )
- );
- eval('sessionManager.loadOneTab = '+
- sessionManager.loadOneTab.toSource().replace(
- /(\}\))?$/,
- ' if (gBrowser.treeStyleTab.useTMPSessionAPI)\n' +
- ' gBrowser.treeStyleTab.handleRestoredTab(aTab);\n' +
- '$1'
- )
- );
- let source = tablib.init.toSource().split('gBrowser.restoreTab = ');
- source[1] = source[1].replace(
- 'return newTab;',
- ' if (this.treeStyleTab.useTMPSessionAPI)\n' +
- ' this.treeStyleTab.handleRestoredTab(newTab);\n' +
- '$&'
- );
- eval('tablib.init = '+source.join('gBrowser.restoreTab = '));
- eval('sessionManager.loadOneWindow = '+
- sessionManager.loadOneWindow.toSource().replace(
- 'gBrowser.tabsToLoad = ',
- ' gBrowser.treeStyleTab.resetAllTabs(true, true);\n' +
- ' TreeStyleTabService.restoringTree = true;\n' +
- '$&'
- ).replace(
- /(\}\))?$/,
- 'TreeStyleTabService.restoringTree = false; $1'
- )
- );
- sv.useTMPSessionAPI = true;
- }
- }
-
- // Session Manager
- // https://addons.mozilla.org/firefox/addon/2324
- // We need to initialize TST before Session Manager restores the last session anyway!
- if ('gSessionManager' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.SessionManager')) {
- if ('onLoad_proxy' in gSessionManager &&
- 'onLoad' in gSessionManager) {
- eval('gSessionManager.onLoad = '+gSessionManager.onLoad.toSource().replace(
- '{',
- '{ TreeStyleTabService.init();'
- ));
- }
- if ('load' in gSessionManager) {
- eval('gSessionManager.load = '+gSessionManager.load.toSource().replace(
- 'var tabcount = ',
- ' gBrowser.treeStyleTab.collapseExpandAllSubtree(false, true);\n' +
- ' {\n'+
- ' let tabs = gBrowser.treeStyleTab.getTabs(gBrowser).slice(1).reverse();\n' +
- ' for (let i = 0, maxi = tabs.length; i < maxi; i++)\n' +
- ' {\n' +
- ' let tab = tabs[i];\n' +
- ' gBrowser.removeTab(tab);\n' +
- ' }\n' +
- ' }\n' +
- ' TreeStyleTabService.restoringTree = true;\n' +
- '$&'
- ));
- }
- }
-
- // FullerScreen
- // https://addons.mozilla.org/firefox/addon/4650
- if ('FS_onFullerScreen' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.FullerScreen')) {
- let functions = 'CheckIfFullScreen,FS_onFullerScreen,FS_onMouseMove'.split(',');
- for (let i = 0, maxi = functions.length; i < maxi; i++)
- {
- let func = functions[i];
- if (!(func in window)) continue;
- eval('window.'+func+' = '+window[func].toSource().replace(
- /FS_data.mTabs.(removeAttribute\("moz-collapsed"\)|setAttribute\("moz-collapsed", "true"\));/g,
- 'if (gBrowser.treeStyleTab.currentTabbarPosition == "top") { $& }'
- ));
- }
- }
// TooManyTabs
- // https://addons.mozilla.org/firefox/addon/9429
+ // https://addons.mozilla.org/firefox/addon/toomanytabs-saves-your-memory/
if ('tooManyTabs' in window &&
TreeStyleTabUtils.getTreePref('compatibility.TooManyTabs')) {
sv.registerExpandTwistyAreaBlocker('tooManyTabs');
}
- // DragNDrop Toolbars
- // https://addons.mozilla.org/firefox/addon/dragndrop-toolbars/
- if ('globDndtb' in window &&
- globDndtb.setTheStuff &&
- TreeStyleTabUtils.getTreePref('compatibility.DragNDropToolbars')) {
- let reinitTabbar = function() {
- gBrowser.treeStyleTab.destroyTabbar()
- .then(function() {
- gBrowser.treeStyleTab.reinitTabbar();
- });
- };
- globDndtb.__treestyletab__setOrder = globDndtb.setOrder;
- globDndtb.setOrder = function() {
- reinitTabbar();
- return globDndtb.__treestyletab__setOrder.apply(this, arguments);
- };
- globDndtb.__treestyletab__setTheStuff = globDndtb.setTheStuff;
- globDndtb.setTheStuff = function() {
- var result = globDndtb.__treestyletab__setTheStuff.apply(this, arguments);
- if (this.dndObserver &&
- this.dndObserver.onDrop &&
- !this.dndObserver.__treestyletab__onDrop) {
- this.dndObserver.__treestyletab__onDrop = this.dndObserver.onDrop;
- this.dndObserver.onDrop = function(aEvent, aDropData, aSession) {
- if (document.getElementById(aDropData.data) == gBrowser.treeStyleTab.tabStrip) {
- reinitTabbar();
- }
- return this.__treestyletab__onDrop.apply(this, arguments);
- };
- }
- return result;
- };
- }
-
- // Optimoz Tweaks
- // http://optimoz.mozdev.org/tweaks/
- // https://addons.mozilla.org/firefox/addon/optimoz-tweaks-ja-version/
- if ('mtSidebarStartup' in window &&
- 'mtSidebarShutdown' in window &&
- 'mtPreventHiding' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.OptimozTweaks')) {
- eval('window.mtSidebarStartup = '+window.mtSidebarStartup.toSource().replace(
- '{',
- '{\n' +
- ' document.getElementById("TabsToolbar")\n' +
- ' .addEventListener("mousemove", mtMouseMoveListener, false);'
- ));
- eval('window.mtSidebarShutdown = '+window.mtSidebarShutdown.toSource().replace(
- '{',
- '{\n' +
- ' document.getElementById("TabsToolbar")\n' +
- ' .removeEventListener("mousemove", mtMouseMoveListener, false);'
- ));
- eval('window.mtPreventHiding = '+window.mtPreventHiding.toSource().replace(
- '{',
- '{\n' +
- ' if (TreeStyleTabService.getTabbarFromEvent(arguments[0]))\n' +
- ' return;'
- ));
- }
-
- /**
- * Hide Caption Titlebar Plus (Smart)
- * https://addons.mozilla.org/firefox/addon/hide-caption-titlebar-plus-sma/
- */
- if ('HideCaption' in window &&
- 'do_alter' in HideCaption) {
- eval('HideCaption.do_alter = '+HideCaption.do_alter.toSource().replace(
- 'if (!theSettings) {',
- ' if (!theSettings ||\n' +
- ' gBrowser.treeStyleTab.isVertical) {'
- ));
- }
-
// Greasemonkey
- // https://addons.mozilla.org/firefox/addon/748
+ // https://addons.mozilla.org/firefox/addon/greasemonkey/
if (TreeStyleTabUtils.getTreePref('compatibility.Greasemonkey')) {
try {
if ('GM_BrowserUI' in window &&
@@ -327,7 +43,7 @@ TreeStyleTabWindowHelper.overrideExtensionsPreInit = function TSTWH_overrideExte
if (originalTabs.length === 0)
originalTabs = Array.slice(gBrowser.tabContainer.childNodes, 0);
var owner = aMessage.target;
- var retVal = originalOpenInTab.apply(this, [aMessage].concat(aArgs));
+ var retVal = originalOpenInTab.call(this, aMessage, ...aArgs);
window.setTimeout(function() {
window.setTimeout(function() {
if (originalTabs.length === 0)
@@ -358,17 +74,17 @@ TreeStyleTabWindowHelper.overrideExtensionsPreInit = function TSTWH_overrideExte
}
// Duplicate in Tab Context Menu
- // https://addons.mozilla.org/firefox/duplicate-in-tab-context-menu/
+ // https://addons.mozilla.org/firefox/addon/duplicate-in-tab-context-menu/
if (TreeStyleTabUtils.getTreePref('compatibility.DuplicateInTabContext') &&
'SchuzakJp' in window &&
'DuplicateInTabContext' in SchuzakJp &&
- typeof SchuzakJp.DuplicateInTabContext.Duplicate == 'function') {
- TreeStyleTabUtils.doPatching(SchuzakJp.DuplicateInTabContext.Duplicate, 'SchuzakJp.DuplicateInTabContext.Duplicate', function(aName, aSource) {
- return eval(aName+' = '+aSource.replace(
- '{',
- '{ gBrowser.treeStyleTab.onBeforeTabDuplicate(oriTab); '
- ));
- }, 'treeStyleTab');
+ typeof SchuzakJp.DuplicateInTabContext.Duplicate == 'function' &&
+ !SchuzakJp.DuplicateInTabContext.__treestyletab__Duplicate) {
+ SchuzakJp.DuplicateInTabContext.__treestyletab__Duplicate = SchuzakJp.DuplicateInTabContext.Duplicate;
+ SchuzakJp.DuplicateInTabContext.Duplicate = function(aOriginalTab, ...aArgs) {
+ gBrowser.treeStyleTab.onBeforeTabDuplicate(aOriginalTab);
+ return this.__treestyletab__Duplicate(aOriginalTab, ...aArgs);
+ };
}
};
@@ -380,138 +96,50 @@ TreeStyleTabWindowHelper.overrideExtensionsBeforeBrowserInit = function TSTWH_ov
'TMP_LastTab' in window) {
TMP_LastTab.TabBar = gBrowser.mTabContainer;
}
- if (TreeStyleTabUtils.getTreePref('compatibility.TMP') &&
- 'isTabVisible' in gBrowser.mTabContainer &&
- 'ensureTabIsVisible' in gBrowser.mTabContainer) {
- let replaceHorizontalProps = function replaceHorizontalProps(aString)
- {
- return aString.replace(
- /boxObject\.x/g,
- 'boxObject[posProp]'
- ).replace(
- /boxObject\.screenX/g,
- 'boxObject[screenPosProp]'
- ).replace(
- /boxObject\.width/g,
- 'boxObject[sizeProp]'
- ).replace(
- '{',
- '{\n' +
- ' var posProp = gBrowser.treeStyleTab.isVertical ? "y" : "x" ;\n' +
- ' var screenPosProp = gBrowser.treeStyleTab.isVertical ? "screenY" : "screenX" ;\n' +
- ' var sizeProp = gBrowser.treeStyleTab.isVertical ? "height" : "width" ;'
- )
- }
- eval('gBrowser.mTabContainer.ensureTabIsVisible = '+
- replaceHorizontalProps(gBrowser.mTabContainer.ensureTabIsVisible.toSource().replace(
- 'boxObject.width < 250',
- '$& || gBrowser.treeStyleTab.isVertical'
- ))
- );
- eval('gBrowser.mTabContainer.isTabVisible = '+
- replaceHorizontalProps(gBrowser.mTabContainer.isTabVisible.toSource())
- );
- }
-
- // Tabberwocky
- // https://addons.mozilla.org/firefox/addon/14439
- if ('tabberwocky' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.Tabberwocky')) {
- let listener = {
- handleEvent : function(aEvent)
- {
- switch (aEvent.type)
- {
- case 'TreeStyleTabTabbarPositionChanged':
- var b = aEvent.originalTarget;
- if (b.treeStyleTab.isVertical)
- TreeStyleTabUtils.prefs.setPref('tabberwocky.multirow', false);
- break;
-
- case 'unload':
- document.removeEventListener('TreeStyleTabTabbarPositionChanged', this, false);
- document.removeEventListener('unload', this, false);
- break;
- }
- }
- };
- document.addEventListener('TreeStyleTabTabbarPositionChanged', listener, false);
- document.addEventListener('unload', listener, false);
-
- if ('openSelectedLinks' in tabberwocky) {
- eval('tabberwocky.openSelectedLinks = '+
- tabberwocky.openSelectedLinks.toSource().replace(
- 'links.forEach(',
- ' TreeStyleTabService.readyToOpenChildTab(aFrame, true)\n' +
- '$&'
- ).replace(
- /(\}\)?)$/,
- ' TreeStyleTabService.stopToOpenChildTab(aFrame)\n' +
- '$1'
- )
- );
- }
- }
};
TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_overrideExtensionsAfterBrowserInit() {
var sv = this.service;
// Selection Links
- // https://addons.mozilla.org/firefox/addon/8644
+ // https://addons.mozilla.org/firefox/addon/selection-links/
+ // open selection links as child tabs
if ('selectionlinks' in window &&
'parseSelection' in selectionlinks &&
- TreeStyleTabUtils.getTreePref('compatibility.SelectionLinks')) {
- eval('selectionlinks.parseSelection = '+
- selectionlinks.parseSelection.toSource().replace(
- /((?:[^\s:;]+.selectedTab\s*=\s*)?([^\s:;]+).addTab\()/g,
- ' if ($2.treeStyleTab)\n' +
- ' $2.treeStyleTab.readyToOpenChildTab(focusedWindow);\n' +
- '$1'
- )
- );
+ TreeStyleTabUtils.getTreePref('compatibility.SelectionLinks') &&
+ !selectionlinks.__treestyletab__parseSelection) {
+ selectionlinks.__treestyletab__parseSelection = selectionlinks.parseSelection;
+ selectionlinks.parseSelection = function(...aArgs) {
+ gBrowser.treeStyleTab.readyToOpenChildTabNow(gBrowser.selectedTab, true);
+ return selectionlinks.__treestyletab__parseSelection(...aArgs);
+ };
}
// Tab Mix Plus
if (
TreeStyleTabUtils.getTreePref('compatibility.TMP') &&
- 'TabmixTabbar' in window
+ 'TabmixTabbar' in window &&
+ !TMP_tabDNDObserver.__treestyletab__clearDragmark
) {
- let DNDObserver = 'TMP_tabDNDObserver' in window ? TMP_tabDNDObserver : TabDNDObserver ;
- this.updateTabDNDObserver(DNDObserver);
- eval('DNDObserver.clearDragmark = '+
- DNDObserver.clearDragmark.toSource().replace(
- /(\})(\))?$/,
- 'gBrowser.treeStyleTab.tabbarDNDObserver.clearDropPosition(); $1$2'
- )
- );
- eval('DNDObserver.onDragStart = '+
- DNDObserver.onDragStart.toSource().replace(
- 'event.target.localName != "tab"',
- ' gBrowser.treeStyleTab.tabbarDNDObserver.canDragTabbar(event) ||\n' +
- ' $&'
- )
- );
-
- eval('window.TMP_howToOpen = '+
- window.TMP_howToOpen.toSource().replace(
- /(window.openNewTabWith\()/g,
- 'TreeStyleTabService.readyToOpenChildTab(event.target.ownerDocument.defaultView); $1'
- )
- );
+ this.updateTabDNDObserver(TMP_tabDNDObserver);
+ TMP_tabDNDObserver.__treestyletab__clearDragmark = TMP_tabDNDObserver.clearDragmark;
+ TMP_tabDNDObserver.clearDragmark = function(...aArgs) {
+ var result = this.__treestyletab__clearDragmark(...aArgs);
+ gBrowser.treeStyleTab.tabbarDNDObserver.clearDropPosition();
+ return result;
+ };
if ('TabmixContext' in window &&
typeof TabmixContext.openMultipleLinks == 'function') {
- eval('TabmixContext.openMultipleLinks = '+
- TabmixContext.openMultipleLinks.toSource().replace(
- /(TMP_loadTabs\([^\)]+\);)/g,
- 'TreeStyleTabService.readyToOpenChildTab(gBrowser, true); $1 TreeStyleTabService.stopToOpenChildTab(gBrowser);'
- )
- );
+ TabmixContext.__treestyletab__openMultipleLinks = TabmixContext.openMultipleLinks;
+ TabmixContext.openMultipleLinks = function(aCheck, ...aArgs) {
+ if (!aCheck)
+ TreeStyleTabService.readyToOpenChildTabNow(gBrowser, true);
+ return this.__treestyletab__openMultipleLinks(aCheck, ...aArgs);
+ };
}
-
let listener = {
handleEvent : function(aEvent)
{
@@ -542,59 +170,23 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
gBrowser.treeStyleTab.internallyTabMovingCount++; // until "TMmoveTabTo" method is overwritten
}
-
- // Super DragAndGo
- // https://addons.mozilla.org/firefox/addon/137
- if ('superDrag' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.SuperDragAndGo')) {
- eval('superDrag.onDrop = '+
- superDrag.onDrop.toSource().replace(
- /(var newTab = getBrowser\(\).addTab\([^\)]+\);)/g,
- ' if (aDragSession.sourceNode &&\n' +
- ' aDragSession.sourceNode.ownerDocument.defaultView.top == getBrowser().contentWindow)\n' +
- ' TreeStyleTabService.readyToOpenChildTab(getBrowser());\n' +
- ' $1'
- )
- );
- }
-
- // Drag de Go
- // https://addons.mozilla.org/firefox/addon/2918
- if ('ddg_ges' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.DragDeGo')) {
- eval('ddg_ges.Open = '+
- ddg_ges.Open.toSource().replace(
- 'if (mode[1] == "h" || mode[1] == "f") {',
- '$&\n' +
- ' if ("sourceNode" in aData) // only for dragging from the content tarea.\n' +
- ' TreeStyleTabService.readyToOpenChildTab(getBrowser());'
- )
- );
- eval('ddg_ges.Search = '+
- ddg_ges.Search.toSource().replace(
- 'if (mode[1] == "h" || mode[1] == "f") {',
- '$&\n' +
- ' TreeStyleTabService.readyToOpenChildTab(getBrowser());'
- )
- );
- }
-
// DragIt
// https://addons.mozilla.org/firefox/addon/dragit-formerly-drag-de-go/
+ // open new tabs as children of the current tab, for links or search terms
if ('DragIt' in window &&
DragIt.tab &&
DragIt.tab.open &&
- TreeStyleTabUtils.getTreePref('compatibility.DragIt')) {
- eval('DragIt.tab.open = '+
- DragIt.tab.open.toSource().replace(
- 'try {',
- 'try { TreeStyleTabService.readyToOpenChildTabNow(gBrowser);'
- )
- );
+ TreeStyleTabUtils.getTreePref('compatibility.DragIt') &&
+ !DragIt.tab.__treestyletab__open) {
+ DragIt.tab.__treestyletab__open = DragIt.tab.open;
+ DragIt.tab.open = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
+ return this.__treestyletab__open(...aArgs);
+ };
}
// Colorful Tabs
- // https://addons.mozilla.org/firefox/addon/1368
+ // https://addons.mozilla.org/firefox/addon/colorfultabs/
if ('colorfulTabs' in window &&
TreeStyleTabUtils.getTreePref('compatibility.ColorfulTabs')) {
let listener = {
@@ -633,25 +225,20 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
}
}
};
- eval('colorfulTabs.show_ctStack = '+
- colorfulTabs.show_ctStack.toSource().replace(
- '.setProperty("display", "-moz-stack", "important")',
- '.display = ""'
- )
- );
document.addEventListener('TabOpen', listener, false);
document.addEventListener('TreeStyleTabAttached', listener, false);
document.addEventListener('TreeStyleTabParted', listener, false);
document.addEventListener('unload', listener, false);
- }
-
- // FLST (Focus Last Selected Tab)
- // https://addons.mozilla.org/firefox/addon/32
- if ('flst' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.FLST')) {
- TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
- return !TreeStyleTabUtils.prefs.getPref('extensions.flst.enabled');
- });
+ // hide separater between the tab bar and the toolbox
+ colorfulTabs.__treestyletab__show_ctStack = colorfulTabs.show_ctStack;
+ colorfulTabs.show_ctStack = function(...aArgs) {
+ if (gBrowser.treeStyleTab.position != 'top')
+ return document.getElementById('colorfulTabsStack').style.setProperty('display', 'none', 'important');
+ return this.__treestyletab__show_ctStack(...aArgs);
+ };
+ setTimeout(function() {
+ colorfulTabs.show_ctStack();
+ }, 0);
}
// Focus Last Selected Tab 0.9.5.x
@@ -665,7 +252,7 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
}
// LastTab
- // https://addons.mozilla.org/firefox/addon/112
+ // https://addons.mozilla.org/firefox/addon/lasttab/
if ('LastTab' in window &&
TreeStyleTabUtils.getTreePref('compatibility.LastTab')) {
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
@@ -677,145 +264,75 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
// https://addons.mozilla.org/firefox/addon/6366
if ('FireGestures' in window &&
TreeStyleTabUtils.getTreePref('compatibility.FireGestures')) {
- eval('FireGestures.onExtraGesture = '+
- FireGestures.onExtraGesture.toSource().replace(
- 'case "keypress-stop":',
- '$&\n' +
- ' TreeStyleTabService.readyToOpenChildTab(gBrowser, true);'
- ).replace(
- 'break;case "gesture-timeout":',
- ' TreeStyleTabService.stopToOpenChildTab(gBrowser);\n' +
- '$&'
- )
- );
- eval('FireGestures._performAction = '+
- FireGestures._performAction.toSource().replace(
- 'gBrowser.loadOneTab(',
- ' TreeStyleTabService.readyToOpenChildTab(gBrowser);\n' +
- '$&'
- )
- );
- eval('FireGestures.openURLsInSelection = '+
- FireGestures.openURLsInSelection.toSource().replace(
- 'var tab =',
- ' if (!TreeStyleTabService.checkToOpenChildTab(gBrowser))\n' +
- ' TreeStyleTabService.readyToOpenChildTab(gBrowser, true);\n' +
- '$&'
- ).replace(
- 'if (!flag)',
- ' if (TreeStyleTabService.checkToOpenChildTab(gBrowser))\n' +
- ' TreeStyleTabService.stopToOpenChildTab(gBrowser);\n' +
- '$&'
- )
- );
- eval('FireGestures.handleEvent = '+
- FireGestures.handleEvent.toSource().replace(
- 'gBrowser.loadOneTab(',
- ' TreeStyleTabService.readyToOpenChildTab(gBrowser);\n' +
- '$&'
- )
- );
- }
-
- // Mouse Gestures Redox
- // http://www.mousegestures.org/
- if ('mgBuiltInFunctions' in window &&
- 'mgLinkInTab' in mgBuiltInFunctions &&
- TreeStyleTabUtils.getTreePref('compatibility.MouseGesturesRedox')) {
- eval('mgBuiltInFunctions.mgLinkInTab = '+
- mgBuiltInFunctions.mgLinkInTab.toSource().replace(
- 'var tab',
- 'TreeStyleTabService.readyToOpenChildTab(gBrowser); $&'
- )
- );
+ FireGestures.__treestyletab__onExtraGesture = FireGestures.onExtraGesture;
+ FireGestures.onExtraGesture = function(aEvent, aGesture, ...aArgs) {
+ switch (aGesture)
+ {
+ case 'keypress-stop':
+ TreeStyleTabService.readyToOpenChildTab(gBrowser, true);
+ break;
+ case 'gesture-timeout':
+ TreeStyleTabService.stopToOpenChildTab(gBrowser);
+ break;
+ }
+ return FireGestures.__treestyletab__onExtraGesture.call(this, aEvent, aGesture, ...aArgs);
+ };
+ FireGestures.__treestyletab__performAction = FireGestures._performAction;
+ FireGestures._performAction = function(aEvent, aCommand, ...aArgs) {
+ switch (aCommand)
+ {
+ case 'FireGestures:OpenLinkInBgTab':
+ case 'FireGestures:OpenLinkInFgTab':
+ TreeStyleTabService.readyToOpenChildTabNow(gBrowser);;
+ break;
+ }
+ return FireGestures.__treestyletab__performAction.call(this, aEvent, aCommand, ...aArgs);
+ };
+ FireGestures.__treestyletab__handleEvent = FireGestures.handleEvent;
+ FireGestures.handleEvent = function(aEvent, ...aArgs) {
+ if (aEvent.type == 'command')
+ TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
+ return FireGestures.__treestyletab__handleEvent.call(this, aEvent, ...aArgs);
+ };
}
// SBM Counter
// http://miniturbo.org/products/sbmcounter/
if ('SBMCounter' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.SBMCounter')) {
- eval('SBMCounter.action = '+
- SBMCounter.action.toSource().replace(
- 'gBrowser.selectedTab = gBrowser.addTab',
- 'TreeStyleTabService.readyToOpenChildTab(gBrowser); $&'
- )
- );
- }
-
- // Aging Tabs
- // https://addons.mozilla.org/firefox/addon/3542
- if ('agingTabs' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.AgingTabs')) {
- eval('agingTabs.setColor = '+
- agingTabs.setColor.toSource().replace(
- '{',
- '{ important = true;'
- )
- );
- }
-
- // Snap Links
- // https://addons.mozilla.org/firefox/addon/4336
- // Snap Links Plus
- // http://snaplinks.mozdev.org/
- if (TreeStyleTabUtils.getTreePref('compatibility.SnapLinks')) {
- if ('executeAction' in window &&
- 'openTabs' in window) {
- eval('window.openTabs = '+
- window.openTabs.toSource().replace(
- /((sContent|gBrowser|getBrowser\(\))\.addTab)/,
- 'TreeStyleTabService.readyToOpenChildTab($2); $1'
- )
- );
- }
- if ('SnapLinks' in window &&
- 'OpenTabs' in SnapLinks) {
- eval('SnapLinks.OpenTabs = '+
- SnapLinks.OpenTabs.toSource().replace(
- /((sContent|gBrowser|getBrowser\(\))\.addTab)/,
- 'TreeStyleTabService.readyToOpenChildTab($2); $1'
- )
- );
- }
+ TreeStyleTabUtils.getTreePref('compatibility.SBMCounter') &&
+ !SBMCounter.__treestyletab__action) {
+ SBMCounter.__treestyletab__action = SBMCounter.action;
+ SBMCounter.action = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
+ return this.__treestyletab__action(...aArgs);
+ };
}
// Mouseless Browsing
- // https://addons.mozilla.org/firefox/addon/879
+ // https://addons.mozilla.org/firefox/addon/mouseless-browsing/
if ('mouselessbrowsing' in window &&
'EventHandler' in mouselessbrowsing &&
TreeStyleTabUtils.getTreePref('compatibility.MouselessBrowsing')) {
- if ('execute' in mouselessbrowsing.EventHandler) {
- eval('mouselessbrowsing.EventHandler.execute = '+
- mouselessbrowsing.EventHandler.execute.toSource().replace(
- '{',
- '{ var Prefs = mlb_common.Prefs;'+
- ' var Utils = mlb_common.Utils;'+
- ' var MlbUtils = mouselessbrowsing.MlbUtils;'
- ).replace(
- /((?:var [^=]+ = )?Utils.openUrlInNewTab\()/g,
- 'TreeStyleTabService.readyToOpenChildTab(); $1'
- )
- );
+ if ('execute' in mouselessbrowsing.EventHandler &&
+ !mouselessbrowsing.EventHandler.__treestyletab__execute) {
+ mouselessbrowsing.EventHandler.__treestyletab__execute = mouselessbrowsing.EventHandler.execute;
+ mouselessbrowsing.EventHandler.execute = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow();
+ return this.__treestyletab__execute(...aArgs);
+ };
}
- if ('openLinkInOtherLocationViaPostfixKey' in mouselessbrowsing.EventHandler) {
- eval('mouselessbrowsing.EventHandler.openLinkInOtherLocationViaPostfixKey = '+
- mouselessbrowsing.EventHandler.openLinkInOtherLocationViaPostfixKey.toSource().replace(
- '{',
- '{ var Prefs = mlb_common.Prefs;'+
- ' var Utils = mlb_common.Utils;'+
- ' var MlbUtils = mouselessbrowsing.MlbUtils;'+
- ' var MlbCommon = mouselessbrowsing.MlbCommon;'+
- ' var ShortcutManager = mlb_common.ShortcutManager;'
- ).replace(
- 'Utils.openUrlInNewTab(',
- 'TreeStyleTabService.readyToOpenChildTab(); $&'
- )
- );
+ if ('openLinkInOtherLocationViaPostfixKey' in mouselessbrowsing.EventHandler &&
+ !mouselessbrowsing.EventHandler.__treestyletab__openLinkInOtherLocationViaPostfixKey) {
+ mouselessbrowsing.EventHandler.__treestyletab__openLinkInOtherLocationViaPostfixKey = mouselessbrowsing.EventHandler.openLinkInOtherLocationViaPostfixKey;
+ mouselessbrowsing.EventHandler.openLinkInOtherLocationViaPostfixKey = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow();
+ return this.__treestyletab__openLinkInOtherLocationViaPostfixKey(...aArgs);
+ };
}
}
// Linky
- // https://addons.mozilla.org/firefox/addon/425
+ // https://addons.mozilla.org/firefox/addon/linky/
if ('LinkyContext' in window &&
'prototype' in LinkyContext &&
TreeStyleTabUtils.getTreePref('compatibility.Linky')) {
@@ -823,176 +340,33 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
for (let i = 0, maxi = methods.length; i < maxi; i++)
{
let method = methods[i];
- if (!(method in LinkyContext.prototype)) continue;
- eval('LinkyContext.prototype.'+method+' = '+
- LinkyContext.prototype[method].toSource().replace(
- '{',
- '{ TreeStyleTabService.readyToOpenChildTabNow(null, true);'
- )
- );
+ if (!(method in LinkyContext.prototype) ||
+ LinkyContext.prototype['__treestyletab__' + method])
+ continue;
+ let orig = LinkyContext.prototype[method];
+ LinkyContext.prototype['__treestyletab__' + method] = orig;
+ LinkyContext.prototype[method] = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow(null, true);
+ return orig.call(this, ...aArgs);
+ };
}
}
// QuickDrag
- // https://addons.mozilla.org/firefox/addon/6912
+ // https://addons.mozilla.org/firefox/addon/quickdrag/
if ('QuickDrag' in window &&
'_loadTab' in QuickDrag &&
- TreeStyleTabUtils.getTreePref('compatibility.QuickDrag')) {
- eval('QuickDrag._loadTab = '+
- QuickDrag._loadTab.toSource().replace(
- /(gBrowser.loadOneTab\()/g,
- 'TreeStyleTabService.readyToOpenChildTab(), $1'
- )
- );
- }
-
- // Autohide
- // http://www.krickelkrackel.de/autohide/
- if ('autoHIDE' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.Autohide')) {
- let autoHideEventListener = {
- handleEvent : function(aEvent)
- {
- switch (aEvent.type)
- {
- case 'TreeStyleTabAutoHideStateChanging':
- if (!window.fullScreen) return;
- if (!aEvent.shown) {
- if (
- autoHIDE.statBar &&
- gBrowser.treeStyleTab.currentTabbarPosition == 'bottom' &&
- !TreeStyleTabUtils.prefs.getPref('extensions.autohide.bars.statBar.always') &&
- TreeStyleTabUtils.prefs.getPref('extensions.autohide.bars.statBar')
- ) {
- autoHIDE.statBar.setAttribute('ahHIDE', true);
- }
- }
- else {
- TreeStyleTabService.getTabStrip(gBrowser).removeAttribute('ahHIDE');
- if (
- autoHIDE.statBar &&
- aTabBrowser.treeStyleTab.currentTabbarPosition == 'bottom' &&
- !TreeStyleTabUtils.prefs.getPref('extensions.autohide.bars.statBar.always') &&
- TreeStyleTabUtils.prefs.getPref('extensions.autohide.bars.statBar')
- ) {
- autoHIDE.statBar.removeAttribute('ahHIDE');
- }
- }
- break;
-
- case 'fullscreen':
- var treeStyleTab = gBrowser.treeStyleTab;
- if (gBrowser.treeStyleTab.currentTabbarPosition != 'top') {
- if (window.fullScreen)
- treeStyleTab.autoHide.endForFullScreen();
- else
- treeStyleTab.autoHide.startForFullScreen();
- }
- break;
-
- case 'unload':
- document.removeEventListener('TreeStyleTabAutoHideStateChanging', this, false);
- document.removeEventListener('unload', this, false);
- document.removeEventListener('fullscreen', this, false);
- break;
- }
- }
- };
- document.addEventListener('TreeStyleTabAutoHideStateChanging', autoHideEventListener, false);
- document.addEventListener('fullscreen', autoHideEventListener, false);
- document.addEventListener('unload', autoHideEventListener, false);
-
- if ('MoveContent' in autoHIDE) {
- eval('autoHIDE.MoveContent = '+autoHIDE.MoveContent.toSource().replace(
- /(;)([^;]*\.setPosition\(0, -\s*ah\.delta\);)/,
- '$1\n' +
- ' if (autoHIDE.winUtil)\n' +
- ' autoHIDE.winUtil.setRedraw(false, false);\n' +
- ' $2\n' +
- ' gBrowser.treeStyleTab.autoHide.extraYOffset = ah.delta;\n' +
- ' window.setTimeout(function() {\n' +
- ' gBrowser.treeStyleTab.autoHide.redrawContentArea();\n' +
- ' if (autoHIDE.winUtil)\n' +
- ' autoHIDE.winUtil.setRedraw(true, false);\n' +
- ' }, 0);'
- ).replace(
- /(;)([^;]*\.setPosition\(0, 0\);)/,
- '$1\n' +
- ' if (autoHIDE.winUtil)\n' +
- ' autoHIDE.winUtil.setRedraw(false, false);\n' +
- ' $2\n' +
- ' gBrowser.treeStyleTab.autoHide.extraYOffset = 0;\n' +
- ' window.setTimeout(function() {\n' +
- ' gBrowser.treeStyleTab.autoHide.redrawContentArea();\n' +
- ' if (autoHIDE.winUtil)\n' +
- ' autoHIDE.winUtil.setRedraw(true, false);\n' +
- ' }, 0);'
- ));
- }
- }
-
-
- // Google Toolbar Sidewiki
- if ('sidewikiWindowHandler' in window &&
- window.sidewikiWindowHandler &&
- sidewikiWindowHandler.barsContainer_ &&
- sidewikiWindowHandler.barsContainer_.geometry_ &&
- sidewikiWindowHandler.barsContainer_.geometry_.__proto__.getWindowSizeForDrawers &&
- TreeStyleTabUtils.getTreePref('compatibility.GoogleToolbar.Sidewiki')) {
- let func = sidewikiWindowHandler.barsContainer_.geometry_.__proto__.getWindowSizeForDrawers.toSource();
- if (func.indexOf('treeStyleTab') < 0) {
- eval('sidewikiWindowHandler.barsContainer_.geometry_.__proto__.getWindowSizeForDrawers = '+func.replace(
- 'return {',
- ' if ("treeStyleTab" in this.topLevelDocument_.getElementById("content")) {\n' +
- ' let b = this.topLevelDocument_.getElementById("content");\n' +
- ' let box = b.mPanelContainer.boxObject;\n' +
- ' return {\n' +
- ' height : box.height,\n' +
- ' width : box.width,\n' +
- ' top : box.y,\n' +
- ' left : box.x,\n' +
- ' right : this.topLevelWindow_.innerWidth - box.x - box.width,\n' +
- ' tabBoxHeight : 0\n' +
- ' };\n' +
- ' }\n' +
- '$&'
- ));
- }
- }
-
-
- // Smoothly Close Tabs
- // https://addons.mozilla.org/firefox/addon/71410
- if ('SMOOTHLYCLOSETABS' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.SmoothlyCloseTabs')) {
- let replaceScrollProps = function(aString) {
- return aString.replace(
- /\.scrollWidth/g,
- '[scrollProp]'
- ).replace(
- /"width"/g,
- 'sizeProp'
- ).replace(
- /\.maxWidth/g,
- '[maxSizeProp]'
- ).replace(
- '{',
- '{\n' +
- ' var scrollProp = gBrowser.treeStyleTab.isVertical ? "scrollHeight" : "scrollWidth" ;\n' +
- ' var sizeProp = gBrowser.treeStyleTab.isVertical ? "height" : "width" ;\n' +
- ' var maxSizeProp = gBrowser.treeStyleTab.isVertical ? "maxHeight" : "maxWidth" ;'
- )
- }
- eval('SMOOTHLYCLOSETABS.shrinkTab = '+
- replaceScrollProps(SMOOTHLYCLOSETABS.shrinkTab.toSource())
- );
- eval('SMOOTHLYCLOSETABS.shrinkTabIcon = '+
- replaceScrollProps(SMOOTHLYCLOSETABS.shrinkTabIcon.toSource())
- );
+ TreeStyleTabUtils.getTreePref('compatibility.QuickDrag') &&
+ !QuickDrag.__treestyletab__loadTab) {
+ QuickDrag.__treestyletab__loadTab = QuickDrag._loadTab;
+ QuickDrag._loadTab = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow();
+ return this.__treestyletab__loadTab(...aArgs);
+ };
}
// Super Tab Mode
- // https://addons.mozilla.org/firefox/addon/13288
+ // https://addons.mozilla.org/firefox/addon/super-tab-mode/
if ('stmM' in window &&
TreeStyleTabUtils.getTreePref('compatibility.STM')) {
var observer = {
@@ -1057,169 +431,111 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
});
}
- // Tab Utilities
- // https://addons.mozilla.org/firefox/addon/59961
+ // Tab Utilities Fixed
+ // https://addons.mozilla.org/firefox/addon/tab-utilities-fixed/
if ('tabutils' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.TabUtilities')) {
+ TreeStyleTabUtils.getTreePref('compatibility.TabUtilitiesFixed')) {
TreeStyleTabService.registerTabFocusAllowance(function(aTabBrowser) {
return TreeStyleTabUtils.prefs.getPref('extensions.tabutils.selectOnClose') == 0;
});
}
// Remove New Tab Button
- // https://addons.mozilla.org/firefox/addon/10535
+ // https://addons.mozilla.org/firefox/addon/remove-new-tab-button/
if (TreeStyleTabUtils.getTreePref('compatibility.RemoveNewTabButton')) {
sv.extensions.isAvailable('remove-new-tab-button at forerunnerdesigns.com', { ok : function() {
document.documentElement.setAttribute(TreeStyleTabService.kHIDE_NEWTAB, true);
}});
}
- // IE Tab Plus
- // https://addons.mozilla.org/firefox/addon/10909/
- if ('IeTab' in window &&
- IeTab.prototype &&
- TreeStyleTabUtils.getTreePref('compatibility.IETabPlus')) {
- if (IeTab.prototype.switchTabEngine)
- eval('IeTab.prototype.switchTabEngine = '+
- IeTab.prototype.switchTabEngine.toSource().replace(
- 'var newTab = ',
- 'TreeStyleTabService.readyToOpenChildTab(); $&'
- )
- );
-
- if (IeTab.prototype.addIeTab)
- eval('IeTab.prototype.addIeTab = '+
- IeTab.prototype.addIeTab.toSource().replace(
- 'var newTab = ',
- 'TreeStyleTabService.readyToOpenChildTab(); $&'
- )
- );
- }
-
- // Locationbar2
- // https://addons.mozilla.org/firefox/addon/locationbar²/
- if ('lb2_alternateStyles' in window &&
- TreeStyleTabUtils.getTreePref('compatibility.Locationbar2')) {
- let listening = false;
- let listener = function(aEvent) {
- switch (aEvent.type)
- {
- case 'unload':
- document.removeEventListener('unload', listener, false);
- document.removeEventListener('beforecustomization', listener, true);
- document.removeEventListener('aftercustomization', listener, false);
- case 'beforecustomization':
- if (gURLBar && listening)
- gURLBar.removeEventListener('click', listener, true);
- listening = false;
- return;
-
- case 'aftercustomization':
- if (gURLBar && !listening) {
- gURLBar.addEventListener('click', listener, true);
- listening = true;
- }
- return;
-
- case 'click':
- if (TreeStyleTabUtils.evaluateXPath(
- 'ancestor-or-self::*['
- +'contains(concat(" ", normalize-space(@class), " "), " textbox-presentation-segment ")'
- +']',
- aEvent.originalTarget,
- Ci.nsIDOMXPathResult.BOOLEAN_TYPE
- ).booleanValue)
- sv.readyToOpenChildTabNow(gBrowser.selectedTab);
- return;
- }
- };
- document.addEventListener('unload', listener, false);
- document.addEventListener('beforecustomization', listener, true);
- document.addEventListener('aftercustomization', listener, false);
- if (gURLBar && !listening) {
- gURLBar.addEventListener('click', listener, true);
- listening = true;
- }
- }
-
// InstaClick
// https://addons.mozilla.org/firefox/addon/instaclick/
if ('instaclick' in window &&
'contentAreaClick2' in window.instaclick &&
- TreeStyleTabUtils.getTreePref('compatibility.InstaClick')) {
- eval('instaclick.contentAreaClick2 = '+
- instaclick.contentAreaClick2.toSource().replace(
- 'gBrowser.loadOneTab(',
- 'TreeStyleTabService.readyToOpenChildTab(); $&'
- )
- );
+ TreeStyleTabUtils.getTreePref('compatibility.InstaClick') &&
+ !instaclick.__treestyletab__contentAreaClick2) {
+ instaclick.__treestyletab__contentAreaClick2 = instaclick.contentAreaClick2;
+ instaclick.contentAreaClick2 = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow();
+ return this.__treestyletab__contentAreaClick2(...aArgs);
+ };
}
// Duplicate This Tab
// https://addons.mozilla.org/firefox/addon/duplicate-this-tab/
if ('duplicatethistab' in window &&
'openLinkWithHistory' in window.duplicatethistab &&
- TreeStyleTabUtils.getTreePref('compatibility.DuplicateThisTab')) {
- eval('duplicatethistab.openLinkWithHistory = '+
- duplicatethistab.openLinkWithHistory.toSource().replace(
- 'var newTab = ',
- 'TreeStyleTabService.readyToOpenChildTab(); $&'
- )
- );
+ TreeStyleTabUtils.getTreePref('compatibility.DuplicateThisTab') &&
+ !duplicatethistab.__treestyletab__openLinkWithHistory) {
+ duplicatethistab.__treestyletab__openLinkWithHistory = duplicatethistab.openLinkWithHistory;
+ duplicatethistab.openLinkWithHistory = function(...aArgs) {
+ gBrowser.treeStyleTab.onBeforeTabDuplicate();
+ return this.__treestyletab__openLinkWithHistory(...aArgs);
+ };
+ duplicatethistab.__treestyletab__duplicateInTab = duplicatethistab.duplicateInTab;
+ duplicatethistab.duplicateInTab = function(...aArgs) {
+ gBrowser.treeStyleTab.onBeforeTabDuplicate();
+ return this.__treestyletab__duplicateInTab(...aArgs);
+ };
}
// Context Search
- // http://www.cusser.net/extensions/contextsearch/
+ // https://addons.mozilla.org/firefox/addon/context-search/
if ('contextsearch' in window &&
'search' in window.contextsearch &&
- TreeStyleTabUtils.getTreePref('compatibility.ContextSearch')) {
- eval('contextsearch.search = '+
- contextsearch.search.toSource().replace(
- 'var newTab = ',
- 'TreeStyleTabService.readyToOpenChildTab(); $&'
- )
- );
+ TreeStyleTabUtils.getTreePref('compatibility.ContextSearch') &&
+ !contextsearch.__treestyletab__search) {
+ contextsearch.__treestyletab__search = contextsearch.search;
+ contextsearch.search = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow();
+ return this.__treestyletab__search(...aArgs);
+ };
}
// Tile Tabs
// https://addons.mozilla.org/firefox/addon/tile-tabs/
if ('tileTabs' in window &&
TreeStyleTabUtils.getTreePref('compatibility.TileTabs')) {
- if ('allocateTab' in window.tileTabs)
- eval('tileTabs.allocateTab = '+
- tileTabs.allocateTab.toSource().replace(
- /(tab = gBrowser.addTab)/g,
- 'TreeStyleTabService.readyToOpenNextSiblingTabNow(); $1'
- )
- );
- if ('doClickBrowser' in window.tileTabs)
- eval('tileTabs.doClickBrowser = '+
- tileTabs.doClickBrowser.toSource().replace(
- /(newTab = gBrowser.loadOneTab)/g,
- 'TreeStyleTabService.readyToOpenNextSiblingTabNow(); $1'
- )
- );
- if ('doDropBrowserTile' in window.tileTabs)
- eval('tileTabs.doDropBrowserTile = '+
- tileTabs.doDropBrowserTile.toSource().replace(
- /(tab = gBrowser.loadOneTab)/g,
- 'TreeStyleTabService.readyToOpenNextSiblingTabNow(), $1'
- )
- );
- if ('menuActions' in window.tileTabs)
- eval('tileTabs.menuActions = '+
- tileTabs.menuActions.toSource().replace(
- /(tab = gBrowser.loadOneTab)/g,
- 'TreeStyleTabService.readyToOpenNextSiblingTabNow(), $1'
- )
- );
- if ('applyLayoutString' in window.tileTabs)
- eval('tileTabs.applyLayoutString = '+
- tileTabs.applyLayoutString.toSource().replace(
- /(tab = gBrowser.loadOneTab)/g,
- 'TreeStyleTabService.readyToOpenNextSiblingTabNow(), $1'
- )
- );
+ if ('allocateTab' in window.tileTabs &&
+ !tileTabs.__treestyletab__allocateTab) {
+ tileTabs.__treestyletab__allocateTab = tileTabs.allocateTab;
+ tileTabs.allocateTab = function(...aArgs) {
+ TreeStyleTabService.readyToOpenNextSiblingTabNow();
+ return this.__treestyletab__allocateTab(...aArgs);
+ };
+ }
+ if ('doClickBrowser' in window.tileTabs &&
+ !tileTabs.__treestyletab__doClickBrowser) {
+ tileTabs.__treestyletab__doClickBrowser = tileTabs.doClickBrowser;
+ tileTabs.doClickBrowser = function(...aArgs) {
+ TreeStyleTabService.readyToOpenNextSiblingTabNow();
+ return this.__treestyletab__doClickBrowser(...aArgs);
+ };
+ }
+ if ('doDropBrowserTile' in window.tileTabs &&
+ !tileTabs.__treestyletab__doDropBrowserTile) {
+ tileTabs.__treestyletab__doDropBrowserTile = tileTabs.doDropBrowserTile;
+ tileTabs.doDropBrowserTile = function(...aArgs) {
+ TreeStyleTabService.readyToOpenNextSiblingTabNow();
+ return this.__treestyletab__doDropBrowserTile(...aArgs);
+ };
+ }
+ if ('menuActions' in window.tileTabs &&
+ !tileTabs.__treestyletab__menuActions) {
+ tileTabs.__treestyletab__menuActions = tileTabs.menuActions;
+ tileTabs.menuActions = function(...aArgs) {
+ TreeStyleTabService.readyToOpenNextSiblingTabNow();
+ return this.__treestyletab__menuActions(...aArgs);
+ };
+ }
+ if ('applyLayoutString' in window.tileTabs &&
+ !tileTabs.__treestyletab__applyLayoutString) {
+ tileTabs.__treestyletab__applyLayoutString = tileTabs.applyLayoutString;
+ tileTabs.applyLayoutString = function(...aArgs) {
+ TreeStyleTabService.readyToOpenNextSiblingTabNow();
+ return this.__treestyletab__applyLayoutString(...aArgs);
+ };
+ }
}
window.setTimeout(function(aSelf) {
@@ -1239,71 +555,35 @@ TreeStyleTabWindowHelper.overrideExtensionsDelayed = function TSTWH_overrideExte
gBrowser.treeStyleTab.initTabAttributes(t);
gBrowser.treeStyleTab.initTabContentsOrder(t);
- eval('gBrowser.openInverseLink = '+
- gBrowser.openInverseLink.toSource().replace(
- /(var newTab)/,
- 'TreeStyleTabService.readyToOpenChildTab(aTab); $1'
- )
- );
-
- eval('gBrowser.TMP_openTabNext = '+
- gBrowser.TMP_openTabNext.toSource().replace(
- 'this.mCurrentTab._tPos + this.tabContainer.nextTab',
- ' (function() {\n' +
- ' var tabs = this.treeStyleTab.getDescendantTabs(this.mCurrentTab);\n' +
- ' if (tabs.length) {\n' +
- ' var index = TreeStyleTabUtils.prefs.getPref("extensions.tabmix.openTabNextInverse") ?\n' +
- ' tabs[tabs.length - 1]._tPos :\n' +
- ' this.mCurrentTab._tPos ;\n' +
- ' if (index < aTab._tPos) index++;\n' +
- ' return index;\n' +
- ' }\n' +
- ' else {\n' +
- ' return ($&);\n' +
- ' }\n' +
- ' }).call(this)'
- )
- );
+ gBrowser.__treestyletab__openInverseLink = gBrowser.openInverseLink;
+ gBrowser.openInverseLink = function(...aArgs) {
+ TreeStyleTabService.readyToOpenChildTabNow(gBrowser);
+ return this.__treestyletab__openInverseLink(...aArgs);
+ };
gBrowser.treeStyleTab.internallyTabMovingCount--;
}
- // Multi Links
- // https://addons.mozilla.org/firefox/addon/13494
+ // Multi Links Plus
+ // https://addons.mozilla.org/firefox/addon/multi-links-plus/
if ('MultiLinks_Wrapper' in window &&
'LinksManager' in MultiLinks_Wrapper &&
'OpenInNewTabs' in MultiLinks_Wrapper.LinksManager &&
- TreeStyleTabUtils.getTreePref('compatibility.MultiLinks')) {
- eval('MultiLinks_Wrapper.LinksManager.OpenInNewTabs = '+
- MultiLinks_Wrapper.LinksManager.OpenInNewTabs.toSource().replace(
- '{',
- '{\n' +
- ' if (!TreeStyleTabService.checkToOpenChildTab(getBrowser()))\n' +
- ' TreeStyleTabService.readyToOpenChildTab(getBrowser(), true);'
- ).replace(
- /(\}\)?)$/,
- ' if (TreeStyleTabService.checkToOpenChildTab(getBrowser()))\n' +
- ' TreeStyleTabService.stopToOpenChildTab(getBrowser());\n' +
- '$1'
- )
- );
- }
-
- // DomainTab
- // https://addons.mozilla.org/firefox/addon/13906/
- if ('domaintab' in window &&
- 'TMP_howToOpen' in domaintab &&
- TreeStyleTabUtils.getTreePref('compatibility.DomainTab')) {
- eval('domaintab.TMP_howToOpen = '+
- domaintab.TMP_howToOpen.toSource().replace(
- /(domaintab.DT_openNewTabWith\()/g,
- 'TreeStyleTabService.readyToOpenChildTab(); $1'
- )
- );
+ !MultiLinks_Wrapper.LinksManager.__treestyletab__OpenInNewTabs &&
+ TreeStyleTabUtils.getTreePref('compatibility.MultiLinksPlus')) {
+ MultiLinks_Wrapper.LinksManager.__treestyletab__OpenInNewTabs = MultiLinks_Wrapper.LinksManager.OpenInNewTabs;
+ MultiLinks_Wrapper.LinksManager.OpenInNewTabs = function(...aArgs) {
+ if (!TreeStyleTabService.checkToOpenChildTab(getBrowser()))
+ TreeStyleTabService.readyToOpenChildTab(getBrowser(), true);
+ var result = this.__treestyletab__OpenInNewTabs(...aArgs);
+ if (TreeStyleTabService.checkToOpenChildTab(getBrowser()))
+ TreeStyleTabService.stopToOpenChildTab(getBrowser());
+ return result;
+ };
}
// Personal Titlebar
- // https://addons.mozilla.org/irefox/addon/personal-titlebar/
+ // https://addons.mozilla.org/firefox/addon/personal-titlebar/
if (document.getElementById('personal-titlebar') &&
TreeStyleTabUtils.getTreePref('compatibility.PersonalTitlebar')) {
let titlebar = document.getElementById('titlebar');
@@ -1350,64 +630,6 @@ TreeStyleTabWindowHelper.overrideExtensionsDelayed = function TSTWH_overrideExte
titlebar.addEventListener('DOMAttrModified', listener, true);
}
- // TotalToolbar
- // http://totaltoolbar.mozdev.org/
- {
- let menu = document.getElementById('tt-toolbar-properties') &&
- TreeStyleTabUtils.getTreePref('compatibility.TotalToolbar');
- if (menu) {
- let tabbarToolboxes = ['tt-toolbox-tabright', 'tt-toolbox-tableft']
- .map(document.getElementById, document)
- .filter(function(aToolbox) { return aToolbox; });
- let listener = {
- handleEvent : function(aEvent)
- {
- var sv = TreeStyleTabService;
- switch (aEvent.type)
- {
- case 'command':
- gBrowser.treeStyleTab.updateFloatingTabbar(sv.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
- break;
-
- case 'beforecustomization':
- for (let i = 0, maxi = tabbarToolboxes.length; i < maxi; i++)
- {
- tabbarToolboxes[i].removeAttribute('collapsed');
- }
- break;
-
- case 'aftercustomization':
- for (let i = 0, maxi = tabbarToolboxes.length; i < maxi; i++)
- {
- let toolbox = tabbarToolboxes[i];
- if (!toolbox.firstChild.hasChildNodes())
- toolbox.setAttribute('collapsed', true);
- }
- break;
-
- case 'unload':
- menu.removeEventListener('command', this, true);
- document.removeEventListener('beforecustomization', listener, true);
- document.removeEventListener('aftercustomization', listener, false);
- document.removeEventListener('unload', this, false);
- menu = null;
- break;
- }
- }
- };
- menu.addEventListener('command', listener, false);
- document.addEventListener('beforecustomization', listener, true);
- document.addEventListener('aftercustomization', listener, false);
- document.addEventListener('unload', listener, false);
- for (let i = 0, maxi = tabbarToolboxes.length; i < maxi; i++)
- {
- let toolbox = tabbarToolboxes[i];
- if (!toolbox.firstChild.hasChildNodes())
- toolbox.setAttribute('collapsed', true);
- }
- }
- }
-
// Tab Control
// https://addons.mozilla.org/firefox/addon/tab-control/
if (
diff --git a/defaults/preferences/treestyletab.js b/defaults/preferences/treestyletab.js
index 8292027..3932068 100644
--- a/defaults/preferences/treestyletab.js
+++ b/defaults/preferences/treestyletab.js
@@ -537,6 +537,12 @@ pref("extensions.treestyletab.autoAttach.goButton", 1);
pref("extensions.treestyletab.autoAttach.fromCurrent", 1);
/**
+ * If true, TST controls position of a newly opened tab by self.
+ * You should turn this false if you want to use any other addon which controls new tab positions.
+ */
+pref("extensions.treestyletab.controlNewTabPosition", true);
+
+/**
* Focus targets for Ctrl-Tab/Ctrl-Shift-Tab.
* 0 = Focus to both visible and collapsed tabs. (If a collapsed tab is
* focused, the tree will be expanded by another pref "autoExpandSubtreeOnCollapsedChildFocused".
@@ -666,62 +672,46 @@ pref("extensions.treestyletab.groupTab.columnize", true);
pref("extensions.treestyletab.groupTab.columnize.width", "20em");
/**
+ * If true, TST automatically disables Tabs in Titlebar appearance to avoid
+ * broken appearance problems.
+ */
+pref("extensions.treestyletab.blockTabsInTitlebar", true);
+
+/**
* Compatibility hack flags for other addons. They can be disabled by each
* addon, when the addon become working with TST without dirty hacks.
* In other words, add-on authros can disable TST's dirty hack if it is
* obsolete.
*/
-pref("extensions.treestyletab.compatibility.AgingTabs", true);
-pref("extensions.treestyletab.compatibility.AIOS", true); // All-in-One Sidebar
-pref("extensions.treestyletab.compatibility.Autohide", true);
pref("extensions.treestyletab.compatibility.ClassicThemeRestorer", true);
pref("extensions.treestyletab.compatibility.ColorfulTabs", true);
pref("extensions.treestyletab.compatibility.ContextSearch", true);
-pref("extensions.treestyletab.compatibility.DomainTab", true);
-pref("extensions.treestyletab.compatibility.DragDeGo", true);
pref("extensions.treestyletab.compatibility.DragIt", true);
-pref("extensions.treestyletab.compatibility.DragNDropToolbars", true);
pref("extensions.treestyletab.compatibility.DuplicateInTabContext", true);
pref("extensions.treestyletab.compatibility.DuplicateThisTab", true);
pref("extensions.treestyletab.compatibility.FirefoxSync", true);
pref("extensions.treestyletab.compatibility.FireGestures", true);
-pref("extensions.treestyletab.compatibility.FLST", true);
pref("extensions.treestyletab.compatibility.FocusLastSelectedTab", true);
-pref("extensions.treestyletab.compatibility.FullerScreen", true);
-pref("extensions.treestyletab.compatibility.GoogleToolbar.Sidewiki", true);
pref("extensions.treestyletab.compatibility.Greasemonkey", true);
-pref("extensions.treestyletab.compatibility.Highlander", true);
-pref("extensions.treestyletab.compatibility.IETabPlus", true);
pref("extensions.treestyletab.compatibility.InstaClick", true);
pref("extensions.treestyletab.compatibility.LastTab", true);
pref("extensions.treestyletab.compatibility.Linky", true);
-pref("extensions.treestyletab.compatibility.Locationbar2", true);
-pref("extensions.treestyletab.compatibility.MouseGesturesRedox", true);
pref("extensions.treestyletab.compatibility.MouselessBrowsing", true);
-pref("extensions.treestyletab.compatibility.MultiLinks", true);
-pref("extensions.treestyletab.compatibility.NavbarOnTitlebar", true);
-pref("extensions.treestyletab.compatibility.OptimozTweaks", true);
-pref("extensions.treestyletab.compatibility.PermaTabs", true);
+pref("extensions.treestyletab.compatibility.MultiLinksPlus", true);
pref("extensions.treestyletab.compatibility.PersonalTitlebar", true);
pref("extensions.treestyletab.compatibility.QuickDrag", true);
pref("extensions.treestyletab.compatibility.RemoveNewTabButton", true);
pref("extensions.treestyletab.compatibility.SBMCounter", true);
pref("extensions.treestyletab.compatibility.Scriptish", false);
pref("extensions.treestyletab.compatibility.SelectionLinks", true);
-pref("extensions.treestyletab.compatibility.SessionManager", true);
-pref("extensions.treestyletab.compatibility.SmoothlyCloseTabs", true);
-pref("extensions.treestyletab.compatibility.SnapLinks", true);
pref("extensions.treestyletab.compatibility.STM.warnForNewTabPosition", true);
pref("extensions.treestyletab.compatibility.STM", true); // Super Tab Mode
-pref("extensions.treestyletab.compatibility.SuperDragAndGo", true);
-pref("extensions.treestyletab.compatibility.Tabberwocky", true);
pref("extensions.treestyletab.compatibility.TabControl", true);
pref("extensions.treestyletab.compatibility.TabsOnBottom", true);
-pref("extensions.treestyletab.compatibility.TabUtilities", true);
+pref("extensions.treestyletab.compatibility.TabUtilitiesFixed", true);
pref("extensions.treestyletab.compatibility.TileTabs", true);
pref("extensions.treestyletab.compatibility.TMP", true); // Tab Mix Plus
pref("extensions.treestyletab.compatibility.TooManyTabs", true);
-pref("extensions.treestyletab.compatibility.TotalToolbar", true);
/**
* The internal version of TST preferences. Don't change this by hand, because
diff --git a/install.rdf b/install.rdf
index 121965c..8914cc1 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.17.2016031101"
+ em:version="0.18.2016090601"
em:creator="YUKI "Piro" Hiroshi"
em:description="Show tabs like a tree."
em:homepageURL="http://piro.sakura.ne.jp/xul/_treestyletab.html.en"
@@ -33,6 +33,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
</RDF:Description>
</em:localized>
<em:localized>
@@ -49,6 +50,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
</RDF:Description>
</em:localized>
<em:localized>
@@ -65,6 +67,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Godai71.Extenzilla (it-IT locale)</em:translator>
</RDF:Description>
</em:localized>
@@ -82,6 +85,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Fatiaomao (zh-CN locale)</em:translator>
<em:translator>hzhbest (zh-CN locale)</em:translator>
</RDF:Description>
@@ -100,6 +104,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>tito (es-ES locale)</em:translator>
</RDF:Description>
</em:localized>
@@ -117,6 +122,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Andy Pillip (de-DE locale)</em:translator>
<em:translator>Björn Kautler (de-DE locale)</em:translator>
</RDF:Description>
@@ -135,6 +141,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>HkYtrewq (zh-TW locale)</em:translator>
<em:translator>Tsprajna (zh-TW locale)</em:translator>
<em:translator>bootleq (zh-TW locale)</em:translator>
@@ -154,6 +161,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>L'Autour (ru locale)</em:translator>
<em:translator>Infocatcher (ru locale)</em:translator>
</RDF:Description>
@@ -172,6 +180,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Leszek(teo)Życzkowski (pl locale)</em:translator>
</RDF:Description>
</em:localized>
@@ -189,6 +198,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Laurent Haas (fr-FR locale)</em:translator>
<em:translator>AxlMun (fr-FR locale)</em:translator>
</RDF:Description>
@@ -207,6 +217,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Mikael Hiort af Ornäs (sv-SE)</em:translator>
</RDF:Description>
</em:localized>
@@ -224,6 +235,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Regmos (da-DK)</em:translator>
</RDF:Description>
</em:localized>
@@ -241,6 +253,7 @@
<em:contributor>mnoorenberghe (Firefox 36 support)</em:contributor>
<em:contributor>Xidorn Quan (Firefox 40+ support)</em:contributor>
<em:contributor>J. Ryan Stinnett (bug fix around tearing off of multiple tabs)</em:contributor>
+ <em:contributor>lv7777</em:contributor>
<em:translator>Vlastimil Ovčáčík (cs)</em:translator>
</RDF:Description>
</em:localized>
@@ -248,8 +261,8 @@
<em:targetApplication>
<RDF:Description em:id="{ec8030f7-c20a-464f-9b0e-13a3a9e97384}"
- em:minVersion="38.0"
- em:maxVersion="48.0a1" />
+ em:minVersion="45.0"
+ em:maxVersion="51.0a1" />
</em:targetApplication>
</RDF:Description>
</RDF:RDF>
diff --git a/modules/autoHide.js b/modules/autoHide.js
index f1b4fac..8d88e04 100644
--- a/modules/autoHide.js
+++ b/modules/autoHide.js
@@ -42,6 +42,7 @@ const Cu = Components.utils;
Cu.import('resource://gre/modules/XPCOMUtils.jsm');
Cu.import('resource://gre/modules/Services.jsm');
+Cu.import('resource://gre/modules/Timer.jsm');
Cu.import('resource://treestyletab-modules/lib/inherit.jsm');
Cu.import('resource://treestyletab-modules/constants.js');
Cu.import('resource://treestyletab-modules/ReferenceCounter.js');
@@ -289,6 +290,7 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
},
set tabbarWidth(aValue)
{
+ log('setting "width" to '+aValue+' (expanded='+this.expanded+')');
if (this.expanded)
return this.expandedWidth = aValue;
else
@@ -303,16 +305,9 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
},
set expandedWidth(aValue)
{
- var newWidth = this.treeStyleTab.calculateCorrectExpandedAndShrunkenWidth({
- expanded : aValue,
- shrunken : this.shrunkenWidth
- }, 'expanded');
- if (newWidth.corrected) {
- this.shrunkenWidth = newWidth.shrunken;
- aValue = newWidth.expanded;
- }
this.treeStyleTab.setWindowValue(this.kTABBAR_EXPANDED_WIDTH, aValue);
utils.setTreePref('tabbar.width', aValue);
+ this.reserveFixWidth('expanded');
return aValue;
},
get shrunkenWidth()
@@ -324,19 +319,30 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
},
set shrunkenWidth(aValue)
{
- var newWidth = this.treeStyleTab.calculateCorrectExpandedAndShrunkenWidth({
- expanded : this.expandedWidth,
- shrunken : aValue
- }, 'shrunken');
- if (newWidth.corrected) {
- this.expandedWidth = newWidth.expanded;
- aValue = newWidth.shrunken;
- }
this.treeStyleTab.setWindowValue(this.kTABBAR_SHRUNKEN_WIDTH, aValue);
utils.setTreePref('tabbar.shrunkenWidth', aValue);
+ this.reserveFixWidth('shrunken');
return aValue;
},
+ reserveFixWidth : function(aTrigger)
+ {
+ if (this._collectingTabbarWidth)
+ clearTimeout(this._collectingTabbarWidth);
+ var stack = new Error().stack;
+ this._collectingTabbarWidth = setTimeout((function() {
+ log('reserveFixWidth: \n'+stack);
+ var newWidth = this.treeStyleTab.calculateCorrectExpandedAndShrunkenWidth({
+ expanded : this.expandedWidth,
+ shrunken : this.shrunkenWidth
+ }, aTrigger);
+ if (this.shrunkenWidth != newWidth.shrunken)
+ this.shrunkenWidth = newWidth.shrunken;
+ if (this.expandedWidth != newWidth.expanded)
+ this.expandedWidth = newWidth.expanded;
+ }).bind(this), 100);
+ },
+
resetWidth : function AHB_resetWidth()
{
this.expandedWidth = utils.getTreePref('tabbar.width.default');
@@ -767,6 +773,9 @@ AutoHideBrowser.prototype = inherit(AutoHideBase.prototype, {
!utils.getTreePref('tabbar.autoShow.feedback'))
return;
+ if (aTab.pinned || aTab.hidden)
+ return;
+
var w = this.window;
if (this.delayedShowForFeedbackTimer) {
w.clearTimeout(this.delayedShowForFeedbackTimer);
diff --git a/modules/base.js b/modules/base.js
index 3c13734..6fb48a7 100644
--- a/modules/base.js
+++ b/modules/base.js
@@ -654,12 +654,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
catch(e) {
}
- if (this.useTMPSessionAPI) {
- let TMPValue = aTab.getAttribute(this.kTMP_SESSION_DATA_PREFIX+aKey);
- if (TMPValue)
- value = TMPValue;
- }
-
return value;
},
@@ -676,9 +670,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
catch(e) {
}
- if (this.useTMPSessionAPI)
- aTab.setAttribute(this.kTMP_SESSION_DATA_PREFIX+aKey, aValue);
-
return aValue;
},
@@ -692,9 +683,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
}
catch(e) {
}
-
- if (this.useTMPSessionAPI)
- aTab.removeAttribute(this.kTMP_SESSION_DATA_PREFIX+aKey);
},
// workaround for http://piro.sakura.ne.jp/latest/blosxom/mozilla/extension/treestyletab/2009-09-29_debug.htm
@@ -729,10 +717,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
this.deleteTabValue(aTabs[i], this.kCLOSED_SET_ID);
}
},
-
- useTMPSessionAPI : false,
-
- kTMP_SESSION_DATA_PREFIX : 'tmp-session-data-',
// tab
@@ -1016,7 +1000,8 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
var currentBrowser = this.browser.selectedTab.linkedBrowser;
if (!aTarget)
return currentBrowser;
- if (aTarget == '[object XULElement]') {
+ var stringifiedTarget = aTarget.toString();
+ if (stringifiedTarget == '[object XULElement]') {
if (aTarget.localName == 'tab')
return aTarget.linkedBrowser;
@@ -1029,7 +1014,8 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
else
return null;
}
- if (aTarget == '[object Window]' || aTarget == '[object ChromeWindow]') {
+ if (stringifiedTarget == '[object Window]' ||
+ stringifiedTarget == '[object ChromeWindow]') {
let tab = this.getTabFromFrame(aTarget, this.getTabBrowserFromFrame(aTarget));
if (tab)
return tab.linkedBrowser;
@@ -1307,11 +1293,16 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
/* notify "ready to open child tab(s)" */
- readyToOpenChildTab : function TSTBase_readyToOpenChildTab(aTabOrSomething, aMultiple, aInsertBefore) /* PUBLIC API */
+ readyToOpenChildTab : function TSTBase_readyToOpenChildTab(aTabOrSomething, aMultiple, aOptions) /* PUBLIC API */
{
if (!utils.getTreePref('autoAttach'))
return false;
+ if (!aOptions)
+ aOptions = {};
+ if (aOptions instanceof Ci.nsIDOMElement) // for backward compatibility
+ aOptions = { insertBefore : aOptions };
+
var browser = this.getBrowserFromTabBrowserElements(aTabOrSomething);
if (!browser)
return false;
@@ -1325,10 +1316,15 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
ownerBrowser.treeStyleTab.ensureTabInitialized(parentTab);
var parentId = parentTab.getAttribute(this.kID);
- var refId = null;
- if (aInsertBefore) {
+ var insertBefore = null;
+ if (aOptions.insertBefore) {
+ ownerBrowser.treeStyleTab.ensureTabInitialized(parentTab);
+ insertBefore = aOptions.insertBefore.getAttribute(this.kID);
+ }
+ var insertAfter = null;
+ if (aOptions.insertAfter) {
ownerBrowser.treeStyleTab.ensureTabInitialized(parentTab);
- refId = aInsertBefore.getAttribute(this.kID);
+ insertAfter = aOptions.insertAfter.getAttribute(this.kID);
}
logWithStackTrace('new child tab is requested.');
@@ -1337,7 +1333,8 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
ownerBrowser.treeStyleTab.readiedToAttachMultiple = aMultiple || false ;
ownerBrowser.treeStyleTab.multipleCount = aMultiple ? 0 : -1 ;
ownerBrowser.treeStyleTab.parentTab = parentId;
- ownerBrowser.treeStyleTab.insertBefore = refId;
+ ownerBrowser.treeStyleTab.insertBefore = insertBefore;
+ ownerBrowser.treeStyleTab.insertAfter = insertAfter;
return true;
},
@@ -1410,13 +1407,16 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
return false;
var parentTab = this.getParentTab(tab);
- var nextTab = this.getNextSiblingTab(tab);
+ var nextTab = this.getNextSiblingTab(tab) || this.getNextTab(tab);
if (parentTab) {
/**
* If the base tab has a parent, open the new tab as a child of
* the parent tab.
*/
- return this.readyToOpenChildTab(parentTab, false, nextTab);
+ return this.readyToOpenChildTab(parentTab, false, {
+ insertBefore : nextTab,
+ insertAfter : tab
+ });
}
else {
/**
@@ -1513,6 +1513,7 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
delete ownerBrowser.treeStyleTab.multipleCount;
delete ownerBrowser.treeStyleTab.parentTab;
delete ownerBrowser.treeStyleTab.insertBefore;
+ delete ownerBrowser.treeStyleTab.insertAfter;
delete ownerBrowser.treeStyleTab.treeStructure;
delete ownerBrowser.treeStyleTab.shouldExpandAllTree;
@@ -2246,10 +2247,6 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
Services.obs.notifyObservers(null, this.kTOPIC_INDENT_MODIFIED, value);
return;
- case 'extensions.treestyletab.tabbar.width':
- case 'extensions.treestyletab.tabbar.shrunkenWidth':
- return this.correctMismatchedTabWidthPrefs(aPrefName);
-
case 'extensions.stm.tabBarMultiRows': // Super Tab Mode
if (this.prefOverriding)
return;
@@ -2319,6 +2316,7 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
},
calculateCorrectExpandedAndShrunkenWidth : function TSTBase_calculateCorrectExpandedAndShrunkenWidth(aSource, aModifiedTarget)
{
+ log('calculateCorrectExpandedAndShrunkenWidth '+JSON.stringify(aSource)+' / '+aModifiedTarget);
var size = {
expanded : aSource.expanded,
shrunken : aSource.shrunken,
@@ -2328,6 +2326,7 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
var originalShrunken = size.shrunken;
var maxSize = this.browserWindow.gBrowser.boxObject.width * this.MAX_TABBAR_SIZE_RATIO;
if (aModifiedTarget.indexOf('shrunken') > -1) {
+ log('fixsing expanded size');
if (size.expanded <= size.shrunken)
size.expanded = parseInt(size.shrunken / this.DEFAULT_SHRUNKEN_WIDTH_RATIO);
if (size.expanded > maxSize) {
@@ -2337,6 +2336,7 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
}
}
else {
+ log('fixsing shrunken size');
if (size.expanded > maxSize)
size.expanded = maxSize;
if (size.expanded <= size.shrunken)
@@ -2348,6 +2348,7 @@ var TreeStyleTabBase = inherit(TreeStyleTabConstants, {
size.expanded != originalExpanded ||
size.shrunken != originalShrunken
);
+ log(' => '+JSON.stringify(size));
return size;
},
diff --git a/modules/bookmark.js b/modules/bookmark.js
index 943d25c..9861c62 100644
--- a/modules/bookmark.js
+++ b/modules/bookmark.js
@@ -476,7 +476,7 @@ PlacesUIUtils.openContainerNodeInTabs = function(aNode, ...aArgs) {
};
PlacesUIUtils.__treestyletab__openURINodesInTabs = PlacesUIUtils.openURINodesInTabs;
-PlacesUIUtils.openURINodesInTabs = function(aNode, ...aArgs) {
+PlacesUIUtils.openURINodesInTabs = function(aNodes, ...aArgs) {
try {
this.__treestyletab__openTabset_rawNodes = aNodes;
this.__treestyletab__folderName = utils.treeBundle.getFormattedString(
@@ -485,7 +485,7 @@ PlacesUIUtils.openURINodesInTabs = function(aNode, ...aArgs) {
'openSelectedPlaces.history',
[aNodes[0].title, aNodes.length]
);
- return this.__treestyletab__openURINodesInTabs.apply(this, [aNode].concat(aArgs));
+ return this.__treestyletab__openURINodesInTabs.apply(this, [aNodes].concat(aArgs));
}
finally {
delete this.__treestyletab__openTabset_rawNodes;
diff --git a/modules/browser.js b/modules/browser.js
index 12bba3f..ba9a678 100644
--- a/modules/browser.js
+++ b/modules/browser.js
@@ -21,6 +21,7 @@
* wanabe <https://github.com/wanabe>
* Tetsuharu OHZEKI <https://github.com/saneyuki>
* Xidorn Quan <https://github.com/upsuper> (Firefox 40+ support)
+ * lv7777 (https://github.com/lv7777)
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -56,6 +57,7 @@ XPCOMUtils.defineLazyModuleGetter(this, 'TabpanelDNDObserver', 'resource://trees
XPCOMUtils.defineLazyModuleGetter(this, 'AutoHideBrowser', 'resource://treestyletab-modules/autoHide.js');
XPCOMUtils.defineLazyModuleGetter(this, 'ContentBridge', 'resource://treestyletab-modules/contentBridge.js');
XPCOMUtils.defineLazyModuleGetter(this, 'BrowserUIShowHideObserver', 'resource://treestyletab-modules/browserUIShowHideObserver.js');
+XPCOMUtils.defineLazyModuleGetter(this, 'TabAttributesObserver', 'resource://treestyletab-modules/tabAttributesObserver.js');
XPCOMUtils.defineLazyModuleGetter(this, 'TabContentsObserver', 'resource://treestyletab-modules/tabContentsObserver.js');
XPCOMUtils.defineLazyModuleGetter(this, 'visuallyselectedTabs', 'resource://treestyletab-modules/lib/visuallyselectedTabs.jsm');
@@ -67,6 +69,15 @@ XPCOMUtils.defineLazyGetter(this, 'prefs', function() {
Cu.import('resource://treestyletab-modules/lib/prefs.js');
return window['piro.sakura.ne.jp'].prefs;
});
+XPCOMUtils.defineLazyGetter(this, 'ContextualIdentityService', function() {
+ try {
+ Cu.import('resource://gre/modules/ContextualIdentityService.jsm');
+ return ContextualIdentityService;
+ }
+ catch(e) {
+ return null;
+ }
+});
function wait(aMilliSeconds) {
return new Promise(function(aResolve, aReject) {
@@ -665,9 +676,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let style = item.style;
style.MozMarginStart = '';
- let transitionStyleBackup = style.transition || style.MozTransition || '';
+ let transitionStyleBackup = style.transition || '';
if (aJustNow)
- style.MozTransition = style.transition = 'none';
+ style.transition = 'none';
let className = item.className.replace(removeFaviconizedClassPattern, '');
if (faviconized)
@@ -689,7 +700,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
// "transition" must be cleared after the reflow.
this.timers[key] = setTimeout((function() {
try {
- style.MozTransition = style.transition = transitionStyleBackup;
+ style.transition = transitionStyleBackup;
}
catch(e) {
this.defaultErrorHandler(e);
@@ -878,6 +889,14 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
this._initTabbrowserContextMenu();
w.TreeStyleTabWindowHelper.updateTabDNDObserver(b);
+ this.tabsAttributeObserver = new TabAttributesObserver({
+ container : b.mTabContainer,
+ attributes : 'usercontextid',
+ callback : (function(aTab) {
+ this.onTabContextIdChanged(aTab);
+ }).bind(this)
+ });
+
this.getAllTabs(b).forEach(this.initTab, this);
this.allowSubtreeCollapseExpand = true; // reset attribute
@@ -980,7 +999,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let insertAfter = item.getAttribute('multipletab-insertafter');
if (insertAfter) {
try {
- eval('refNode = ('+insertAfter+').nextSibling');
+ refNode = utils.evaluateXPath(
+ insertAfter.replace(/^\s*xpath:\s*/i, ''),
+ tabContextMenu,
+ Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE
+ ).singleNodeValue;
+ if (refNode) refNode = refNode.nextSibling;
}
catch(e) {
}
@@ -988,7 +1012,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let insertBefore = item.getAttribute('multipletab-insertbefore');
if (refNode === void(0) && insertBefore) {
try {
- eval('refNode = '+insertBefore);
+ refNode = utils.evaluateXPath(
+ insertBefore.replace(/^\s*xpath:\s*/i, ''),
+ tabContextMenu,
+ Ci.nsIDOMXPathResult.FIRST_ORDERED_NODE_TYPE
+ ).singleNodeValue;
}
catch(e) {
}
@@ -1107,6 +1135,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
aTab.__treestyletab__contentBridge = new ContentBridge(aTab, this.mTabBrowser);
this.autoHide.notifyStatusToTab(aTab);
+
+ this.onTabContextIdChanged(aTab);
},
isTabInitialized : function TSTBrowser_isTabInitialized(aTab)
@@ -2122,6 +2152,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
else
this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE);
+ this.updateTabbarOverflow();
+
this.notifyingRenderedEvent = true;
var event = d.createEvent('Events');
event.initEvent(this.kEVENT_TYPE_TABBAR_RENDERED, true, false);
@@ -2284,6 +2316,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
updateTabbarOverflow : function TSTBrowser_updateTabbarOverflow()
{
+ log('updateTabbarOverflow');
var d = this.document;
var b = this.mTabBrowser;
b.mTabContainer.removeAttribute('overflow');
@@ -2294,8 +2327,11 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
var scrollBox = this.scrollBox;
scrollBox = d.getAnonymousElementByAttribute(scrollBox, 'anonid', 'scrollbox');
- if (scrollBox)
+ if (scrollBox) {
scrollBox = d.getAnonymousNodes(scrollBox)[0];
+ log('scrollBox.width='+scrollBox.boxObject.width+' > container.width='+container.boxObject.width);
+ log('scrollBox.height='+scrollBox.boxObject.height+' > container.height='+container.boxObject.height);
+ }
if (
scrollBox &&
(
@@ -2303,11 +2339,13 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
scrollBox.boxObject.height > container.boxObject.height
)
) {
+ log(' => overflow');
b.mTabContainer.setAttribute('overflow', true);
if (container != b.mTabContainer)
container.setAttribute('overflow', true);
}
else {
+ log(' => underflow');
b.mTabContainer.removeAttribute('overflow');
if (container != b.mTabContainer)
container.removeAttribute('overflow');
@@ -2783,7 +2821,10 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
case 'extensions.treestyletab.tabbar.width.override':
if (!this.autoHide.isResizing && this.isVertical) {
this.removeTabStripAttribute('width');
- this.tabbarWidth = value;
+ if (aPrefName.indexOf('shrunken') > -1)
+ this.shrunkenWidth = value;
+ else
+ this.expandedWidth = value;
this.setTabStripAttribute('width', this.autoHide.placeHolderWidthFromMode);
this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_PREF_CHANGE);
}
@@ -3223,6 +3264,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
'readiedToAttachNewTab: '+this.readiedToAttachNewTab,
'parentTab: '+this.parentTab + ' (' + this.getTabById(this.parentTab) + ')',
'insertBefore: '+this.insertBefore,
+ 'insertAfter: '+this.insertAfter,
'treeStructure: '+this.treeStructure
].join('\n '));
@@ -3259,10 +3301,17 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
let refTab;
let newIndex = -1;
if (hasStructure) {
+ log(' newIndex => -1 (has structure)');
}
else if (this.insertBefore &&
(refTab = this.getTabById(this.insertBefore))) {
newIndex = refTab._tPos;
+ log(' newIndex => '+newIndex+' (from "insertBefore")');
+ }
+ else if (this.insertAfter &&
+ (refTab = this.getTabById(this.insertAfter))) {
+ newIndex = refTab._tPos + 1;
+ log(' newIndex => '+newIndex+' (from "insertAfter")');
}
else if (
parent &&
@@ -3273,6 +3322,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
子タブの最初の位置に挿入し、続くタブは「最初の開いたタブ」と
「元々最初の子だったタブ」との間に挿入していく */
newIndex = parent._tPos + 1;
+ log(' newIndex => '+newIndex+' (from "parent")');
if (refTab = this.getFirstChildTab(parent))
this.insertBefore = refTab.getAttribute(this.kID);
}
@@ -3676,7 +3726,9 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
var b = this.mTabBrowser;
var prevPosition = aEvent.detail;
- if (tab.__treestyletab__isOpening && !this.isTabInternallyMoving(tab)) {
+ if (tab.__treestyletab__isOpening &&
+ !this.isTabInternallyMoving(tab) &&
+ utils.getTreePref('controlNewTabPosition')) {
log('onTabMove for new child tab: move back '+tab._tPos+' => '+prevPosition);
tab.__treestyletab__internallyTabMovingCount++;
b.moveTabTo(tab, prevPosition);
@@ -3695,6 +3747,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
// twisty vanished after the tab is moved!!
this.initTabContents(tab);
+ this.onTabContextIdChanged(tab);
+
this.window.TreeStyleTabWindowHelper.initTabMethods(tab, b);
// On Firefox 29, 30 and laters, reopened (restored) tab can be
@@ -4106,6 +4160,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
this.restoreTree();
var tab = aEvent.originalTarget;
+ log('onTabRestoring ', tab._tPos);
tab.linkedBrowser.__treestyletab__toBeRestored = false;
var restored = this.handleRestoredTab(tab);
@@ -4656,7 +4711,6 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
{
var behavior = this.undoCloseTabSetBehavior;
if (
- this.useTMPSessionAPI ||
this._restoringClosedSet ||
!(behavior & this.kUNDO_CLOSE_SET || behavior & this.kUNDO_ASK)
)
@@ -4731,10 +4785,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
onTabRestored : function TSTBrowser_onTabRestored(aEvent)
{
- this.updateTabAsParent(aEvent.originalTarget, {
+ var tab = aEvent.originalTarget;
+ log('onTabRestored ', tab._tPos);
+ this.updateTabAsParent(tab, {
dontUpdateCount : true
});
- delete aEvent.originalTarget.__treestyletab__restoredByUndoCloseTab;
+ delete tab.__treestyletab__restoredByUndoCloseTab;
},
onTabPinned : function TSTBrowser_onTabPinned(aTab)
@@ -5074,6 +5130,62 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
return;
}
},
+
+ onTabContextIdChanged : function TSTBrowser_onTabContextIdChanged(aTab)
+ {
+ if (!ContextualIdentityService ||
+ aTab.__treestyletab__updatingContextualTabColor)
+ return;
+
+ aTab.__treestyletab__updatingContextualTabColor = true;
+ setTimeout(function() {
+ aTab.__treestyletab__updatingContextualTabColor = false;
+ }, 1);
+
+ var tabStyle = aTab.style;
+ var tabBackground = aTab.ownerDocument.getAnonymousElementByAttribute(aTab, 'class', 'tab-background');
+ var backgroundStyle = tabBackground && tabBackground.style;
+ function clearOldStyles() {
+ tabStyle.backgroundImage =
+ tabStyle.backgroundSize =
+ tabStyle.backgroundRepeat =
+ tabStyle.backgroundPosition = '';
+ if (backgroundStyle)
+ backgroundStyle.backgroundImage =
+ backgroundStyle.backgroundSize =
+ backgroundStyle.backgroundRepeat =
+ backgroundStyle.backgroundPosition = '';
+ }
+
+ if (!this.isVertical) {
+ clearOldStyles();
+ ContextualIdentityService.setTabStyle(aTab);
+ return;
+ }
+
+ var color;
+ var userContextId = aTab.getAttribute('usercontextid');
+ if (userContextId) {
+ let identity = ContextualIdentityService.getIdentityFromId(userContextId);
+ color = identity ? identity.color : null ;
+ }
+ if (color) {
+ setTimeout(function() {
+ clearOldStyles();
+
+ var style = utils.getTreePref('tabbar.style') == 'sidebar' ? backgroundStyle : tabStyle ;
+ if (!style)
+ style = tabStyle;
+
+ style.setProperty('background-image', 'linear-gradient(to bottom, transparent 0, ' + color + ' 5%, ' + color + ' 95%, transparent 100%)', 'important');
+ style.setProperty('background-size', '2px auto', 'important');
+ style.setProperty('background-repeat', 'no-repeat', 'important');
+ let shouldInvert = this.position == 'right' && utils.getTreePref('tabbar.invertTab');
+ let position = shouldInvert ? 'right' : 'left' ;
+ style.setProperty('background-position', position, 'important');
+ }, 0);
+ }
+ },
onClick : function TSTBrowser_onClick(aEvent)
{
@@ -5523,8 +5635,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
attachTabTo : function TSTBrowser_attachTabTo(aChild, aParent, aInfo) /* PUBLIC API */
{
- if (!aChild.parentNode || (aParent && !aParent.parentNode)) // do nothing for closed tab!
+ if (!aChild.parentNode || (aParent && !aParent.parentNode)) {
+ log('attachTabTo: canceled for already removed tab');
return;
+ }
+
+ log('attachTabTo: attach ', aChild._tPos, ' to ', aParent._tPos);
aInfo = aInfo || {};
var newAncestors = [];
@@ -5551,14 +5667,17 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
aChild.getAttribute('pinned') == 'true' ||
aParent.getAttribute('pinned') == 'true'
) {
+ log('attachTabTo: already attached');
this.fireAttachedEvent(aChild, aParent);
return;
}
// avoid recursive tree
var ancestors = [aParent].concat(this.getAncestorTabs(aChild));
- if (ancestors.indexOf(aChild) > -1)
+ if (ancestors.indexOf(aChild) > -1) {
+ log('attachTabTo: canceled for recursive request');
return;
+ }
currentParent = ancestors[ancestors.length-1];
var shouldInheritIndent = (
@@ -5697,14 +5816,20 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
detachTab : function TSTBrowser_detachTab(aChild, aInfo) /* PUBLIC API */
{
- if (!aChild || !aChild.parentNode)
+ if (!aChild || !aChild.parentNode) {
+ log('detachTab: canceled for already removed tab');
return;
+ }
if (!aInfo)
aInfo = {};
var parentTab = this.getParentTab(aChild);
- if (!parentTab)
+ if (!parentTab) {
+ log('detachTab: canceled for an orphan tab');
return;
+ }
+
+ log('detachTab: detach ', aChild._tPos, ' from ', parentTab._tPos);
if (!aInfo.dontUpdateInsertionPositionInfo)
this.closeUpInsertionPositionInfoAround(aChild);
@@ -5998,7 +6123,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
}
var self = this;
- var CSSTransitionEnabled = ('transition' in aTab.style || 'MozTransition' in aTab.style);
+ var CSSTransitionEnabled = ('transition' in aTab.style);
if (CSSTransitionEnabled) {
aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) {
delete aTab.__treestyletab__updateTabIndentTask;
@@ -6378,6 +6503,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
);
var newTabs = [];
var treeStructure = utils.getTreeStructureFromTabs(aTabs);
+ log('moveTabsInternal: treeStructure ', treeStructure);
// Firefox fails to "move" collapsed tabs. So, expand them first
// and collapse them after they are moved.
@@ -6391,57 +6517,80 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
);
var tabs = this.getTabs(targetBrowser);
- var lastTabIndex = tabs[tabs.length -1]._tPos;
- for (let i in aTabs)
- {
- let tab = aTabs[i];
-
+ var lastExistingTab = tabs[tabs.length - 1];
+ var promisedDuplicatedTabs = [];
+ var delayedPostProcesses = [];
+ aTabs.forEach(function(aTab, aIndex) {
if (shouldResetSelection) {
if ('MultipleTabService' in sourceWindow)
- sourceWindow.MultipleTabService.setSelection(tab, false);
+ sourceWindow.MultipleTabService.setSelection(aTab, false);
else
- tab.removeAttribute('multiselected');
+ aTab.removeAttribute('multiselected');
}
if (aOptions.duplicate) {
- tab = this.duplicateTabAsOrphan(tab);
- newTabs.push(tab);
+ aTab = this.duplicateTabAsOrphan(aTab);
+ aTab.__treestyletab__promisedDuplicatedTab = new Promise(function(aResolve, aReject) {
+ let onTabRestoring = function() {
+ aTab.removeEventListener('SSTabRestoring', onTabRestoring, false);
+ delete aTab.__treestyletab__promisedDuplicatedTab;
+ aResolve(aTab);
+ };
+ aTab.addEventListener('SSTabRestoring', onTabRestoring, false);
+ });
+ newTabs.push(aTab);
+ promisedDuplicatedTabs.push(aTab.__treestyletab__promisedDuplicatedTab);
}
else if (sourceService != this) {
- tab = this.importTab(tab);
- newTabs.push(tab);
+ aTab = this.importTab(aTab);
+ newTabs.push(aTab);
}
- if (shouldResetSelection) {
- if ('MultipleTabService' in sourceWindow)
- sourceWindow.MultipleTabService.setSelection(tab, true);
- else
- tab.setAttribute('multiselected', true);
- }
+ let postProcess = (function(aProcessedTabIndex) {
+ if (shouldResetSelection) {
+ if ('MultipleTabService' in sourceWindow)
+ sourceWindow.MultipleTabService.setSelection(aTab, true);
+ else
+ aTab.setAttribute('multiselected', true);
+ }
- lastTabIndex++;
+ let newIndex = aOptions.insertBefore ?
+ aOptions.insertBefore._tPos :
+ lastExistingTab._tPos + aProcessedTabIndex + 1 ;
+ if (newIndex > aTab._tPos)
+ newIndex--;
- let newIndex = aOptions.insertBefore ? aOptions.insertBefore._tPos : lastTabIndex ;
- if (aOptions.insertBefore && newIndex > tab._tPos)
- newIndex--;
+ this.internallyTabMovingCount++;
+ if (newIndex != aTab._tPos)
+ targetBrowser.moveTabTo(aTab, newIndex);
+ this.collapseExpandTab(aTab, false, true);
+ this.internallyTabMovingCount--;
+ }).bind(this);
- this.internallyTabMovingCount++;
- targetBrowser.moveTabTo(tab, newIndex);
- this.collapseExpandTab(tab, false, true);
- this.internallyTabMovingCount--;
- }
+ if (promisedDuplicatedTabs.length)
+ delayedPostProcesses.push(postProcess);
+ else
+ postProcess(aIndex);
+ }, this);
if (shouldClose)
sourceService.closeOwner(sourceBrowser);
- if (newTabs.length)
- this.applyTreeStructureToTabs(
- newTabs,
- treeStructure,
- collapsedStates.map(function(aCollapsed) {
- return !aCollapsed
- })
- );
+ if (newTabs.length) {
+ Promise.all(promisedDuplicatedTabs).then((function() {
+ log('moveTabsInternal: applying tree structure for new ' + newTabs.length + ' tabs');
+ delayedPostProcesses.forEach(function(aPostProcess, aIndex) {
+ aPostProcess(aIndex);
+ });
+ this.applyTreeStructureToTabs(
+ newTabs,
+ treeStructure,
+ collapsedStates.map(function(aCollapsed) {
+ return !aCollapsed
+ })
+ );
+ }).bind(this));
+ }
for (let i = collapsedStates.length - 1; i > -1; i--)
{
@@ -6473,9 +6622,17 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
if (!aTab.parentNode) // do nothing for closed tab!
return null;
+ var children = this.getTabValue(aTab, this.kCHILDREN);
+ var parent = this.getTabValue(aTab, this.kPARENT);
+
+ this.deleteTabValue(aTab, this.kCHILDREN);
+ this.deleteTabValue(aTab, this.kPARENT);
+
var newTab = this.mTabBrowser.duplicateTab(aTab);
- this.deleteTabValue(newTab, this.kCHILDREN);
- this.deleteTabValue(newTab, this.kPARENT);
+
+ this.setTabValue(aTab, this.kCHILDREN, children);
+ this.setTabValue(aTab, this.kPARENT, parent);
+
return newTab;
},
@@ -6645,7 +6802,7 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
aTab.setAttribute(this.kCOLLAPSING_PHASE, aCollapsed ? this.kCOLLAPSING_PHASE_TO_BE_COLLAPSED : this.kCOLLAPSING_PHASE_TO_BE_EXPANDED );
- var CSSTransitionEnabled = ('transition' in aTab.style || 'MozTransition' in aTab.style);
+ var CSSTransitionEnabled = ('transition' in aTab.style);
var maxMargin;
var offsetAttr;
@@ -7199,12 +7356,12 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
restoreTree : function TSTBrowser_restoreTree()
{
- if (!this.needRestoreTree || this.useTMPSessionAPI)
+ if (!this.needRestoreTree)
return;
this.needRestoreTree = false;
- if (this.useTMPSessionAPI && prefs.getPref('extensions.tabmix.sessions.manager'))
+ if (prefs.getPref('extensions.tabmix.sessions.manager'))
return;
var level = utils.getTreePref('restoreTree.level');
@@ -7352,9 +7509,6 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
registerTabFocusAllowance : function TSTBrowser_registerTabFocusAllowance(...aArgs) {
return this._callWindowServiceMethod('registerTabFocusAllowance', aArgs);
},
- isPopupShown : function TSTBrowser_isPopupShown(...aArgs) {
- return this._callWindowServiceMethod('isPopupShown', aArgs);
- },
toggleAutoHide : function TSTBrowser_toggleAutoHide(...aArgs) {
return this._callWindowServiceMethod('toggleAutoHide', aArgs);
},
diff --git a/modules/constants.js b/modules/constants.js
index ca13ac1..a5e565a 100644
--- a/modules/constants.js
+++ b/modules/constants.js
@@ -14,7 +14,7 @@
* The Original Code is the Tree Style Tab.
*
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2010-2015
+ * Portions created by the Initial Developer are Copyright (C) 2010-2016
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
@@ -243,6 +243,7 @@ var TreeStyleTabConstants = Object.freeze({
COMMAND_SHUTDOWN : 'shutdown',
COMMAND_REPORT_SELECTION_CHANGE : 'report-selection-change',
+ COMMAND_REPORT_LOCATION_CHANGE : 'report-location-change',
COMMAND_REPORT_MOUSEDOWN : 'report-mousedown',
COMMAND_REPORT_MOUSEUP : 'report-mouseup',
COMMAND_REPORT_MOUSEMOVE : 'report-mousemove',
diff --git a/modules/contentBridge.js b/modules/contentBridge.js
index d40246b..8cf3985 100644
--- a/modules/contentBridge.js
+++ b/modules/contentBridge.js
@@ -14,7 +14,7 @@
* The Original Code is the Tree Style Tab.
*
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2014-2015
+ * Portions created by the Initial Developer are Copyright (C) 2014-2016
* the Initial Developer. All Rights Reserved.
*
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
@@ -84,11 +84,13 @@ ContentBridge.prototype = inherit(TreeStyleTabConstants, {
var manager = this.mTab.ownerDocument.defaultView.messageManager;
manager.addMessageListener(this.MESSAGE_TYPE, this.handleMessage);
+ manager.addMessageListener('Browser:WindowCreated', this.handleMessage);
},
destroy : function CB_destroy()
{
var manager = this.mTab.ownerDocument.defaultView.messageManager;
manager.removeMessageListener(this.MESSAGE_TYPE, this.handleMessage);
+ manager.removeMessageListener('Browser:WindowCreated', this.handleMessage);
delete this.mTab;
delete this.mTabBrowser;
@@ -114,19 +116,36 @@ ContentBridge.prototype = inherit(TreeStyleTabConstants, {
},
handleMessage : function CB_handleMessage(aMessage)
{
+ if (aMessage.target != this.mTab.linkedBrowser)
+ return;
+
+ switch (aMessage.name)
+ {
+ case this.MESSAGE_TYPE:
+ this.handleCommandMessage(aMessage);
+ return;
+
+ case 'Browser:WindowCreated':
+ this.mTabBrowser.treeStyleTab.onTabContextIdChanged(this.mTab);
+ return;
+ }
+ },
+ handleCommandMessage : function CB_handleCommandMessage(aMessage)
+ {
log('*********************handleMessage*******************');
log('TARGET IS: '+aMessage.target.localName);
log(JSON.stringify(aMessage.json));
- if (aMessage.target != this.mTab.linkedBrowser)
- return;
-
switch (aMessage.json.command)
{
case this.COMMAND_REPORT_SELECTION_CHANGE:
this.mTab.__treestyletab__lastContentSelectionText = aMessage.json.text;
return;
+ case this.COMMAND_REPORT_LOCATION_CHANGE:
+ this.mTab.__treestyletab__contentLocations = aMessage.json.locations;
+ return;
+
case this.COMMAND_REPORT_MOUSEDOWN:
{
let fakeEvent = this.fixupEventCoordinates(aMessage.json.event);
diff --git a/components/AboutGroup.js b/modules/getHashString.js
similarity index 67%
copy from components/AboutGroup.js
copy to modules/getHashString.js
index cf87bc5..386fad0 100644
--- a/components/AboutGroup.js
+++ b/modules/getHashString.js
@@ -1,61 +1,54 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Tree Style Tab.
- *
- * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2009-2012
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ******/
-
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-function AboutGroup()
-{
-}
-
-AboutGroup.prototype = {
- contractID : '@mozilla.org/network/protocol/about;1?what=treestyletab-group',
- classDescription : 'about-treestyletab-group',
- classID : Components.ID('{305122d0-5bdc-11de-8a39-0800200c9a66}'),
-
- newChannel : function(aURI)
- {
- return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
- },
-
- getURIFlags : function(aURI)
- {
- return 0;
- },
-
- QueryInterface : XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule])
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutGroup]);
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Tree Style Tab.
+ *
+ * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
+ * Portions created by the Initial Developer are Copyright (C) 2016
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ******/
+
+"use strict";
+
+var EXPORTED_SYMBOLS = ['getHashString'];
+
+const Cc = Components.classes;
+const Ci = Components.interfaces;
+
+function getHashString(aString) {
+ if (!aString)
+ return '';
+ const hasher = Cc['@mozilla.org/security/hash;1']
+ .createInstance(Ci.nsICryptoHash);
+ hasher.init(Ci.nsICryptoHash.MD5);
+ const input = Cc['@mozilla.org/io/string-input-stream;1']
+ .createInstance(Ci.nsIStringInputStream);
+ input.data = aString;
+ hasher.updateFromStream(input, -1);
+ return hasher.finish(true);
+}
diff --git a/modules/lib/extended-immutable.js b/modules/lib/extended-immutable.js
new file mode 100644
index 0000000..cd7ff3c
--- /dev/null
+++ b/modules/lib/extended-immutable.js
@@ -0,0 +1,80 @@
+// Original author: ClearCode Inc.
+// License: MIT
+// Repository: https://github.com/clear-code/js-extended-immutable
+
+var EXPORTED_SYMBOLS = ['ExtendedImmutable'];
+
+function ExtendedImmutable(aImmutable, aExtraProperties) {
+ var descriptors = {};
+ Object.keys(aExtraProperties).forEach(function(aName) {
+ descriptors[aName] = Object.getOwnPropertyDescriptor(aExtraProperties, aName);
+ });
+
+ var base = Object.create({}, descriptors);
+ return new Proxy(base, {
+ getPrototypeOf: function(aTarget) {
+ return Object.getPrototypeOf(aImmutable);
+ },
+ setPrototypeOf: function(aTarget, aPrototype) {
+ return Object.setPrototypeOf(aImmutable, aPrototype);
+ },
+ isExtensible: function(aTarget) {
+ return Object.isExtensible(aImmutable);
+ },
+ preventExtensions: function(aTarget) {
+ return Object.preventExtensions(aImmutable);
+ },
+ getOwnPropertyDescriptor: function(aTarget, aProperty) {
+ return Object.getOwnPropertyDescriptor(aImmutable, aProperty);
+ },
+ defineProperty: function(aTarget, aProperty, aDescriptor) {
+ return Object.defineProperty(aImmutable, aProperty, aDescriptor);
+ },
+ has: function(aTarget, aProperty) {
+ return aProperty in aImmutable;
+ },
+ get: function(aTarget, aName, aReceiver) {
+ if (descriptors.hasOwnProperty(aName)) {
+ let value;
+ if (typeof descriptors[aName].get == 'function')
+ value = descriptors[aName].get.call(base);
+ else
+ value = descriptors[aName].value;
+
+ if (typeof value == 'function')
+ return value.bind(base);
+ else
+ return value;
+ }
+ var value = aImmutable[aName];
+ if (typeof value == 'function')
+ return value.bind(aImmutable);
+ else
+ return value;
+ },
+ set: function(aTarget, aName, aValue, aReceiver) {
+ if (descriptors.hasOwnProperty(aName)) {
+ if (typeof descriptors[aName].set == 'function')
+ return descriptors[aName].set.call(base, aValue);
+ else
+ return descriptors[aName].value = aValue;
+ }
+ return aImmutable[aName] = aValue;
+ },
+ deleteProperty: function(aTarget, aProperty) {
+ delete aImmutable[aProperty];
+ },
+ enumerate: function(aTarget) {
+ return Reflect.enumerate(aImmutable);
+ },
+ ownKeys: function(aTarget) {
+ return Object.getOwnPropertyNames(aImmutable);
+ },
+ apply: function(aTarget, aThis, aArgs) {
+ return aImmutable.apply(aThis, aArgs);
+ },
+ construct: function(aTarget, aArgs) {
+ return new aImmutable(...aArgs);
+ }
+ });
+}
diff --git a/modules/tabbarDNDObserver.js b/modules/tabbarDNDObserver.js
index 26ec5df..56695ef 100644
--- a/modules/tabbarDNDObserver.js
+++ b/modules/tabbarDNDObserver.js
@@ -365,16 +365,22 @@ catch(e) {
var sizeProp = sv.isVertical && pinned ? sv.invertedSizeProp : sv.sizeProp ;
var orient = pinned ? 'horizontal' : null ;
var boxPos = sv.getTabActualScreenPosition(tab, orient);
- var boxUnit = Math.round(tab.boxObject[sizeProp] / dropAreasCount);
+ var beforeOrAfterDropAreaSize;
+ if (dropAreasCount == 2) {
+ beforeOrAfterDropAreaSize = Math.round(tab.boxObject[sizeProp] / dropAreasCount);
+ }
+ else { // enlarge the area to dop something on the tab itself
+ beforeOrAfterDropAreaSize = Math.round(tab.boxObject[sizeProp] / 4);
+ }
var eventPosition = aEvent[screenPositionProp];
// if (this.window['piro.sakura.ne.jp'].tabsDragUtils
// .canAnimateDraggedTabs(aEvent)) {
// eventPosition = Math.round(sv.getTabActualScreenPosition(draggedTab) + (tab.boxObject[sizeProp] / 2))
// }
- if (eventPosition < boxPos + boxUnit) {
+ if (eventPosition < boxPos + beforeOrAfterDropAreaSize) {
info.position = isInverted ? sv.kDROP_AFTER : sv.kDROP_BEFORE ;
}
- else if (dropAreasCount == 2 || eventPosition > boxPos + boxUnit + boxUnit) {
+ else if (dropAreasCount == 2 || eventPosition > boxPos + tab.boxObject[sizeProp] - beforeOrAfterDropAreaSize) {
info.position = isInverted ? sv.kDROP_BEFORE : sv.kDROP_AFTER ;
}
else {
@@ -592,13 +598,17 @@ catch(e) {
}).bind(this), 0);
if (newTabs.length && aInfo.action & sv.kACTION_ATTACH) {
- log(' => attach (last)');
- this.attachTabsOnDrop(
- newTabs.filter(function(aTab, aIndex) {
- return treeStructure[aIndex] == -1;
- }),
- aInfo.parent
- );
+ Promise.all(newTabs.map((aTab) => aTab.__treestyletab__promisedDuplicatedTab))
+ .then((function() {
+ log(' => attach (last)');
+ this.attachTabsOnDrop(
+ newTabs.filter(function(aTab, aIndex) {
+ return treeStructure[aIndex] == -1;
+ }),
+ aInfo.parent,
+ aInfo.insertBefore
+ );
+ }).bind(this));
}
log(' => finished');
@@ -641,7 +651,7 @@ catch(e) {
};
},
- attachTabsOnDrop : function TabbarDND_attachTabsOnDrop(aTabs, aParent)
+ attachTabsOnDrop : function TabbarDND_attachTabsOnDrop(aTabs, aParent, aInsertBefore)
{
log('attachTabsOnDrop: start');
var b = aTabs[0].ownerDocument.defaultView.TreeStyleTabService.getTabBrowserFromChild(aTabs[0]);
@@ -653,7 +663,9 @@ catch(e) {
let tab = aTabs[i];
if (!tab.parentNode) continue; // ignore removed tabs
if (aParent)
- sv.attachTabTo(tab, aParent);
+ sv.attachTabTo(tab, aParent, {
+ insertBefore : aInsertBefore
+ });
else
sv.detachTab(tab);
sv.collapseExpandTab(tab, false);
@@ -1203,9 +1215,7 @@ catch(e) {
this.performDrop(aDropActionInfo, newTabs[0]);
}
else {
- // TODO: The callback (for Firefox 38 and older) should be
- // migrated to a Promise (Firefox 39 and later).
- w.getShortcutOrURIAndPostData(aURI, (function(aData) {
+ w.getShortcutOrURIAndPostData(aURI).then((function(aData) {
var uri = aData.url;
this.performDrop(aDropActionInfo, b.loadOneTab(uri, {
inBackground : bgLoad,
@@ -1225,9 +1235,7 @@ catch(e) {
aDropActionInfo.position == sv.kDROP_ON)
loadDroppedLinkToNewChildTab = sv.dropLinksOnTabBehavior() == sv.kDROPLINK_NEWTAB;
- // TODO: The callback (for Firefox 38 and older) should be
- // migrated to a Promise (Firefox 39 and later).
- w.getShortcutOrURIAndPostData(uris[0], (function(aData) {
+ w.getShortcutOrURIAndPostData(uris[0]).then((function(aData) {
var uri = aData.url;
if (loadDroppedLinkToNewChildTab || locked) {
this.performDrop(aDropActionInfo, b.loadOneTab(uri, {
@@ -1260,15 +1268,18 @@ catch(e) {
if (!normalizedURI)
return;
let sourceDoc = session.sourceDocument;
- let sourceURI = sourceDoc ? sourceDoc.documentURI : 'file:///' ;
+ let sourceURISpec = sourceDoc ? sourceDoc.documentURI : 'file:///' ;
+ let sourceURI = Services.io.newURI(sourceURISpec, null, null)
let principal = sourceDoc ?
sourceDoc.nodePrincipal :
- SecMan.getSimpleCodebasePrincipal(Services.io.newURI(sourceURI, null, null)) ;
+ typeof SecMan.createCodebasePrincipal === 'function' ?
+ SecMan.createCodebasePrincipal(sourceURI, {}) : // after https://bugzilla.mozilla.org/show_bug.cgi?id=1259871
+ SecMan.getSimpleCodebasePrincipal(sourceURI) ;
try {
if (principal)
SecMan.checkLoadURIStrWithPrincipal(principal, normalizedURI.spec, Ci.nsIScriptSecurityManager.STANDARD);
else
- SecMan.checkLoadURIStr(sourceURI, normalizedURI.spec, Ci.nsIScriptSecurityManager.STANDARD);
+ SecMan.checkLoadURIStr(sourceURISpec, normalizedURI.spec, Ci.nsIScriptSecurityManager.STANDARD);
}
catch(e) {
aEvent.stopPropagation();
diff --git a/modules/themeManager.js b/modules/themeManager.js
index 26126a6..a3fc691 100644
--- a/modules/themeManager.js
+++ b/modules/themeManager.js
@@ -64,6 +64,7 @@ TreeStyleTabThemeManager.prototype = {
this._lastStyles = null;
var styles = [];
+
switch (aStyle)
{
default:
diff --git a/modules/utils.js b/modules/utils.js
index 62a1657..af093c6 100644
--- a/modules/utils.js
+++ b/modules/utils.js
@@ -799,4 +799,11 @@ prefs.addPrefListener(TreeStyleTabUtils);
TabAttributesInternal._skipAttrs.add(name);
});
}
+
+ let { SessionStoreInternal } = Cu.import('resource:///modules/sessionstore/SessionStore.jsm', {});
+ SessionStoreInternal.__treestyletab__duplicateTab = SessionStoreInternal.duplicateTab;
+ SessionStoreInternal.duplicateTab = function(aWindow, aTab, aDelta = 0) {
+ aWindow.gBrowser.treeStyleTab.onBeforeTabDuplicate(aWindow, aTab, aDelta);
+ return this.__treestyletab__duplicateTab.call(this, aWindow, aTab, aDelta);
+ };
}
diff --git a/modules/window.js b/modules/window.js
index 73b21b5..f7c260c 100644
--- a/modules/window.js
+++ b/modules/window.js
@@ -20,6 +20,7 @@
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
* Tetsuharu OHZEKI <https://github.com/saneyuki>
* J. Ryan Stinnett <https://github.com/jryans>
+ * Ohnuma <https://github.com/lv7777>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
@@ -68,6 +69,7 @@ XPCOMUtils.defineLazyModuleGetter(this, 'TreeStyleTabThemeManager', 'resource://
XPCOMUtils.defineLazyModuleGetter(this, 'FullscreenObserver', 'resource://treestyletab-modules/fullscreenObserver.js');
XPCOMUtils.defineLazyModuleGetter(this, 'BrowserUIShowHideObserver', 'resource://treestyletab-modules/browserUIShowHideObserver.js');
XPCOMUtils.defineLazyModuleGetter(this, 'ContentBridge', 'resource://treestyletab-modules/contentBridge.js');
+XPCOMUtils.defineLazyModuleGetter(this, 'getHashString', 'resource://treestyletab-modules/getHashString.js');
XPCOMUtils.defineLazyServiceGetter(this, 'SessionStore',
'@mozilla.org/browser/sessionstore;1', 'nsISessionStore');
@@ -95,6 +97,13 @@ function TreeStyleTabWindow(aWindow)
aWindow.TreeStyleTabService = this;
XPCOMUtils.defineLazyModuleGetter(aWindow, 'TreeStyleTabBrowser', 'resource://treestyletab-modules/browser.js');
+
+ var isDevEdition = this.window.AppConstants.MOZ_DEV_EDITION;
+ if (isDevEdition) {
+ let rootelem = this.document.documentElement;
+ rootelem.setAttribute('treestyletab-devedition', true);
+ }
+
}
TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
@@ -166,15 +175,6 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
return this.base.treeViewEnabled = aValue;
},
- get useTMPSessionAPI() /* PUBLIC API */
- {
- return this.base.useTMPSessionAPI;
- },
- set useTMPSessionAPI(aValue)
- {
- return this.base.useTMPSessionAPI = aValue;
- },
-
get browser()
{
var w = this.window;
@@ -286,7 +286,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
shouldOpenSearchResultAsChild : function TSTWindow_shouldOpenSearchResultAsChild(aTerm)
{
- aTerm = aTerm.trim();
+ aTerm = getHashString(aTerm.trim());
var mode = utils.getTreePref('autoAttach.searchResult');
if (mode == this.kSEARCH_RESULT_ATTACH_ALWAYS) {
@@ -298,19 +298,27 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
var selection = '';
var contextMenuContentData = this.window.gContextMenuContentData;
+ log('shouldOpenSearchResultAsChild: contextMenuContentData =', contextMenuContentData);
if (contextMenuContentData && contextMenuContentData.selectionInfo) {
selection = contextMenuContentData.selectionInfo.text;
+ if (selection) {
+ selection = getHashString(selection.trim());
+ log('selection (contextMenuContentData) => ', selection);
+ }
}
else {
let tab = this.window.gBrowser.selectedTab;
selection = tab.__treestyletab__lastContentSelectionText || '';
+ log('selection (selectionchange) => ', selection);
// for old Firefox without selectionchange event
if (selection === '' &&
typeof this.window.getBrowserSelection === 'function' &&
- tab.linkedBrowser.getAttribute('remote') !== 'true')
- selection = this.window.getBrowserSelection();
+ tab.linkedBrowser.getAttribute('remote') !== 'true') {
+ selection = getHashString(this.window.getBrowserSelection().trim());
+ log('selection (getBrowserSelection) => ', selection);
+ }
}
- return selection.trim() == aTerm;
+ return selection == aTerm;
},
kSEARCH_RESULT_DO_NOT_ATTACH : 0,
kSEARCH_RESULT_ATTACH_IF_SELECTED : 1,
@@ -1080,6 +1088,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
width += (pos == 'left' ? delta : -delta );
width = this.maxTabbarWidth(width, b);
if (expanded || b.treeStyleTab.autoHide.expanded) {
+ log('onTabbarResizing: setting expanded width to '+width);
// b.treeStyleTab.tabbarWidth = width;
b.treeStyleTab.autoHide.expandedWidth = width;
if (b.treeStyleTab.autoHide.mode == b.treeStyleTab.autoHide.kMODE_SHRINK &&
@@ -1087,6 +1096,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
b.treeStyleTab.tabStripPlaceHolder.setAttribute('width', b.treeStyleTab.autoHide.shrunkenWidth);
}
else {
+ log('onTabbarResizing: setting shrunken width to '+width);
b.treeStyleTab.autoHide.shrunkenWidth = width;
}
}
@@ -1094,6 +1104,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
let delta = aEvent.screenY - this.tabbarResizeStartY;
height += (pos == 'top' ? delta : -delta );
height = this.maxTabbarHeight(height, b);
+ log('onTabbarResizing: setting height to '+height);
b.treeStyleTab.tabbarHeight = height;
}
b.treeStyleTab.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_TABBAR_RESIZE);
@@ -1266,12 +1277,12 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
if (TabsInTitlebar) {
let menubar = this.window.document.getElementById('toolbar-menubar');
let allowed = (
+ !utils.getTreePref('blockTabsInTitlebar') ||
(isTopTabbar && this.browser.treeStyleTab.fixed) ||
(!this.isMac && menubar.getAttribute('autohide') !== 'true')
);
if (
(this.window.TabsOnBottom && utils.getTreePref('compatibility.TabsOnBottom')) ||
- ('navbarontop' in this.window && utils.getTreePref('compatibility.NavbarOnTitlebar')) ||
('classicthemerestorerjs' in this.window && utils.getTreePref('compatibility.ClassicThemeRestorer'))
)
allowed = true;
@@ -1362,11 +1373,8 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
},
_clickEventOnNewTabButtonHandled : false,
- onBeforeTabDuplicate : function TSTWindow_onBeforeTabDuplicate(aTab, aWhere, aDelta)
+ onBeforeTabDuplicate : function TSTWindow_onBeforeTabDuplicate(aWindow, aTab, aDelta)
{
- if (aWhere && aWhere.indexOf('tab') != 0)
- return;
-
var b = this.getTabBrowserFromChild(aTab) || this.browser;
var behaviorPref = !aDelta ? 'autoAttach.duplicateTabCommand' :
aDelta < 0 ? 'autoAttach.duplicateTabCommand.back' :
@@ -1405,28 +1413,32 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
}
},
- onBeforeBrowserAccessOpenURI : function TSTWindow_onBeforeBrowserAccessOpenURI(aOpener, aWhere)
+ onBeforeBrowserAccessOpenURI : function TSTWindow_onBeforeBrowserAccessOpenURI(aParamsOrOpener, aWhere, aContext)
{
var hasOwnerTab = false;
var opener = null;
- if (aOpener) {
- if (aOpener instanceof Ci.nsIDOMWindow) {
+ if (aParamsOrOpener) {
+ if (aParamsOrOpener instanceof Ci.nsIDOMWindow) {
log('onBeforeBrowserAccessOpenURI: opener is DOMWindow');
- opener = aOpener;
+ opener = aParamsOrOpener;
hasOwnerTab = this.getTabFromFrame(opener.top);
log(' opener =>', [opener, hasOwnerTab]);
}
else if (Ci.nsIOpenURIInFrameParams &&
- aOpener instanceof Ci.nsIOpenURIInFrameParams) {
+ aParamsOrOpener instanceof Ci.nsIOpenURIInFrameParams) {
log('TSTWindow_onBeforeBrowserAccessOpenURI: opener is nsIOpenURIInFrameParams');
+ log(' params => ', aParamsOrOpener);
// from remote contents, we have to detect its opener from the URI.
- let referrer = aOpener.referrer;
+ let referrer = aParamsOrOpener.referrer;
if (referrer) {
+ let referrerHash = getHashString(referrer);
let activeTab = this.browser.selectedTab;
let possibleOwners = [activeTab].concat(this.getAncestorTabs(activeTab));
for (let i = 0, maxi = possibleOwners.length; i < maxi; i++) {
let possibleOwner = possibleOwners[i];
- if (possibleOwner.linkedBrowser.currentURI.spec != referrer)
+ let contentLocations = possibleOwner.__treestyletab__contentLocations ||
+ [getHashString(possibleOwner.linkedBrowser.currentURI.spec)];
+ if (contentLocations.indexOf(referrerHash) < 0)
continue;
hasOwnerTab = true;
opener = possibleOwner.linkedBrowser;
@@ -1436,7 +1448,10 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
log(' opener =>', [opener, hasOwnerTab]);
}
}
- if (aOpener &&
+ else {
+ log('onBeforeBrowserAccessOpenURI: no params is given');
+ }
+ if (aParamsOrOpener &&
hasOwnerTab &&
aWhere == Ci.nsIBrowserDOMWindow.OPEN_NEWTAB)
this.handleNewTabFromCurrent(opener);
@@ -2022,6 +2037,10 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
this.endListenKeyEventsFor(this.LISTEN_FOR_AUTOEXPAND_BY_FOCUSCHANGE);
break;
+ case 'extensions.treestyletab.blockTabsInTitlebar':
+ this.updateTabsInTitlebar();
+ break;
+
default:
break;
}
diff --git a/skin/classic/treestyletab/Linux-base.css b/skin/classic/treestyletab/Linux-base.css
index 925f386..701f5d6 100644
--- a/skin/classic/treestyletab/Linux-base.css
+++ b/skin/classic/treestyletab/Linux-base.css
@@ -2,7 +2,6 @@
/* splitter for floating & autohide tab bar */
.treestyletab-tabbar-toolbar .treestyletab-splitter {
- appearance: none;
-moz-appearance: none;
width: 6px;
}
@@ -18,8 +17,8 @@
#treestyletab-autohide-content-area-screen,
:root[treestyletab-tabbar-position="right"]
#treestyletab-autohide-content-area-screen {
- border-right: 1px solid ThreeDShadow;
- border-left: 1px solid ThreeDShadow;
+ border-right: 1px solid var(--tst-tab-border);
+ border-left: 1px solid var(--tst-tab-border);
}
diff --git a/skin/classic/treestyletab/Linux-styled.css b/skin/classic/treestyletab/Linux-styled.css
index bd0dd49..0e5e3cf 100644
--- a/skin/classic/treestyletab/Linux-styled.css
+++ b/skin/classic/treestyletab/Linux-styled.css
@@ -8,7 +8,6 @@
.tabbrowser-tabs[treestyletab-tabbar-position="top"][treestyletab-tabs-indented="true"]
.tabbrowser-tab[visuallyselected="true"] {
border-radius: 0 0 0 0;
- -moz-border-radius: 0 0 0 0;
height: 1.5em;
margin-bottom: 0;
padding-bottom: 0;
diff --git a/skin/classic/treestyletab/WINNT-styled.css b/skin/classic/treestyletab/WINNT-styled.css
index c159009..49d87d9 100644
--- a/skin/classic/treestyletab/WINNT-styled.css
+++ b/skin/classic/treestyletab/WINNT-styled.css
@@ -9,7 +9,6 @@
.tabbrowser-tabs[treestyletab-tabbar-position="top"][treestyletab-tabs-indented="true"]
.tabbrowser-tab:hover[visuallyselected="true"] {
border-radius: 0 0 0 0;
- -moz-border-radius: 0 0 0 0;
border-top-width: 1px;
height: auto;
margin-bottom: 3px;
diff --git a/components/AboutGroup.js b/skin/classic/treestyletab/base-colors.css
similarity index 67%
copy from components/AboutGroup.js
copy to skin/classic/treestyletab/base-colors.css
index cf87bc5..c2d071e 100644
--- a/components/AboutGroup.js
+++ b/skin/classic/treestyletab/base-colors.css
@@ -1,61 +1,53 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.1/GPL 2.0/LGPL 2.1
- *
- * The contents of this file are subject to the Mozilla Public License Version
- * 1.1 (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS" basis,
- * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- * for the specific language governing rights and limitations under the
- * License.
- *
- * The Original Code is the Tree Style Tab.
- *
- * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
- * Portions created by the Initial Developer are Copyright (C) 2009-2012
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
- *
- * Alternatively, the contents of this file may be used under the terms of
- * either the GNU General Public License Version 2 or later (the "GPL"), or
- * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- * in which case the provisions of the GPL or the LGPL are applicable instead
- * of those above. If you wish to allow use of your version of this file only
- * under the terms of either the GPL or the LGPL, and not to allow others to
- * use your version of this file under the terms of the MPL, indicate your
- * decision by deleting the provisions above and replace them with the notice
- * and other provisions required by the GPL or the LGPL. If you do not delete
- * the provisions above, a recipient may use your version of this file under
- * the terms of any one of the MPL, the GPL or the LGPL.
- *
- * ***** END LICENSE BLOCK ******/
-
-Components.utils.import('resource://gre/modules/XPCOMUtils.jsm');
-Components.utils.import('resource://gre/modules/Services.jsm');
-
-function AboutGroup()
-{
-}
-
-AboutGroup.prototype = {
- contractID : '@mozilla.org/network/protocol/about;1?what=treestyletab-group',
- classDescription : 'about-treestyletab-group',
- classID : Components.ID('{305122d0-5bdc-11de-8a39-0800200c9a66}'),
-
- newChannel : function(aURI)
- {
- return Services.io.newChannel('chrome://treestyletab/content/group.xul', null, null);
- },
-
- getURIFlags : function(aURI)
- {
- return 0;
- },
-
- QueryInterface : XPCOMUtils.generateQI([Components.interfaces.nsIAboutModule])
-};
-
-var NSGetFactory = XPCOMUtils.generateNSGetFactory([AboutGroup]);
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Tree Style Tab.
+ *
+ * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
+ * Portions created by the Initial Developer are Copyright (C) 2007-2016
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
+ * lv7777 (https://github.com/lv7777)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ******/
+
+ at namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+
+:root {
+ --tst-tab-surface: -moz-dialog;
+ --tst-tab-text: -moz-dialogtext;
+ --tst-tab-border: ThreeDShadow;
+ --tst-tab-surface-hover: ThreeDHighlight;
+ --tst-tab-dropmarker: -moz-dialogtext;
+}
+
+:root[devtoolstheme="dark"][treestyletab-devedition="true"] {
+ --tst-tab-surface: #39424D;
+ --tst-tab-text: white;
+ --tst-tab-border: #5f6670;
+ --tst-tab-surface-hover: #49525D;
+ --tst-tab-dropmarker: white;
+}
\ No newline at end of file
diff --git a/skin/classic/treestyletab/base.css b/skin/classic/treestyletab/base.css
index 7d70423..3563df5 100644
--- a/skin/classic/treestyletab/base.css
+++ b/skin/classic/treestyletab/base.css
@@ -1,3 +1,39 @@
+/* ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Original Code is the Tree Style Tab.
+ *
+ * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
+ * Portions created by the Initial Developer are Copyright (C) 2007-2016
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex at gmail.com>
+ * lv7777 (https://github.com/lv7777)
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 2 or later (the "GPL"), or
+ * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ******/
+
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@@ -6,7 +42,6 @@
.tabbrowser-tabs[treestyletab-mode="vertical"] .tabs-newtab-button,
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > toolbarbutton,
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > toolbarpaletteitem > toolbarbutton {
- appearance: none !important;
-moz-appearance: none !important;
border: 0 none !important;
-moz-border-top-colors: none !important;
@@ -14,13 +49,12 @@
-moz-border-bottom-colors: none !important;
-moz-border-left-colors: none !important;
border-radius: 0;
- -moz-border-radius: 0;
- border-top: 1px solid ThreeDShadow !important;
- background: -moz-dialog !important;
+ border-top: 1px solid var(--tst-tab-border) !important;
+ background: var(--tst-tab-surface) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"] .tabs-newtab-button:hover,
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > toolbarbutton:hover {
- background: ThreeDHighlight !important;
+ background: var(--tst-tab-surface-hover) !important;
}
/* for Mac OS X */
@@ -40,12 +74,11 @@
/* Support customizable tab bar */
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > toolbarpaletteitem > toolbarbutton {
- box-flex: 1;
-moz-box-flex: 1;
}
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > *:not(toolbarpaletteitem) {
-moz-border-top-colors: none !important;
- border-top: 1px solid ThreeDShadow !important;
+ border-top: 1px solid var(--tst-tab-border) !important;
}
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > *:first-child,
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"] > *:first-child[hidden="true"] + *:not(toolbarpaletteitem),
@@ -73,9 +106,8 @@
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-arrowscrollbox .tabs-newtab-button {
border: 0 none !important;
- border-bottom: 1px solid ThreeDShadow !important;
+ border-bottom: 1px solid var(--tst-tab-border) !important;
border-radius: 0 0 3px 3px;
- -moz-border-radius: 0 0 3px 3px;
}
.tabbrowser-tabs[treestyletab-style~="vertigo"][treestyletab-mode="vertical"]
.tabbrowser-arrowscrollbox .tabs-newtab-button {
diff --git a/skin/classic/treestyletab/config.css b/skin/classic/treestyletab/config.css
index b954604..a681292 100644
--- a/skin/classic/treestyletab/config.css
+++ b/skin/classic/treestyletab/config.css
@@ -2,37 +2,10 @@
radio.image .radio-label-box,
radio.image label.radio-label {
- box-align: center;
-moz-box-align: center;
}
-radio[pane] {
- list-style-image: url("resource:///chrome/browser/skin/classic/browser/preferences/Options.png");
-}
-
-radio[pane="prefpane-appearance"] {
- -moz-image-region: rect(0px, 32px, 32px, 0px);
-}
-radio[pane="prefpane-style"] {
- -moz-image-region: rect(0px, 32px, 32px, 0px);
-}
-radio[pane="prefpane-menu"] {
- -moz-image-region: rect(0px, 32px, 32px, 0px);
-}
-radio[pane="prefpane-tab"] {
- -moz-image-region: rect(0px, 64px, 32px, 32px);
-}
-radio[pane="prefpane-autohide"] {
- -moz-image-region: rect(0px, 64px, 32px, 32px);
-}
-radio[pane="prefpane-advanced"] {
- -moz-image-region: rect(0px, 224px, 32px, 192px);
-}
-radio[pane="prefpane-tree"] {
- list-style-image: url("chrome://treestyletab/content/res/icon.png");
-}
-
label.scale-label {
min-width: 0;
margin: 0;
diff --git a/skin/classic/treestyletab/group.css b/skin/classic/treestyletab/group.css
index 44762f0..756c3bb 100644
--- a/skin/classic/treestyletab/group.css
+++ b/skin/classic/treestyletab/group.css
@@ -1,7 +1,6 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
:root {
- appearance: window;
-moz-appearance: window;
background: -moz-dialog;
margin: 0;
@@ -46,7 +45,6 @@
image-rendering: -moz-crisp-edges;
margin: 0 -0.3em -0.3em 0;
transform: rotate(8deg);
- -moz-transform: rotate(8deg);
}
.background-image-container {
@@ -61,7 +59,6 @@
#tree {
margin: 1em 0 0 0.5em;
overflow: auto;
- box-flex: 1;
-moz-box-flex: 1;
}
diff --git a/skin/classic/treestyletab/metal/aero.css b/skin/classic/treestyletab/metal/aero.css
index b364a48..8714f63 100644
--- a/skin/classic/treestyletab/metal/aero.css
+++ b/skin/classic/treestyletab/metal/aero.css
@@ -5,7 +5,6 @@
tabbrowser[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]),
:root[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]) #appcontent,
:root[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]) #browser {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
}
diff --git a/skin/classic/treestyletab/metal/base.css b/skin/classic/treestyletab/metal/base.css
index d259246..f58315e 100644
--- a/skin/classic/treestyletab/metal/base.css
+++ b/skin/classic/treestyletab/metal/base.css
@@ -4,12 +4,10 @@
.treestyletab-tabbar-toolbar:not([treestyletab-tabbar-position="top"]),
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="top"]:not([treestyletab-tabbar-fixed="true"]) {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
border: 0 none !important;
box-shadow: none !important;
- -moz-box-shadow: none !important;
margin: 0 !important;
padding: 0 !important;
}
@@ -42,7 +40,6 @@
}
.tabbrowser-tabs[treestyletab-mode="vertical"] {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
margin: 0;
@@ -78,7 +75,6 @@ tabbrowser[treestyletab-mode="vertical"]
.treestyletab-splitter,
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
.treestyletab-splitter {
- appearance: none !important;
-moz-appearance: none !important;
background: #b3b2b3 !important;
border: 0 solid #666666 !important;
@@ -286,14 +282,13 @@ tabbrowser[treestyletab-tabbar-position="right"]
background: #9a9a9a url("shadow-active-l.png") repeat-y top right !important;
margin-left: 6px !important;
border-radius: 6px 0 0 6px;
- -moz-border-radius: 6px 0 0 6px;
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-arrowscrollbox
.tabs-newtab-button {
background: #9a9a9a url("shadow-active-r.png") repeat-y top left !important;
margin-right: 6px !important;
- -moz-border-radius: 0 6px 6px 0;
+ border-radius: 0 6px 6px 0;
}
.tabbrowser-tabs[treestyletab-tabbar-position="left"]
diff --git a/skin/classic/treestyletab/metal/tab.css b/skin/classic/treestyletab/metal/tab.css
index 90a7953..56c682f 100644
--- a/skin/classic/treestyletab/metal/tab.css
+++ b/skin/classic/treestyletab/metal/tab.css
@@ -8,11 +8,9 @@
.tabbrowser-tab[visuallyselected="true"],
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab[visuallyselected="true"]:hover {
- appearance: none !important;
-moz-appearance: none !important;
border: 2px solid transparent !important;
border-radius: 0 !important;
- -moz-border-radius: 0 !important;
color: black !important;
height: auto !important;
max-height: none !important;
@@ -58,20 +56,28 @@
width: 0;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
- .tabbrowser-tab:hover .tab-background:not([visuallyselected="true"]) {
+ .tabbrowser-tab:hover
+ .tab-background:not([selected="true"]):not([visuallyselected="true"]) {
background-image: none;
}
/* for Mac OS X */
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-content:not([pinned]):not([visuallyselected="true"]),
- .tab-content[pinned]:not([titlechanged]):not([visuallyselected="true"]),
+ :-moz-any(.tab-content:not([pinned]):not([selected="true"]):not([visuallyselected="true"]),
+ .tab-content[pinned]:not([titlechanged]):not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-start:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"]):not([pinned]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"])[pinned]:not([titlechanged]),
+ .tab-background-end:not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-content:not([pinned])[selected="true"],
+ .tab-content[pinned]:not([titlechanged])[selected="true"],
+ .tab-background-start[selected="true"],
+ .tab-background-middle[selected="true"],
+ .tab-background-end[selected="true"],
+ /* Firefox 50 and older */
.tab-content:not([pinned])[visuallyselected="true"],
.tab-content[pinned]:not([titlechanged])[visuallyselected="true"],
- .tab-background-start:not([visuallyselected="true"]),
- .tab-background-middle:not([visuallyselected="true"]):not([pinned]),
- .tab-background-middle:not([visuallyselected="true"])[pinned]:not([titlechanged]),
- .tab-background-end:not([visuallyselected="true"]),
.tab-background-start[visuallyselected="true"],
.tab-background-middle[visuallyselected="true"],
.tab-background-end[visuallyselected="true"]) {
@@ -79,9 +85,14 @@
background: transparent !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-background-start:not([visuallyselected="true"]),
- .tab-background-middle:not([visuallyselected="true"]),
- .tab-background-end:not([visuallyselected="true"]),
+ :-moz-any(.tab-background-start:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-end:not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-background-start[selected="true"],
+ .tab-background-middle[selected="true"],
+ .tab-background-end[selected="true"],
+ /* Firefox 50 and older */
.tab-background-start[visuallyselected="true"],
.tab-background-middle[visuallyselected="true"],
.tab-background-end[visuallyselected="true"]) {
@@ -113,7 +124,6 @@
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tab-content {
- appearance: none !important;
-moz-appearance: none !important;
border: 10px solid transparent;
margin: 0 !important;
@@ -208,11 +218,17 @@
.tabbrowser-tab:hover
.tab-content[pinned]:not([titlechanged]),
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:not(:hover)
- .tab-content[pinned][visuallyselected],
+ .tabbrowser-tab[visuallyselected]:not(:hover)
+ :-moz-any(/* Firefox 51 and later */
+ .tab-content[pinned][selected],
+ /* Firefox 50 and older */
+ .tab-content[pinned][visuallyselected]),
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:hover
- .tab-content[pinned][visuallyselected] {
+ .tabbrowser-tab[visuallyselected]:hover
+ :-moz-any(/* Firefox 51 and later */
+ .tab-content[pinned][selected],
+ /* Firefox 50 and older */
+ .tab-content[pinned][visuallyselected]) {
background: none !important;
}
@@ -226,7 +242,6 @@
.tabbrowser-tab[pinned][visuallyselected="true"]:hover {
border: none !important;
border-radius: 0 !important;
- -moz-border-radius: 0 !important;
padding: 0 !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
@@ -255,15 +270,20 @@
.tabbrowser-tab:hover
.tab-content[pinned],
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:not(:hover)
- .tab-content[pinned][visuallyselected="true"],
-.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:hover
- .tab-content[pinned][visuallyselected="true"] {
+ .tabbrowser-tab[visuallyselected="true"]:not(:hover)
+ :-moz-any(/* Firefox 51 and later */
+ .tab-content[pinned][selected="true"],
+ /* Firefox 50 and older */
+ .tab-content[pinned][visuallyselected="true"]),
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ :-moz-any(/* Firefox 51 and later */
+ .tab-content[pinned][selected="true"],
+ /* Firefox 50 and older */
+ .tab-content[pinned][visuallyselected="true"]) {
line-height: 1 !important;
border: 1px solid #666666 !important;
border-radius: 4px !important;
- -moz-border-radius: 4px !important;
margin: 1px 0 0 1px !important;
padding: 2px 4px 2px 3px !important;
}
@@ -274,20 +294,32 @@
.tabbrowser-tab:hover
.tab-content[pinned]:not([titlechanged]),
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:not(:hover)
- .tab-content[visuallyselected="true"][pinned],
+ .tabbrowser-tab[visuallyselected="true"]:not(:hover)
+ .tab-content[selected="true"][pinned], /* Firefox 51 and later */
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:hover
- .tab-content[visuallyselected="true"][pinned] {
+ .tabbrowser-tab[visuallyselected="true"]:not(:hover)
+ .tab-content[visuallyselected="true"][pinned], /* Firefox 50 and older */
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ .tab-content[selected="true"][pinned], /* Firefox 51 and later */
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ .tab-content[visuallyselected="true"][pinned] /* Firefox 50 and older */ {
background: #9d9d9d !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:not(:hover)
- .tab-content[visuallyselected="true"][pinned],
+ .tabbrowser-tab[visuallyselected="true"]:not(:hover)
+ .tab-content[selected="true"][pinned], /* Firefox 51 and later */
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:hover
- .tab-content[visuallyselected="true"][pinned] {
+ .tabbrowser-tab[visuallyselected="true"]:not(:hover)
+ .tab-content[visuallyselected="true"][pinned], /* Firefox 50 and older */
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ .tab-content[selected="true"][pinned], /* Firefox 51 and later */
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ .tab-content[visuallyselected="true"][pinned] /* Firefox 50 and older */ {
background-color: #b3b2b3 !important;
}
@@ -352,12 +384,20 @@
:root:-moz-window-inactive
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab
- .tab-content[pinned][visuallyselected="true"],
+ .tabbrowser-tab[visuallyselected="true"]
+ .tab-content[pinned][selected="true"], /* Firefox 51 and later */
:root:-moz-window-inactive
.tabbrowser-tabs[treestyletab-mode="vertical"]
- .tabbrowser-tab:hover
- .tab-content[pinned][visuallyselected="true"] {
+ .tabbrowser-tab[visuallyselected="true"]
+ .tab-content[pinned][visuallyselected="true"], /* Firefox 50 and older */
+:root:-moz-window-inactive
+ .tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ .tab-content[pinned][selected="true"], /* Firefox 51 and later */
+:root:-moz-window-inactive
+ .tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[visuallyselected="true"]:hover
+ .tab-content[pinned][visuallyselected="true"] /* Firefox 50 and older */ {
background: #e4e4e4 !important;
}
diff --git a/skin/classic/treestyletab/sidebar/aero.css b/skin/classic/treestyletab/sidebar/aero.css
index 3cb6e06..ec91a63 100644
--- a/skin/classic/treestyletab/sidebar/aero.css
+++ b/skin/classic/treestyletab/sidebar/aero.css
@@ -5,7 +5,6 @@
tabbrowser[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]),
:root[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]) #appcontent,
:root[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]) #browser {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
}
diff --git a/skin/classic/treestyletab/sidebar/sidebar.css b/skin/classic/treestyletab/sidebar/sidebar.css
index 0dbaae5..b9fe92b 100644
--- a/skin/classic/treestyletab/sidebar/sidebar.css
+++ b/skin/classic/treestyletab/sidebar/sidebar.css
@@ -68,7 +68,8 @@
width: 0;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
- .tabbrowser-tab:hover .tab-background:not([visuallyselected="true"]) {
+ .tabbrowser-tab:hover
+ .tab-background:not([selected="true"]):not([visuallyselected="true"]) {
background-image: none;
}
@@ -108,13 +109,10 @@ tabbrowser[treestyletab-mode="vertical"]
/* Style tabs themselves. Get rid of most of the initial XUL styling */
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab {
- appearance: none !important;
-moz-appearance: none !important;
border: none;
border-radius: 0 !important;
- -moz-border-radius: 0 !important;
border-top: 1px solid transparent !important;
- box-align: stretch !important;
-moz-box-align: stretch !important;
height: 21px !important; /* height including border! */
margin: 0 !important;
@@ -231,7 +229,6 @@ tabbrowser[treestyletab-mode="vertical"]
.treestyletab-counter-container {
background-color: #91a0c0 !important;
border-radius: 8px !important;
- -moz-border-radius: 8px !important;
padding: 0 6px !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
@@ -295,7 +292,6 @@ tabbrowser[treestyletab-mode="vertical"]
background: #d0def5 !important;
border: 2px solid #577bf3 !important; /* not OSX's colour but Firefox's */
border-radius: 8px !important;
- -moz-border-radius: 8px !important;
padding: 0 1px 0 8px !important;
}
@@ -334,12 +330,10 @@ tabbrowser[treestyletab-mode="vertical"]
.treestyletab-tabbar-toolbar:not([treestyletab-tabbar-position="top"]),
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="top"]:not([treestyletab-tabbar-fixed="true"]) {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
border: 0 none !important;
box-shadow: none !important;
- -moz-box-shadow: none !important;
margin: 0 !important;
padding: 0 !important;
}
@@ -363,7 +357,6 @@ tabbrowser[treestyletab-mode="vertical"]
.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
> toolbarpaletteitem
> toolbarbutton:hover {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
border: 0 none !important;
@@ -399,7 +392,6 @@ tabbrowser[treestyletab-mode="vertical"]
-moz-image-region: auto !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"] {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
margin: 0;
@@ -408,32 +400,44 @@ tabbrowser[treestyletab-mode="vertical"]
/* for Linux (Gnomestrip) */
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tab-close-button {
- appearance: none !important;
-moz-appearance: none !important;
}
/* for Mac OS X */
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-content:not([visuallyselected="true"]):not([pinned]),
- .tab-content:not([visuallyselected="true"])[pinned]:not([titlechanged]),
+ :-moz-any(.tab-content:not([selected="true"]):not([visuallyselected="true"]):not([pinned]),
+ .tab-content:not([selected="true"]):not([visuallyselected="true"])[pinned]:not([titlechanged]),
+ /* Firefox 51 and later */
+ .tab-content[selected="true"],
+ /* Firefox 50 and older */
.tab-content[visuallyselected="true"]) {
border: 0 none !important;
background: transparent !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-background-start:not([visuallyselected="true"]),
- .tab-background-middle:not([visuallyselected="true"]),
- .tab-background-end:not([visuallyselected="true"]),
+ :-moz-any(.tab-background-start:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-end:not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-background-start[selected="true"],
+ .tab-background-middle[selected="true"],
+ .tab-background-end[selected="true"],
+ /* Firefox 50 and older */
.tab-background-start[visuallyselected="true"],
.tab-background-middle[visuallyselected="true"],
.tab-background-end[visuallyselected="true"]) {
mask: none !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-background-start:not([visuallyselected="true"]),
- .tab-background-middle:not([visuallyselected="true"]):not([pinned]),
- .tab-background-middle:not([visuallyselected="true"])[pinned]:not([titlechanged]),
- .tab-background-end:not([visuallyselected="true"]),
+ :-moz-any(.tab-background-start:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"]):not([pinned]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"])[pinned]:not([titlechanged]),
+ .tab-background-end:not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-background-start[selected="true"],
+ .tab-background-middle[selected="true"],
+ .tab-background-end[selected="true"],
+ /* Firefox 50 and older */
.tab-background-start[visuallyselected="true"],
.tab-background-middle[visuallyselected="true"],
.tab-background-end[visuallyselected="true"]) {
@@ -476,9 +480,22 @@ tabbrowser[treestyletab-mode="vertical"]
}
+/* reduce negative margins to put contexual color indicator in the viewport */
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tab-background {
+ margin: 0 -5px;
+}
+.tabbrowser-tabs[treestyletab-mode="vertical"]
+ .tabbrowser-tab[pinned]
+ .tab-background {
+ margin: 0;
+}
+
+
+
/* for Multiple Tab Handler */
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab:not(:hover):not([visuallyselected="true"])[multipletab-ready-to-close="true"]
.tab-close-button {
visibility: visible !important;
-}
+}
\ No newline at end of file
diff --git a/skin/classic/treestyletab/square/Darwin.css b/skin/classic/treestyletab/square/Darwin.css
index 75d135f..e864af6 100644
--- a/skin/classic/treestyletab/square/Darwin.css
+++ b/skin/classic/treestyletab/square/Darwin.css
@@ -4,13 +4,13 @@
tabbrowser[treestyletab-tabbar-position="left"]:not([treestyletab-tabbar-fixed="true"])
.treestyletab-splitter {
- border-right: 1px solid ThreeDShadow !important;
- -moz-border-right-colors: ThreeDShadow !important;
+ border-right: 1px solid var(--tst-tab-border) !important;
+ -moz-border-right-colors: var(--tst-tab-border) !important;
}
tabbrowser[treestyletab-tabbar-position="right"]:not([treestyletab-tabbar-fixed="true"])
.treestyletab-splitter {
- border-left: 1px solid ThreeDShadow !important;
- -moz-border-left-colors: ThreeDShadow !important;
+ border-left: 1px solid var(--tst-tab-border) !important;
+ -moz-border-left-colors: var(--tst-tab-border) !important;
}
tabbrowser:not([treestyletab-style="vertigo"])[treestyletab-mode="vertical"]
diff --git a/skin/classic/treestyletab/square/Linux.css b/skin/classic/treestyletab/square/Linux.css
index 8c0a264..f445bfa 100644
--- a/skin/classic/treestyletab/square/Linux.css
+++ b/skin/classic/treestyletab/square/Linux.css
@@ -4,11 +4,11 @@
.tabbrowser-strip[treestyletab-tabbar-position="left"]:not([treestyletab-tabbar-transparent="full"]),
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="left"]:not([treestyletab-tabbar-transparent="full"]) {
- border-right: 1px solid ThreeDShadow !important;
+ border-right: 1px solid var(--tst-tab-border) !important;
-moz-border-right-colors: none !important;
}
.tabbrowser-strip[treestyletab-tabbar-position="right"]:not([treestyletab-tabbar-transparent="full"]),
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="right"]:not([treestyletab-tabbar-transparent="full"]) {
- border-left: 1px solid ThreeDShadow !important;
+ border-left: 1px solid var(--tst-tab-border) !important;
-moz-border-right-colors: none !important;
}
diff --git a/skin/classic/treestyletab/square/base.css b/skin/classic/treestyletab/square/base.css
index 6d1adb2..c22ab34 100644
--- a/skin/classic/treestyletab/square/base.css
+++ b/skin/classic/treestyletab/square/base.css
@@ -2,20 +2,43 @@
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
+/* color scheme: see also ../base-colors.css */
+
+:root {
+ --tst-tab-highlighted-base: ThreeDHighlight;
+ --tst-tab-highlighted-highlight: Highlight;
+ --tst-tab-side-border: ThreeDLightShadow;
+ --tst-tab-surface-hover: #e0e8f6;
+ --tst-tab-surface-selected: #c1d2ee;
+ --tst-tab-surface-selected-hover: #d1e2fe;
+
+ --tst-tabbar-bg: darkgray;
+}
+
+:root[devtoolstheme="dark"][treestyletab-devedition="true"] {
+ --tst-tab-highlighted-base: ThreeDHighlight;
+ --tst-tab-highlighted-highlight: Highlight;
+ --tst-tab-side-border: #39424D;
+ --tst-tab-surface-hover: #49525D;
+ --tst-tab-surface-selected: #1a4666;
+ --tst-tab-surface-selected-hover: #1f5981;
+
+ --tst-tabbar-bg: #1c2126;
+}
+
+
/* Default style */
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"]),
.treestyletab-tabbar-toolbar:not([treestyletab-tabbar-position="top"]) {
- appearance: none;
-moz-appearance: none;
background: transparent !important;
margin: 0 !important;
padding: 0 !important;
}
.tabbrowser-strip[treestyletab-style~="border"]:not([treestyletab-tabbar-position="top"]) {
- appearance: none;
-moz-appearance: none;
- background: darkgray !important;
+ background: var(--tst-tabbar-bg) !important;
}
.tabbrowser-strip[treestyletab-mode="vertical"],
@@ -37,17 +60,16 @@
margin: 0 !important;
padding: 0 !important;
box-shadow: none !important;
- -moz-box-shadow: none !important;
}
.tabbrowser-strip[treestyletab-tabbar-position="left"][treestyletab-tabbar-fixed="true"],
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="left"][treestyletab-tabbar-fixed="true"] {
- border-right: 1px solid ThreeDShadow !important;
+ border-right: 1px solid var(--tst-tab-border) !important;
-moz-border-right-colors: none !important;
}
.tabbrowser-strip[treestyletab-tabbar-position="right"][treestyletab-tabbar-fixed="true"],
.treestyletab-tabbar-toolbar[treestyletab-tabbar-position="right"][treestyletab-tabbar-fixed="true"] {
- border-left: 1px solid ThreeDShadow !important;
+ border-left: 1px solid var(--tst-tab-border) !important;
-moz-border-left-colors: none !important;
}
@@ -78,7 +100,8 @@
width: 0;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
- .tabbrowser-tab:hover .tab-background:not([visuallyselected="true"]) {
+ .tabbrowser-tab:hover
+ .tab-background:not([selected="true"]):not([visuallyselected="true"]) {
background-image: none;
}
@@ -89,31 +112,28 @@
.tabbrowser-tab[visuallyselected="true"],
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"]) {
- appearance: none !important;
-moz-appearance: none !important;
min-height: 2em;
margin: 0 !important;
/*padding: 0 0.2em !important;*/
- color: -moz-dialogtext !important;
+ color: var(--tst-tab-text) !important;
-moz-background-origin: border !important;
background-origin: border-box !important;
background-position: 0 0 !important;
border-top: 2px solid !important;
-moz-border-top-colors: transparent transparent !important;
border-bottom: 2px solid !important;
- -moz-border-bottom-colors: ThreeDShadow transparent !important;
+ -moz-border-bottom-colors: var(--tst-tab-border) transparent !important;
border-radius: 0 !important;
- -moz-border-radius: 0 !important;
-moz-border-image: none !important;
border-image: none !important;
- box-align: stretch !important;
-moz-box-align: stretch !important;
}
/* override "-moz-menutext" color defined by the default theme, because it is too bright on Ubuntu */
#TabsToolbar:not(:-moz-lwtheme):not([treestyletab-tabbar-position="top"])
#tabbrowser-tabs
.tabbrowser-tab:not([visuallyselected]) {
- color: -moz-dialogtext !important;
+ color: var(--tst-tab-text) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([pinned]),
@@ -121,21 +141,22 @@
.tabbrowser-tab:not([pinned])[visuallyselected="true"],
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([pinned]):not([visuallyselected="true"]) {
- background: -moz-dialog repeat-x !important;
+ background: none repeat-x !important;
+ background-color: var(--tst-tab-surface) !important;
}
/* highlighted pinned tabs */
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab[pinned][titlechanged]:not([visuallyselected="true"]) {
background-image: radial-gradient(circle farthest-corner at 50% 3px,
- ThreeDHighlight 3%,
- Highlight 80%);
+ var(--tst-tab-highlighted-base) 3%,
+ var(--tst-tab-highlighted-highlight) 80%);
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab[pinned][titlechanged]:not([visuallyselected="true"]):hover {
background-image: radial-gradient(circle farthest-corner at 50% 3px,
- ThreeDHighlight 3%,
- Highlight 100%);
+ var(--tst-tab-highlighted-base) 3%,
+ var(--tst-tab-highlighted-highlight) 100%);
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
@@ -149,35 +170,49 @@
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
:-moz-any(.tabbrowser-tab[pinned],
.tabbrowser-tab[pinned][titlechanged]) {
- background: -moz-dialog repeat-x !important;
+ background: none repeat-x !important;
+ background-color: var(--tst-tab-surface) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-firsttab-border="true"]
.tabbrowser-tab:not([pinned="true"]):not([visuallyselected="true"]):first-child {
- -moz-border-top-colors: ThreeDShadow transparent !important;
+ -moz-border-top-colors: var(--tst-tab-border) transparent !important;
}
/* for Mac OS X */
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-content:not([pinned="true"]):not([visuallyselected="true"]),
+ :-moz-any(.tab-content:not([pinned="true"]):not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-content:not([pinned="true"])[selected="true"],
+ /* Firefox 50 and older */
.tab-content:not([pinned="true"])[visuallyselected="true"]) {
border: 0 none !important;
background: transparent !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-background-start:not([visuallyselected="true"]),
- .tab-background-middle:not([visuallyselected="true"]),
- .tab-background-end:not([visuallyselected="true"]),
+ :-moz-any(.tab-background-start:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-end:not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-background-start[selected="true"],
+ .tab-background-middle[selected="true"],
+ .tab-background-end[selected="true"],
+ /* Firefox 50 and older */
.tab-background-start[visuallyselected="true"],
.tab-background-middle[visuallyselected="true"],
.tab-background-end[visuallyselected="true"]) {
mask: none !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
- :-moz-any(.tab-background-start:not([visuallyselected="true"]),
- .tab-background-middle:not([visuallyselected="true"]):not([pinned]),
- .tab-background-middle:not([visuallyselected="true"])[pinned]:not([titlechanged]),
- .tab-background-end:not([visuallyselected="true"]),
+ :-moz-any(.tab-background-start:not([selected="true"]):not([visuallyselected="true"]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"]):not([pinned]),
+ .tab-background-middle:not([selected="true"]):not([visuallyselected="true"])[pinned]:not([titlechanged]),
+ .tab-background-end:not([selected="true"]):not([visuallyselected="true"]),
+ /* Firefox 51 and later */
+ .tab-background-start[selected="true"],
+ .tab-background-middle[selected="true"],
+ .tab-background-end[selected="true"],
+ /* Firefox 50 and older */
.tab-background-start[visuallyselected="true"],
.tab-background-middle[visuallyselected="true"],
.tab-background-end[visuallyselected="true"]) {
@@ -210,8 +245,8 @@
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"] {
margin: 0 !important;
- -moz-border-top-colors: ThreeDHighlight transparent !important;
- -moz-border-bottom-colors: ThreeDShadow transparent !important;
+ -moz-border-top-colors: var(--tst-tab-surface-hover) transparent !important;
+ -moz-border-bottom-colors: var(--tst-tab-border) transparent !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"]:not([pinned]) {
@@ -221,7 +256,7 @@
.tabbrowser-tab:not([pinned])[visuallyselected="true"],
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[pinned][visuallyselected="true"] {
- background-color: ThreeDHighlight !important;
+ background-color: var(--tst-tab-surface-hover) !important;
}
@@ -239,14 +274,14 @@
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab:not([visuallyselected="true"]) {
border-left: 2px solid !important;
- -moz-border-left-colors: ThreeDLightShadow transparent !important;
+ -moz-border-left-colors: var(--tst-tab-side-border) transparent !important;
border-right: 2px solid !important;
- -moz-border-right-colors: ThreeDLightShadow transparent !important;
+ -moz-border-right-colors: var(--tst-tab-side-border) transparent !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab[visuallyselected="true"] {
- -moz-border-left-colors: ThreeDLightShadow transparent !important;
- -moz-border-right-colors: ThreeDLightShadow transparent !important;
+ -moz-border-left-colors: var(--tst-tab-side-border) transparent !important;
+ -moz-border-right-colors: var(--tst-tab-side-border) transparent !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
@@ -262,15 +297,14 @@
.tabbrowser-tabs[treestyletab-tabbar-position="bottom"]
.tabbrowser-tab:not([visuallyselected="true"]) {
border-right: 2px solid !important;
- -moz-border-right-colors: ThreeDShadow transparent !important;
+ -moz-border-right-colors: var(--tst-tab-border) transparent !important;
border-left: 2px solid !important;
- -moz-border-left-colors: ThreeDShadow transparent !important;
+ -moz-border-left-colors: var(--tst-tab-border) transparent !important;
}
/* Mac OS X */
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab {
- box-pack: start !important;
-moz-box-pack: start !important;
text-align: start !important;
}
@@ -284,10 +318,13 @@
.tabbrowser-tab:not([visuallyselected="true"]):not([pinned]),
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab
- .tab-content[visuallyselected="true"]:not([pinned]),
+ :-moz-any(/* Firefox 51 and later */
+ .tab-content[selected="true"]:not([pinned]),
+ /* Firefox 50 and older */
+ .tab-content[visuallyselected="true"]:not([pinned])),
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab
- .tab-content:not([visuallyselected="true"]):not([pinned]) {
+ .tab-content:not([selected="true"]):not([visuallyselected="true"]):not([pinned]) {
padding: 0 0.2em !important;
}
@@ -299,7 +336,6 @@
tabbrowser[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]),
:root[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]) #appcontent,
:root[treestyletab-style~="aero"]:not([treestyletab-tabbar-position="top"]) #browser {
- appearance: none !important;
-moz-appearance: none !important;
background: transparent !important;
}
diff --git a/skin/classic/treestyletab/square/dropshadow.css b/skin/classic/treestyletab/square/dropshadow.css
index 3c6ab5d..0993f0b 100644
--- a/skin/classic/treestyletab/square/dropshadow.css
+++ b/skin/classic/treestyletab/square/dropshadow.css
@@ -6,13 +6,11 @@
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab:not([pinned="true"]) {
box-shadow: -0.3em 0.3em 0.2em rgba(0, 0, 0, 0.15);
- -moz-box-shadow: -0.3em 0.3em 0.2em rgba(0, 0, 0, 0.15);
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab:not([pinned="true"]) {
box-shadow: 0.3em 0.3em 0.2em rgba(0, 0, 0, 0.15);
- -moz-box-shadow: 0.3em 0.3em 0.2em rgba(0, 0, 0, 0.15);
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
@@ -24,7 +22,6 @@
.tabbrowser-arrowscrollbox
.tabs-newtab-button {
box-shadow: 0 0.3em 0.2em rgba(0, 0, 0, 0.15);
- -moz-box-shadow: 0 0.3em 0.2em rgba(0, 0, 0, 0.15);
}
@@ -34,7 +31,6 @@
.tabbrowser-arrowscrollbox
.scrollbox-innerbox {
box-shadow: inset -0.2em 0.2em 0.3em rgba(0, 0, 0, 0.15) !important;
- -moz-box-shadow: inset -0.2em 0.2em 0.3em rgba(0, 0, 0, 0.15) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]:not([overflow="true"])
@@ -43,7 +39,6 @@
.tabbrowser-arrowscrollbox
.scrollbox-innerbox {
box-shadow: inset 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.15) !important;
- -moz-box-shadow: inset 0.2em 0.2em 0.3em rgba(0, 0, 0, 0.15) !important;
}
diff --git a/skin/classic/treestyletab/square/mixed.css b/skin/classic/treestyletab/square/mixed.css
index a5fcfda..58ea793 100644
--- a/skin/classic/treestyletab/square/mixed.css
+++ b/skin/classic/treestyletab/square/mixed.css
@@ -8,56 +8,56 @@
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"]):hover {
- -moz-border-top-colors: #e0e8f6 transparent !important;
- -moz-border-left-colors: #e0e8f6 transparent !important;
+ -moz-border-top-colors: var(--tst-tab-surface-hover) transparent !important;
+ -moz-border-left-colors: var(--tst-tab-surface-hover) transparent !important;
}
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"]):not([pinned]):hover,
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"])[pinned]:not([titlechanged]):hover {
- background-color: #e0e8f6 !important;
+ background-color: var(--tst-tab-surface-hover) !important;
}
.tabbrowser-tabs[treestyletab-style~="color"][treestyletab-mode="vertical"][treestyletab-firsttab-border="true"]
.tabbrowser-tab:first-child:not([visuallyselected="true"]):hover {
- -moz-border-top-colors: ThreeDShadow #e0e8f6 !important;
+ -moz-border-top-colors: var(--tst-tab-border) var(--tst-tab-surface-hover) !important;
}
.tabbrowser-tabs[treestyletab-style~="color"][treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab:not([visuallyselected="true"]):hover {
- -moz-border-right-colors: #e0e8f6 transparent !important;
+ -moz-border-right-colors: var(--tst-tab-surface-hover) transparent !important;
}
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"] {
- -moz-border-top-colors: #c1d2ee transparent !important;
- -moz-border-left-colors: #c1d2ee transparent !important;
+ -moz-border-top-colors: var(--tst-tab-surface-selected) transparent !important;
+ -moz-border-left-colors: var(--tst-tab-surface-selected) transparent !important;
}
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"] {
- background-color: #c1d2ee !important;
+ background-color: var(--tst-tab-surface-selected) !important;
}
.tabbrowser-tabs[treestyletab-style~="color"][treestyletab-mode="vertical"][treestyletab-firsttab-border="true"]
.tabbrowser-tab:first-child[visuallyselected="true"] {
- -moz-border-top-colors: ThreeDShadow #c1d2ee !important;
+ -moz-border-top-colors: var(--tst-tab-border) var(--tst-tab-surface-selected) !important;
}
.tabbrowser-tabs[treestyletab-style~="color"][treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab[visuallyselected="true"] {
- -moz-border-right-colors: #c1d2ee transparent !important;
+ -moz-border-right-colors: var(--tst-tab-surface-selected) transparent !important;
}
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"]:hover {
- -moz-border-top-colors: #d1e2fe transparent !important;
- -moz-border-left-colors: #d1e2fe transparent !important;
+ -moz-border-top-colors: var(--tst-tab-surface-selected-hover) transparent !important;
+ -moz-border-left-colors: var(--tst-tab-surface-selected-hover) transparent !important;
}
.tabbrowser-tabs[treestyletab-style~="color"]:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"]:hover {
- background-color: #d1e2fe !important;
+ background-color: var(--tst-tab-surface-selected-hover) !important;
}
.tabbrowser-tabs[treestyletab-style~="color"][treestyletab-mode="vertical"][treestyletab-firsttab-border="true"]
.tabbrowser-tab:first-child[visuallyselected="true"]:hover {
- -moz-border-top-colors: ThreeDShadow #d1e2fe !important;
+ -moz-border-top-colors: var(--tst-tab-border) var(--tst-tab-surface-selected-hover) !important;
}
.tabbrowser-tabs[treestyletab-style~="color"][treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab[visuallyselected="true"]:hover {
- -moz-border-right-colors: #d1e2fe transparent !important;
+ -moz-border-right-colors: var(--tst-tab-surface-selected-hover) transparent !important;
}
diff --git a/skin/classic/treestyletab/square/tab-surface.css b/skin/classic/treestyletab/square/tab-surface.css
index a9b3d0d..ba8075e 100644
--- a/skin/classic/treestyletab/square/tab-surface.css
+++ b/skin/classic/treestyletab/square/tab-surface.css
@@ -5,7 +5,6 @@
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab
.tab-background {
- -moz-transition: background 0.5s ease-out !important;
transition: background 0.5s ease-out !important;
}
@@ -13,7 +12,7 @@
.tabbrowser-tab:not([titlechanged])
:-moz-any(.tab-background:not([pinned]),
.tab-background[pinned]) {
- background-color: -moz-dialog !important;
+ background-color: var(--tst-tab-surface) !important;
background-image: -moz-linear-gradient(
top,
rgba(0, 0, 0, 0.02) 0,
@@ -23,9 +22,12 @@
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
- .tabbrowser-tab
- .tab-background[visuallyselected="true"] {
- background-color: #c1d2ee !important;
+ .tabbrowser-tab[visuallyselected="true"]
+ :-moz-any(/* Firefox 51 and later */
+ .tab-background[selected="true"],
+ /* Firefox 50 and older */
+ .tab-background[visuallyselected="true"]) {
+ background-color: var(--tst-tab-surface-selected) !important;
background-image: -moz-linear-gradient(
top,
rgba(4, 83, 227, 0.04) 0,
@@ -40,7 +42,7 @@
.tabbrowser-tab:hover
:-moz-any(.tab-background:not([pinned]),
.tab-background[pinned]:not([titlechanged])) {
- background-color: #e0e8f6 !important;
+ background-color: var(--tst-tab-surface-hover) !important;
background-image: -moz-linear-gradient(
top,
rgba(213, 224, 245, 1) 0,
@@ -50,8 +52,11 @@
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:hover
- .tab-background[visuallyselected="true"] {
- background-color: #d1e2fe !important;
+ :-moz-any(/* Firefox 51 and later */
+ .tab-background[selected="true"],
+ /* Firefox 50 and older */
+ .tab-background[visuallyselected="true"]) {
+ background-color: var(--tst-tab-surface-selected-hover) !important;
background-image: -moz-linear-gradient(
top,
rgba(199, 219, 252, 1) 0,
@@ -64,5 +69,5 @@
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tabbrowser-tab[pinned]:not([treestyletab-drop-position]) {
- -moz-border-right-colors: ThreeDShadow transparent !important;
+ -moz-border-right-colors: var(--tst-tab-border) transparent !important;
}
diff --git a/skin/classic/treestyletab/square/vertigo.css b/skin/classic/treestyletab/square/vertigo.css
index 68bd86b..8145bc7 100644
--- a/skin/classic/treestyletab/square/vertigo.css
+++ b/skin/classic/treestyletab/square/vertigo.css
@@ -30,32 +30,32 @@
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"]):hover {
- -moz-border-top-colors: #e0e8f6 #e0e8f6 !important;
- -moz-border-bottom-colors: #e0e8f6 #e0e8f6 !important;
+ -moz-border-top-colors: var(--tst-tab-surface-hover) var(--tst-tab-surface-hover) !important;
+ -moz-border-bottom-colors: var(--tst-tab-surface-hover) var(--tst-tab-surface-hover) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"]):not([pinned]):hover,
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab:not([visuallyselected="true"])[pinned]:not([titlechanged]):hover {
- background-color: #e0e8f6 !important;
+ background-color: var(--tst-tab-surface-hover) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"] {
- -moz-border-top-colors: #c1d2ee #c1d2ee !important;
- -moz-border-bottom-colors: #c1d2ee #c1d2ee !important;
+ -moz-border-top-colors: var(--tst-tab-surface-selected) var(--tst-tab-surface-selected) !important;
+ -moz-border-bottom-colors: var(--tst-tab-surface-selected) var(--tst-tab-surface-selected) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"] {
- background-color: #c1d2ee !important;
+ background-color: var(--tst-tab-surface-selected) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"]:hover {
- -moz-border-top-colors: #d1e2fe #d1e2fe !important;
- -moz-border-bottom-colors: #d1e2fe #d1e2fe !important;
+ -moz-border-top-colors: var(--tst-tab-surface-selected-hover) var(--tst-tab-surface-selected-hover) !important;
+ -moz-border-bottom-colors: var(--tst-tab-surface-selected-hover) var(--tst-tab-surface-selected-hover) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"]:hover {
- background-color: #d1e2fe !important;
+ background-color: var(--tst-tab-surface-selected-hover) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
@@ -69,27 +69,27 @@
.tabbrowser-tab:not([visuallyselected="true"]):hover,
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab:not([visuallyselected="true"]):hover {
- -moz-border-left-colors: #e0e8f6 #e0e8f6 !important;
- -moz-border-right-colors: #e0e8f6 #e0e8f6 !important;
+ -moz-border-left-colors: var(--tst-tab-surface-hover) var(--tst-tab-surface-hover) !important;
+ -moz-border-right-colors: var(--tst-tab-surface-hover) var(--tst-tab-surface-hover) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"],
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab[visuallyselected="true"] {
- -moz-border-left-colors: #c1d2ee #c1d2ee !important;
- -moz-border-right-colors: #c1d2ee #c1d2ee !important;
+ -moz-border-left-colors: var(--tst-tab-surface-selected) var(--tst-tab-surface-selected) !important;
+ -moz-border-right-colors: var(--tst-tab-surface-selected) var(--tst-tab-surface-selected) !important;
}
.tabbrowser-tabs:not([treestyletab-tabbar-position="top"])
.tabbrowser-tab[visuallyselected="true"]:hover,
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
.tabbrowser-tab[visuallyselected="true"]:hover {
- -moz-border-left-colors: #d1e2fe #d1e2fe !important;
- -moz-border-right-colors: #d1e2fe #d1e2fe !important;
+ -moz-border-left-colors: var(--tst-tab-surface-selected-hover) var(--tst-tab-surface-selected-hover) !important;
+ -moz-border-right-colors: var(--tst-tab-surface-selected-hover) var(--tst-tab-surface-selected-hover) !important;
}
/* autohide */
.treestyletab-tabbar-toolbar[treestyletab-tabbar-autohide][treestyletab-mode="vertical"]
#treestyletab-tabbar-resizer-box {
- background: -moz-dialog;
+ background: var(--tst-tab-surface);
opacity: 0.75;
}
diff --git a/skin/classic/treestyletab/tmp.css b/skin/classic/treestyletab/tmp.css
index 07dd4a0..167d7f9 100644
--- a/skin/classic/treestyletab/tmp.css
+++ b/skin/classic/treestyletab/tmp.css
@@ -38,20 +38,19 @@
:root[treestyletab-enable-compatibility-tmp="true"]
.tabbrowser-tabs[treestyletab-mode="vertical"] .tabs-closebutton-topbox > .tabs-closebutton {
- appearance: none !important;
-moz-appearance: none !important;
border: 0 none !important;
-moz-border-top-colors: none !important;
-moz-border-right-colors: none !important;
-moz-border-bottom-colors: none !important;
-moz-border-left-colors: none !important;
- border-top: 1px solid ThreeDShadow !important;
+ border-top: 1px solid var(--tst-tab-border) !important;
background: -moz-dialog !important;
}
:root[treestyletab-enable-compatibility-tmp="true"]
.tabbrowser-tabs[treestyletab-mode="vertical"] .tabs-closebutton-topbox > .tabs-closebutton:hover {
- background: ThreeDHighlight !important;
+ background: var(--tst-tab-surface-hover) !important;
}
:root[treestyletab-enable-compatibility-tmp="true"]
@@ -66,13 +65,9 @@
:root[treestyletab-enable-compatibility-tmp="true"]
.tabbrowser-tabs[treestyletab-mode="vertical"] .tabs-newtab-topbox > .tabs-newtab-button {
- box-flex: 1;
-moz-box-flex: 1;
- box-align: center;
-moz-box-align: center;
- box-pack: center;
-moz-box-pack: center;
- box-orient: vertical;
-moz-box-orient: vertical;
}
diff --git a/skin/classic/treestyletab/twisty/twisty.css b/skin/classic/treestyletab/twisty/twisty.css
index 2d4bd79..2b30bb4 100644
--- a/skin/classic/treestyletab/twisty/twisty.css
+++ b/skin/classic/treestyletab/twisty/twisty.css
@@ -12,11 +12,8 @@
max-width: 16px;
min-height: 16px;
min-width: 16px;
- box-pack: start;
-moz-box-pack: start;
- box-align: center;
-moz-box-align: center;
- box-flex: 1;
-moz-box-flex: 1;
}
diff --git a/skin/classic/treestyletab/ui-base.css b/skin/classic/treestyletab/ui-base.css
index 3a31d5f..3b730f0 100644
--- a/skin/classic/treestyletab/ui-base.css
+++ b/skin/classic/treestyletab/ui-base.css
@@ -3,9 +3,7 @@
/* tree UI */
.treestyletab-counter-container {
- box-align: center;
-moz-box-align: center;
- box-pack: end;
-moz-box-pack: end;
}
@@ -28,7 +26,7 @@
.tabbrowser-tab[treestyletab-drop-position="before"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-tabbar-position="bottom"]
.tabbrowser-tab[treestyletab-drop-position="before"]:not([visuallyselected="true"]):hover {
- -moz-border-left-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-left-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
.tabbrowser-tabs[treestyletab-tabbar-position="bottom"]
@@ -39,7 +37,7 @@
.tabbrowser-tab[treestyletab-drop-position="after"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-tabbar-position="bottom"]
.tabbrowser-tab[treestyletab-drop-position="after"]:not([visuallyselected="true"]):hover {
- -moz-border-right-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-right-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
@@ -67,10 +65,10 @@
.tabbrowser-tab[treestyletab-drop-position="self"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-tabbar-position="bottom"][treestyletab-style]
.tabbrowser-tab[treestyletab-drop-position="self"]:not([visuallyselected="true"]):hover {
- -moz-border-top-colors: -moz-dialogtext -moz-dialogtext !important;
- -moz-border-right-colors: -moz-dialogtext -moz-dialogtext !important;
- -moz-border-bottom-colors: -moz-dialogtext -moz-dialogtext !important;
- -moz-border-left-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-top-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
+ -moz-border-right-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
+ -moz-border-bottom-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
+ -moz-border-left-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]:not([treestyletab-style])
@@ -108,7 +106,7 @@
.tabbrowser-tab:first-child:not([pinned="true"])[treestyletab-drop-position="before"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style][treestyletab-firsttab-border="true"]
.tabbrowser-tab:first-child:not([pinned="true"])[treestyletab-drop-position="before"]:not([visuallyselected="true"]):hover {
- -moz-border-top-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-top-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style]
@@ -119,7 +117,7 @@
.tabbrowser-tab:not([pinned="true"])[treestyletab-drop-position="after"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style]
.tabbrowser-tab:not([pinned="true"])[treestyletab-drop-position="after"]:not([visuallyselected="true"]):hover {
- -moz-border-bottom-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-bottom-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style]
@@ -130,7 +128,7 @@
.tabbrowser-tab[pinned="true"][treestyletab-drop-position="before"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style]
.tabbrowser-tab[pinned="true"][treestyletab-drop-position="before"]:not([visuallyselected="true"]):hover {
- -moz-border-left-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-left-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style]
@@ -141,7 +139,7 @@
.tabbrowser-tab[pinned="true"][treestyletab-drop-position="after"]:not([visuallyselected="true"]),
.tabbrowser-tabs[treestyletab-mode="vertical"][treestyletab-style]
.tabbrowser-tab[pinned="true"][treestyletab-drop-position="after"]:not([visuallyselected="true"]):hover {
- -moz-border-right-colors: -moz-dialogtext -moz-dialogtext !important;
+ -moz-border-right-colors: var(--tst-tab-dropmarker) var(--tst-tab-dropmarker) !important;
}
@@ -159,13 +157,12 @@
.tabbrowser-tabs[treestyletab-tabbar-position="top"]
.tabbrowser-tab[treestyletab-drop-position="self"]:not([visuallyselected="true"]):hover
.tab-content {
- outline: 2px -moz-dialogtext solid !important;
+ outline: 2px var(--tst-tab-dropmarker) solid !important;
}
tabbrowser[treestyletab-drop-position] {
- appearance: none !important;
-moz-appearance: none !important;
border: 2px solid transparent !important;
-moz-border-top-colors: none !important;
@@ -195,16 +192,16 @@ tabbrowser[treestyletab-drop-position] {
opacity: 0.5;
}
tabbrowser[treestyletab-drop-position="top"]:not([treestyletab-tabbar-position="top"]) {
- border-top-color: -moz-dialogtext !important;
+ border-top-color: var(--tst-tab-dropmarker) !important;
}
tabbrowser[treestyletab-drop-position="right"]:not([treestyletab-tabbar-position="right"]) {
- border-right-color: -moz-dialogtext !important;
+ border-right-color: var(--tst-tab-dropmarker) !important;
}
tabbrowser[treestyletab-drop-position="bottom"]:not([treestyletab-tabbar-position="bottom"]) {
- border-bottom-color: -moz-dialogtext !important;
+ border-bottom-color: var(--tst-tab-dropmarker) !important;
}
tabbrowser[treestyletab-drop-position="left"]:not([treestyletab-tabbar-position="left"]) {
- border-left-color: -moz-dialogtext !important;
+ border-left-color: var(--tst-tab-dropmarker) !important;
}
@@ -249,6 +246,15 @@ tabbrowser[treestyletab-drop-position="left"]:not([treestyletab-tabbar-position=
max-height: 16px;
}
+.treestyletab-tabbar-toolbar[treestyletab-mode="vertical"]
+ toolbaritem {
+ /**
+ * This is required to block the tab bar to be shrunken.
+ * See: https://github.com/piroor/treestyletab/issues/964#issuecomment-153781248
+ */
+ min-width: 0 !important;
+}
+
/* transaprent tab bar */
.tabbrowser-tabs[treestyletab-tabbar-autohide]
@@ -275,15 +281,18 @@ tabbrowser[treestyletab-drop-position="left"]:not([treestyletab-tabbar-position=
tabbrowser[treestyletab-tabbar-position="left"]
.treestyletab-tabbar-toggler {
- border-right: 1px solid ThreeDShadow;
+ border-right: 1px solid;
+ border-right-color: var(--tst-tab-border);
}
tabbrowser[treestyletab-tabbar-position="right"]
.treestyletab-tabbar-toggler {
- border-left: 1px solid ThreeDShadow;
+ border-left: 1px solid;
+ border-left-color: var(--tst-tab-border);
}
tabbrowser[treestyletab-tabbar-position="bottom"]
.treestyletab-tabbar-toggler {
- border-top: 1px solid ThreeDShadow;
+ border-top: 1px solid;
+ border-top-color: var(--tst-tab-border);
}
.treestyletab-tabbar-toolbar[treestyletab-tabbar-autohide]
#treestyletab-tabbar-resizer-box {
@@ -294,7 +303,6 @@ tabbrowser[treestyletab-tabbar-position="bottom"]
/* toolbar customization */
.treestyletab-tabbar-toolbar-ready-popup {
- appearance: tooltip;
-moz-appearance: tooltip;
max-width: 15em;
opacity: 0.85;
@@ -308,7 +316,6 @@ tabbrowser[treestyletab-tabbar-position="bottom"]
/* pinned tabs */
.tabbrowser-tabs[treestyletab-mode="vertical"][positionpinnedtabs="true"] {
- padding-start: 0 !important;
-moz-padding-start: 0 !important;
}
@@ -332,18 +339,14 @@ tabbrowser[treestyletab-tabbar-position="bottom"]
.tabbrowser-tab[pinned="true"] .tab-stack,
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tab-content[pinned="true"] {
- box-align: center;
-moz-box-align: center;
- box-pack: center;
-moz-box-pack: center;
min-height: 0;
}
.tabbrowser-tabs[treestyletab-mode="vertical"]
.tab-background[pinned="true"] {
- box-align: stretch;
-moz-box-align: stretch;
- box-pack: justify;
-moz-box-pack: justify;
min-height: 0;
}
@@ -391,7 +394,6 @@ tabbrowser[treestyletab-tabbar-position="bottom"]
border: 0 none;
bottom: 0;
box-shadow: none;
- -moz-box-shadow: none;
height: 2em;
left: 0;
margin-top: -2em;
@@ -402,8 +404,6 @@ tabbrowser[treestyletab-tabbar-position="bottom"]
right: 0;
top: 0;
transition: 1s opacity ease-out;
- transition: 1s opacity ease-out;
- user-focus: ignore;
z-index: 99999;
-moz-user-focus: ignore;
}
@@ -424,7 +424,6 @@ tabbrowser[treestyletab-tabbar-position="bottom"]
outline: transparent solid 0.2em;
outline-offset: -0.2em;
-moz-outline-radius: 0.25em;
- outline-radius: 0.25em;
}
.tabbrowser-tab[treestyletab-highlighted='notifying'] {
outline: Highlight solid 0.2em;
--
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