on Nightly 13.0a1, drag and drop of the last tree from another window broke tab animations (tab animations shouldn't be processed while the window is destroying)
This commit is contained in:
parent
5cbbd36fea
commit
d6f0e5e6b3
@ -291,6 +291,11 @@ TreeStyleTabBrowser.prototype = {
|
||||
{
|
||||
return this.isVertical ? this.counterRoleVertical : this.counterRoleHorizontal ;
|
||||
},
|
||||
|
||||
get isDestroying()
|
||||
{
|
||||
return !this.mTabBrowser || !this.mTabBrowser.mTabContainer;
|
||||
},
|
||||
|
||||
/* utils */
|
||||
|
||||
@ -4939,6 +4944,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
var CSSTransitionEnabled = ('Transition' in aTab.style || 'MozTransition' in aTab.style);
|
||||
if (CSSTransitionEnabled) {
|
||||
aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) {
|
||||
if (self.isDestroying) return true;
|
||||
aTab.style.setProperty(self.indentCSSProp, aIndent+'px', 'important');
|
||||
return true;
|
||||
};
|
||||
@ -4953,6 +4959,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
var delta = aIndent - startIndent;
|
||||
var radian = 90 * Math.PI / 180;
|
||||
aTab.__treestyletab__updateTabIndentTask = function(aTime, aBeginning, aChange, aDuration) {
|
||||
if (self.isDestroying) return true;
|
||||
var indent, finished;
|
||||
if (aTime >= aDuration) {
|
||||
delete aTab.__treestyletab__updateTabIndentTask;
|
||||
@ -5521,6 +5528,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
var self = this;
|
||||
var firstFrame = true;
|
||||
aTab.__treestyletab__updateTabCollapsedTask = function(aTime, aBeginning, aChange, aDuration) {
|
||||
if (self.isDestroying) return true;
|
||||
if (firstFrame) {
|
||||
// The callback must be started before offsetAttr is changed!
|
||||
if (aCallbackToRunOnStartAnimation)
|
||||
@ -5724,6 +5732,7 @@ TreeStyleTabBrowser.prototype = {
|
||||
var radian = 90 * Math.PI / 180;
|
||||
var self = this;
|
||||
this.smoothScrollTask = function(aTime, aBeginning, aChange, aDuration) {
|
||||
if (self.isDestroying) return true;
|
||||
var scrollBoxObject = self.scrollBoxObject;
|
||||
if (aTime >= aDuration || this.cancelingPerformingAutoScroll) {
|
||||
if (!this.cancelingPerformingAutoScroll) {
|
||||
|
@ -19,7 +19,7 @@
|
||||
// restart after doing something
|
||||
window['piro.sakura.ne.jp'].animationManager.start();
|
||||
|
||||
license: The MIT License, Copyright (c) 2009-2011 SHIMODA "Piro" Hiroshi
|
||||
license: The MIT License, Copyright (c) 2009-2012 SHIMODA "Piro" Hiroshi
|
||||
http://github.com/piroor/fxaddonlibs/blob/master/license.txt
|
||||
original:
|
||||
http://github.com/piroor/fxaddonlibs/blob/master/animationManager.js
|
||||
@ -46,7 +46,7 @@ if (typeof window == 'undefined' ||
|
||||
}
|
||||
|
||||
(function() {
|
||||
const currentRevision = 9;
|
||||
const currentRevision = 10;
|
||||
|
||||
if (!('piro.sakura.ne.jp' in window)) window['piro.sakura.ne.jp'] = {};
|
||||
|
||||
@ -245,6 +245,7 @@ if (typeof window == 'undefined' ||
|
||||
return !finished && (time < aTask.duration);
|
||||
}
|
||||
catch(e) {
|
||||
dump(e+'\n'+e.stack+'\n');
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user