transitionendイベントを自力で捕捉するのをやめた
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@7206 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
e7b9ee61e7
commit
bd69ffca98
@ -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"]
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user