diff --git a/content/treestyletab/treestyletab.css b/content/treestyletab/treestyletab.css index 4ec7184a..f408b659 100644 --- a/content/treestyletab/treestyletab.css +++ b/content/treestyletab/treestyletab.css @@ -74,13 +74,21 @@ tabbrowser[treestyletab-mode="vertical"] .tabs-stack > *:first-child + * > hbox: -moz-box-flex: 1 !important; } -.tabbrowser-tabs[treestyletab-mode="vertical"] - .tabbrowser-tab:not([treestyletab-removed="true"]):not([pinned]), -.tabbrowser-tabs[treestyletab-mode="vertical"] - .tabbrowser-tab:not([treestyletab-removed="true"]):not([fadein]) { - max-width: none !important; +/** + * Firefox 4.0 finishes opening and closing processes of tabs by its + * "transitionend" events about max-width property. I think this is very + * dirty and specific implementation but it won't fixed. + * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=585417#c3 ) + * So we have to define max-width for both states [fadein] (means "completely + * opened") and :not([fadein]) (means "in opening/removing process". + */ +.tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-tab:not([pinned]) { + max-width: 65000px !important; min-width: 1px !important; } +.tabbrowser-tabs[treestyletab-mode="vertical"] .tabbrowser-tab:not([pinned])[fadein] { + max-width: 65001px !important; +} /* pinned tabs on Firefox 4.0 */ .tabbrowser-tabs[treestyletab-mode="vertical"] diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index ba2d0ee1..2103e015 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -278,7 +278,6 @@ TreeStyleTabBrowser.prototype = { b.mTabContainer.addEventListener('TabMove', this, true); b.mTabContainer.addEventListener('SSTabRestoring', this, true); b.mTabContainer.addEventListener('SSTabRestored', this, true); - b.mTabContainer.addEventListener('transitionend', this, true); b.mTabContainer.addEventListener('DOMAttrModified', this, true); b.mTabContainer.addEventListener('mouseover', this, true); b.mTabContainer.addEventListener('mouseout', this, true); @@ -1565,7 +1564,6 @@ TreeStyleTabBrowser.prototype = { b.mTabContainer.removeEventListener('TabMove', this, true); b.mTabContainer.removeEventListener('SSTabRestoring', this, true); b.mTabContainer.removeEventListener('SSTabRestored', this, true); - b.mTabContainer.removeEventListener('transitionend', this, true); b.mTabContainer.removeEventListener('DOMAttrModified', this, true); b.mTabContainer.removeEventListener('mouseover', this, true); b.mTabContainer.removeEventListener('mouseout', this, true); @@ -1917,9 +1915,6 @@ TreeStyleTabBrowser.prototype = { case 'SSTabRestored': return this.onTabRestored(aEvent); - case 'transitionend': - return this.onTabAnimationEnd(aEvent); - case 'DOMAttrModified': return this.onDOMAttrModified(aEvent); @@ -2830,25 +2825,6 @@ TreeStyleTabBrowser.prototype = { TreeStyleTabService.restoringTree = TreeStyleTabService.getRestoringTabsCount() > 0; }, - onTabAnimationEnd : function TSTBrowser_onTabAnimationEnd(aEvent) - { - /* - "transitionend" event isn't fired multiplly, so, Firefox's - default handler possibly fails to handle animation end - because it watches only "max-width" property. - For safety, I decided to clean up all of removing tabs - by any animation end. - */ - var tab = aEvent.target; - var b = this.browser; - if (tab.localName == 'tab' && b) { - if (tab.getAttribute('fadein') == 'true') - b.tabContainer._handleNewTab(tab); - else if (b._removingTabs.indexOf(tab) > -1) - b._endRemoveTab(tab); - } - }, - onDOMAttrModified : function TSTBrowser_onDOMAttrModified(aEvent) { switch (aEvent.attrName)