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