* Pinned tabs in the rightside tab bar were unexpectedly animated. (fix for https://github.com/piroor/treestyletab/issues/95 )
* Pinned tabs were not animated anymore. (regression)
This commit is contained in:
parent
cf431324ea
commit
442f4b48e6
@ -319,36 +319,20 @@ toolbar.treestyletab-tabbar-toolbar-ready:not([nowindowdrag="true"]),
|
|||||||
|
|
||||||
/* animation effects */
|
/* animation effects */
|
||||||
|
|
||||||
.tabbrowser-tabs[treestyletab-animation-enabled="true"][treestyletab-mode="vertical"]:not([treestyletab-tab-inverted="true"])
|
.tabbrowser-tabs[treestyletab-animation-enabled="true"][treestyletab-mode="vertical"]
|
||||||
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
|
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
|
||||||
-moz-transition: margin-top 0.15s ease-out,
|
-moz-transition: margin-left 0.2s ease-out,
|
||||||
opacity 0.15s ease-out,
|
|
||||||
margin-left 0.2s ease-out,
|
|
||||||
min-height 0.15s ease-out,
|
|
||||||
max-height 0.15s ease-out,
|
|
||||||
min-width 0.15s ease-out /* for Firefox itself */,
|
|
||||||
max-width 0.15s ease-out /* for Firefox itself */;
|
|
||||||
transition: margin-top 0.15s ease-out,
|
|
||||||
opacity 0.15s ease-out,
|
|
||||||
margin-left 0.2s ease-out,
|
|
||||||
min-height 0.15s ease-out,
|
|
||||||
max-height 0.15s ease-out,
|
|
||||||
min-width 0.15s ease-out /* for Firefox itself */,
|
|
||||||
max-width 0.15s ease-out /* for Firefox itself */;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tabbrowser-tabs[treestyletab-animation-enabled="true"][treestyletab-mode="vertical"][treestyletab-tab-inverted="true"]
|
|
||||||
.tabbrowser-tab:not([treestyletab-collapsed-done="true"]) {
|
|
||||||
-moz-transition: margin-top 0.15s ease-out,
|
|
||||||
opacity 0.15s ease-out,
|
|
||||||
margin-right 0.2s ease-out,
|
margin-right 0.2s ease-out,
|
||||||
|
margin-top 0.15s ease-out,
|
||||||
|
opacity 0.15s ease-out,
|
||||||
min-height 0.15s ease-out,
|
min-height 0.15s ease-out,
|
||||||
max-height 0.15s ease-out,
|
max-height 0.15s ease-out,
|
||||||
min-width 0.15s ease-out /* for Firefox itself */,
|
min-width 0.15s ease-out /* for Firefox itself */,
|
||||||
max-width 0.15s ease-out /* for Firefox itself */;
|
max-width 0.15s ease-out /* for Firefox itself */;
|
||||||
transition: margin-top 0.15s ease-out,
|
transition: margin-left 0.2s ease-out,
|
||||||
opacity 0.15s ease-out,
|
|
||||||
margin-right 0.2s ease-out,
|
margin-right 0.2s ease-out,
|
||||||
|
margin-top 0.15s ease-out,
|
||||||
|
opacity 0.15s ease-out,
|
||||||
min-height 0.15s ease-out,
|
min-height 0.15s ease-out,
|
||||||
max-height 0.15s ease-out,
|
max-height 0.15s ease-out,
|
||||||
min-width 0.15s ease-out /* for Firefox itself */,
|
min-width 0.15s ease-out /* for Firefox itself */,
|
||||||
|
@ -302,7 +302,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
positionPinnedTabs : function TSTBrowser_positionPinnedTabs(aWidth, aHeight)
|
positionPinnedTabs : function TSTBrowser_positionPinnedTabs(aWidth, aHeight, aJustNow)
|
||||||
{
|
{
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var tabbar = b.tabContainer;
|
var tabbar = b.tabContainer;
|
||||||
@ -344,6 +344,11 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
{
|
{
|
||||||
let style = tabbar.childNodes[i].style;
|
let style = tabbar.childNodes[i].style;
|
||||||
style.MozMarginStart = '';
|
style.MozMarginStart = '';
|
||||||
|
|
||||||
|
let transitionStyleBackup = style.transition || style.MozTransition || '';
|
||||||
|
if (aJustNow)
|
||||||
|
style.MozTransition = style.transition = 'none';
|
||||||
|
|
||||||
if (inverted) {
|
if (inverted) {
|
||||||
/**
|
/**
|
||||||
* In a box with "direction: rtr", we have to position tabs
|
* In a box with "direction: rtr", we have to position tabs
|
||||||
@ -358,8 +363,15 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
style.setProperty('margin-left', ((width * col) + shrunkenOffset)+'px', 'important');
|
style.setProperty('margin-left', ((width * col) + shrunkenOffset)+'px', 'important');
|
||||||
style.marginRight = '';
|
style.marginRight = '';
|
||||||
}
|
}
|
||||||
|
|
||||||
style.setProperty('margin-top', (- height * (maxRow - row))+'px', 'important');
|
style.setProperty('margin-top', (- height * (maxRow - row))+'px', 'important');
|
||||||
style.top = style.right = style.bottom = style.left = '';
|
style.top = style.right = style.bottom = style.left = '';
|
||||||
|
|
||||||
|
if (aJustNow)
|
||||||
|
this.Deferred.next(function() { // "transition" must be cleared after the reflow.
|
||||||
|
style.MozTransition = style.transition = transitionStyleBackup;
|
||||||
|
});
|
||||||
|
|
||||||
col++;
|
col++;
|
||||||
if (col >= maxCol) {
|
if (col >= maxCol) {
|
||||||
col = 0;
|
col = 0;
|
||||||
@ -1511,7 +1523,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this._updateFloatingTabbarReason |= aReason;
|
this._updateFloatingTabbarReason |= aReason;
|
||||||
|
|
||||||
if (this._updateFloatingTabbarReason & this.kTABBAR_UPDATE_NOW) {
|
if (this._updateFloatingTabbarReason & this.kTABBAR_UPDATE_NOW) {
|
||||||
this._updateFloatingTabbarInternal(this.updateFloatingTabbarReason);
|
this._updateFloatingTabbarInternal(this._updateFloatingTabbarReason);
|
||||||
this._updateFloatingTabbarReason = 0;
|
this._updateFloatingTabbarReason = 0;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -1623,7 +1635,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.mTabBrowser.tabContainer.removeAttribute('context');
|
this.mTabBrowser.tabContainer.removeAttribute('context');
|
||||||
}
|
}
|
||||||
|
|
||||||
this.positionPinnedTabs();
|
this.positionPinnedTabs(null, null, aReason & this.kTABBAR_UPDATE_BY_AUTOHIDE);
|
||||||
},
|
},
|
||||||
|
|
||||||
_updateFloatingTabbarResizer : function TSTBrowser_updateFloatingTabbarResizer(aSize)
|
_updateFloatingTabbarResizer : function TSTBrowser_updateFloatingTabbarResizer(aSize)
|
||||||
|
Loading…
Reference in New Issue
Block a user