[Pkg-mozext-commits] [tabmixplus] 14/22: Follow up bug 1358721 - Avoid flushing layout in adjustTabstrip

David Prévot taffit at moszumanska.debian.org
Sat Aug 5 15:28:34 UTC 2017


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

taffit pushed a commit to tag 0.5.0.4pre.170625a1
in repository tabmixplus.

commit 1e5ce00908b29486928ecfa31ee3bd2c15edaf30
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Jun 19 18:05:08 2017 +0300

    Follow up bug 1358721 - Avoid flushing layout in adjustTabstrip
---
 chrome/content/links/setup.js | 6 ++++--
 chrome/content/tabmix.js      | 6 ++++++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index ee261a8..c30a6ec 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -316,9 +316,11 @@ Tabmix.adjustTabstrip = function tabContainer_adjustTabstrip(skipUpdateScrollSta
       break;
     case 5:
       this.removeAttribute("closebuttons-hover");
-      if (tabsCount < 3)
+      if (Tabmix.isVersion(550)) {
+        this.tabmix_adjustTabstrip();
+      } else if (tabsCount < 3) {
         this.setAttribute("closebuttons", "alltabs");
-      else {
+      } else {
         // make sure not to check collapsed, hidden or pinned tabs for width
         let tab = TMP_TabView.checkTabs(tabs);
         if (tab && tab.getBoundingClientRect().width > this.mTabClipWidth)
diff --git a/chrome/content/tabmix.js b/chrome/content/tabmix.js
index 82a3aa8..a3bed0e 100644
--- a/chrome/content/tabmix.js
+++ b/chrome/content/tabmix.js
@@ -583,6 +583,12 @@ var TMP_eventListener = {
     Tabmix.setItem("tmp_undocloseButton", "disabled", true);
     Tabmix.setItem("tmp_closedwindows", "disabled", true);
 
+    if (Tabmix.isVersion(550)) {
+      Tabmix.changeCode(tabBar, "gBrowser.tabContainer.adjustTabstrip")._replace(
+        'this.tabbrowser.visibleTabs[this.tabbrowser._numPinnedTabs];',
+        'TMP_TabView.checkTabs(this.tabbrowser.visibleTabs);'
+      ).toCode(false, tabBar, "tabmix_adjustTabstrip");
+    }
     Tabmix.setNewFunction(tabBar, "adjustTabstrip", Tabmix.adjustTabstrip);
     delete Tabmix.adjustTabstrip;
   },

-- 
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