Bug 1311439 - Skip _notifyBackgroundTab for hidden tabs. r=Gijs draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 19 Oct 2016 11:56:08 -0500
changeset 427087 4c3fbbda9dd1537e0632663e4a7c64f622fffbe4
parent 427069 f40960c63bfac865d510ec9da42eeed74c384082
child 534369 c53b03114342eb212048f56351e7ddb3d746909b
push id32911
push userbmo:jryans@gmail.com
push dateWed, 19 Oct 2016 17:39:34 +0000
reviewersGijs
bugs1311439
milestone52.0a1
Bug 1311439 - Skip _notifyBackgroundTab for hidden tabs. r=Gijs If a hidden tab is added at the end of a tab bar with enough tabs to show the scrollbutton-down arrow, it would cause the arrow to highlight incorrectly, suggesting there an additional tab to find, but in reality there isn't since it is hidden. This can occur with DevTools Responsive Design Mode which makes use of hidden tabs. By skipping `_notifyBackgroundTab` for hidden tabs, we avoid this issue because we no longer attempt to highlight the arrow. MozReview-Commit-ID: 2FoJ7UouJCL
browser/base/content/tabbrowser.xml
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -5653,17 +5653,17 @@
 
       <field name="_animateElement">
         this.mTabstrip._scrollButtonDown;
       </field>
 
       <method name="_notifyBackgroundTab">
         <parameter name="aTab"/>
         <body><![CDATA[
-          if (aTab.pinned)
+          if (aTab.pinned || aTab.hidden)
             return;
 
           var scrollRect = this.mTabstrip.scrollClientRect;
           var tab = aTab.getBoundingClientRect();
           this.mTabstrip._calcTabMargins(aTab);
 
           // DOMRect left/right properties are immutable.
           tab = {left: tab.left, right: tab.right};