[Pkg-mozext-commits] [tabmixplus] 43/123: Follow up bug 1024496 and changeset bb1f71e71f15 - update notoverflowing and call _updateScrollButtonsDisabledState from our overflow/underflow listeners and hide both indicators permanently when in multirow.

David Prévot taffit at moszumanska.debian.org
Wed Sep 17 21:16:25 UTC 2014


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

taffit pushed a commit to branch master
in repository tabmixplus.

commit 9b03a41f081dbe22932c2df0e9df7f2953496940
Author: onemen <tabmix.onemen at gmail.com>
Date:   Mon Aug 25 17:53:08 2014 +0300

    Follow up bug 1024496 and changeset bb1f71e71f15 - update notoverflowing and call _updateScrollButtonsDisabledState from our overflow/underflow listeners and hide both indicators permanently when in multirow.
---
 chrome/content/overlay/browsr.css |  1 +
 chrome/content/tab/scrollbox.xml  | 31 +++++++++++++++++++++++++++++++
 2 files changed, 32 insertions(+)

diff --git a/chrome/content/overlay/browsr.css b/chrome/content/overlay/browsr.css
index 2acb189..3b17299 100644
--- a/chrome/content/overlay/browsr.css
+++ b/chrome/content/overlay/browsr.css
@@ -336,4 +336,5 @@ so display: none !important; does not hide the button */
 .tabbrowser-arrowscrollbox[flowing="multibar"] > .arrowscrollbox-overflow-start-indicator,
 .tabbrowser-arrowscrollbox[flowing="multibar"] > .arrowscrollbox-overflow-end-indicator {
   margin-bottom: 0px;
+  visibility: collapse;
 }
diff --git a/chrome/content/tab/scrollbox.xml b/chrome/content/tab/scrollbox.xml
index 39f7011..1c1f940 100644
--- a/chrome/content/tab/scrollbox.xml
+++ b/chrome/content/tab/scrollbox.xml
@@ -377,6 +377,7 @@
               TabmixTabbar._failedToEnterVerticalMode = true;
             if (blockUnderflow && this.orient == "vertical")
               this.blockUnderflow = true;
+            this.updateOverflow(tabBar.overflow);
           }
         ]]></body>
       </method>
@@ -442,6 +443,32 @@
         ]]></body>
       </method>
 
+      <method name="updateOverflow">
+        <parameter name="overflow"/>
+        <body><![CDATA[
+          // we get here after we update overflow from updateVerticalTabStrip
+          if (this.orient == "horizontal")
+            return;
+
+          Tabmix.setItem(this, "notoverflowing", !overflow || null);
+
+          try {
+            // See bug 341047 and comments in overflow handler as to why
+            // try..catch is needed here
+            this._updateScrollButtonsDisabledState();
+
+            if (!overflow) {
+              let childNodes = this._getScrollableElements();
+              if (childNodes && childNodes.length)
+                this.ensureElementIsVisible(childNodes[0], false);
+            }
+          }
+          catch(e) {
+            Tabmix.setItem(this, "notoverflowing", overflow || null);
+          }
+        ]]></body>
+      </method>
+
     </implementation>
 
     <handlers>
@@ -475,6 +502,8 @@
         else
           tabs.overflow = false;
 
+        this.updateOverflow(tabs.overflow);
+
         if (tabs._lastTabClosedByMouse)
           tabs._expandSpacerBy(this._scrollButtonDown.clientWidth);
 
@@ -523,6 +552,8 @@
         else
           tabs.overflow = true;
 
+        this.updateOverflow(tabs.overflow);
+
         tabs._positionPinnedTabs();
         if (Tabmix.isVersion(190))
           tabs._handleTabSelect(false);

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