[Pkg-mozext-commits] [tabmixplus] 26/44: Call updateScrollStatus when transitionend call adjustTabstrip (tab is fully open)

David Prévot taffit at moszumanska.debian.org
Fri Mar 18 20:57:16 UTC 2016


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit efc644a48be425938591d1d048ee467e15a46f79
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Feb 29 10:42:32 2016 +0200

    Call updateScrollStatus when transitionend call adjustTabstrip (tab is fully open)
---
 chrome/content/links/setup.js |  5 +++--
 chrome/content/tab/tab.js     | 11 ++++++++++-
 2 files changed, 13 insertions(+), 3 deletions(-)

diff --git a/chrome/content/links/setup.js b/chrome/content/links/setup.js
index 319878b..64a0696 100644
--- a/chrome/content/links/setup.js
+++ b/chrome/content/links/setup.js
@@ -341,6 +341,7 @@ Tabmix.adjustTabstrip = function tabContainer_adjustTabstrip(skipUpdateScrollSta
   *  Don't use return in this function
   *  TreeStyleTabe add some code at the end
   */
+  let transitionend = Tabmix.callerName() == "onxbltransitionend";
   if (tabsCount == 1) {
     let tab = this.selectedItem;
     if (!aUrl) {
@@ -355,8 +356,8 @@ Tabmix.adjustTabstrip = function tabContainer_adjustTabstrip(skipUpdateScrollSta
       this.removeAttribute("closebuttons-hover");
     }
   } else if ((!skipUpdateScrollStatus && oldValue != this.getAttribute("closebuttons")) ||
-           ("faviconize" in window && Tabmix.callerName() == "onxbltransitionend")) {
-    TabmixTabbar.updateScrollStatus();
+             transitionend) {
+    TabmixTabbar.updateScrollStatus(transitionend);
     TabmixTabbar.updateBeforeAndAfter();
   }
 };
diff --git a/chrome/content/tab/tab.js b/chrome/content/tab/tab.js
index f21f7fc..0bf7c65 100644
--- a/chrome/content/tab/tab.js
+++ b/chrome/content/tab/tab.js
@@ -175,7 +175,16 @@ var TabmixTabbar = {
     gTMPprefObserver.setShowNewTabButtonAttr(showNewTabButton, position);
   },
 
-  updateScrollStatus: function TMP_updateScrollStatus() {
+  updateScrollStatus: function TMP_updateScrollStatus(delay) {
+    if (delay) {
+      if (this.updateScrollStatus.timeout) {
+        return;
+      } else {
+        this.updateScrollStatus.timeout = setTimeout(() => {
+          this.updateScrollStatus.timeout = null;
+        }, 250);
+      }
+    }
     var tabBar = gBrowser.tabContainer;
     if (this.isMultiRow) {
       //XXX we only need setFirstTabInRow from here when tab width changed

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