Hide tab bar for only one tab window correctly (fix #406)

This commit is contained in:
YUKI Hiroshi 2012-11-15 16:03:24 +09:00
parent c326bdda44
commit f2fb69e663

View File

@ -1748,7 +1748,7 @@ TreeStyleTabBrowser.prototype = {
if (splitter.collapsed || splitter.getAttribute('state') != 'collapsed') { if (splitter.collapsed || splitter.getAttribute('state') != 'collapsed') {
this._tabStripPlaceHolder.collapsed = this._tabStripPlaceHolder.collapsed =
splitter.collapsed = splitter.collapsed =
(this.getPref('browser.tabs.autoHide') && this.getTabs(this.mTabBrowser).length == 1); (this.getPref('browser.tabs.autoHide') && this.getExistingTabsCount() == 1);
} }
var strip = this.tabStrip; var strip = this.tabStrip;
@ -1849,6 +1849,10 @@ TreeStyleTabBrowser.prototype = {
else else
this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE); this.positionPinnedTabsWithDelay(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE);
}, },
getExistingTabsCount : function TSTBrowser_getTabsCount()
{
return this.getAllTabs(this.mTabBrowser).length - this.mTabBrowser._removingTabs.length;
},
_updateFloatingTabbarResizer : function TSTBrowser_updateFloatingTabbarResizer(aSize) _updateFloatingTabbarResizer : function TSTBrowser_updateFloatingTabbarResizer(aSize)
{ {