diff --git a/browser/base/content/tabbrowser.xml b/browser/base/content/tabbrowser.xml index 40adfa52b84..5db0db3fefa 100644 --- a/browser/base/content/tabbrowser.xml +++ b/browser/base/content/tabbrowser.xml @@ -2963,9 +2963,6 @@ @@ -3020,6 +3017,28 @@ case "TabOpen": this._createTabMenuItem(aEvent.originalTarget); break; + case "scroll": + this._updateTabsVisibilityStatus(); + break; + } + ]]> + + + + = tabstripBO.screenX && + curTabBO.screenX + curTabBO.width <= tabstripBO.screenX + tabstripBO.width) + this.childNodes[i].setAttribute("tabIsVisible", "true"); + else + this.childNodes[i].removeAttribute("tabIsVisible"); } ]]> @@ -3066,6 +3085,7 @@ // Listen for changes in the tab bar. var tabbrowser = document.getBindingParent(tabcontainer); tabbrowser.addEventListener("TabOpen", this, false); + tabcontainer.mTabstrip.addEventListener("scroll", this, false); // if an animation is in progress and the user // clicks on the "all tabs" button, stop the animation @@ -3074,6 +3094,7 @@ for (var i = 0; i < tabs.length; i++) { this._createTabMenuItem(tabs[i]); } + this._updateTabsVisibilityStatus(); ]]> @@ -3087,8 +3108,9 @@ menuItem.tab.mCorrespondingMenuitem = null; this.removeChild(menuItem); } - var tabbrowser = document.getBindingParent(document.getBindingParent(this)); - tabbrowser.removeEventListener("TabOpen", this, false); + var tabcontainer = document.getBindingParent(this); + tabcontainer.mTabstrip.removeEventListener("scroll", this, false); + document.getBindingParent(tabcontainer).removeEventListener("TabOpen", this, false); ]]>