[Pkg-mozext-commits] [tabmixplus] 18/61: Implement Firefox's overflow/underflow handler code from our overflow setter, with some them or extensions (Classic Theme Restorer) overflow event isn't fired properly on multi-row
David Prévot
taffit at moszumanska.debian.org
Fri Aug 28 19:09:18 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository tabmixplus.
commit 683c9986f8c4bc9ff75f8165de0f0b1e9e478d8b
Author: onemen <tabmix.onemen at gmail.com>
Date: Thu Jul 16 11:13:33 2015 +0300
Implement Firefox's overflow/underflow handler code from our overflow setter, with some them or extensions (Classic Theme Restorer) overflow event isn't fired properly on multi-row
---
chrome/content/tab/scrollbox.xml | 15 ---------------
chrome/content/tab/tab.js | 24 ++++++++++++++++++++----
2 files changed, 20 insertions(+), 19 deletions(-)
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index e5f7bb4..2642581 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -524,15 +524,6 @@
}
else
Tabmix.tabsUtils.overflow = false;
-
- this.updateOverflow(Tabmix.tabsUtils.overflow);
-
- if (tabs._lastTabClosedByMouse)
- tabs._expandSpacerBy(this._scrollButtonDown.clientWidth);
-
- tabs.tabbrowser._removingTabs.forEach(tabs.tabbrowser.removeTab,
- tabs.tabbrowser);
- tabs._positionPinnedTabs();
]]></handler>
<handler event="overflow"><![CDATA[
@@ -574,12 +565,6 @@
}
else
Tabmix.tabsUtils.overflow = true;
-
- this.updateOverflow(Tabmix.tabsUtils.overflow);
-
- tabs._positionPinnedTabs();
- if (Tabmix.isVersion(190))
- tabs._handleTabSelect(false);
]]></handler>
<handler event="scroll"><![CDATA[
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index a985c2c..30b9a87 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -920,13 +920,29 @@ Tabmix.tabsUtils = {
return val;
if (val != this.overflow) {
+ let tabBar = this.tabBar;
+ let tabstrip = tabBar.mTabstrip;
if (val)
- this.tabBar.setAttribute("overflow", "true");
+ tabBar.setAttribute("overflow", "true");
else
- this.tabBar.removeAttribute("overflow");
+ tabBar.removeAttribute("overflow");
this.showNewTabButtonOnSide(val, "right-side");
- if (typeof this.tabBar.mTabstrip.updateOverflow == "function")
- this.tabBar.mTabstrip.updateOverflow(val);
+
+ if (typeof tabstrip.updateOverflow == "function") {
+ tabstrip.updateOverflow(val);
+ // overflow/underflow handler from tabbrowser-arrowscrollbox binding
+ if (val) {
+ tabBar._positionPinnedTabs();
+ if (Tabmix.isVersion(190))
+ tabBar._handleTabSelect(false);
+ }
+ else {
+ if (tabBar._lastTabClosedByMouse)
+ tabBar._expandSpacerBy(tabstrip._scrollButtonDown.clientWidth);
+ gBrowser._removingTabs.forEach(gBrowser.removeTab, gBrowser);
+ tabBar._positionPinnedTabs();
+ }
+ }
}
return val;
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/tabmixplus.git
More information about the Pkg-mozext-commits
mailing list