ツリー全体を閉じる時も中間のアニメーションを表示しないように。
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5575 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
d39662c09b
commit
551572acd3
@ -495,6 +495,24 @@ var TreeStyleTabService = {
|
||||
|
||||
/* Utilities */
|
||||
|
||||
stopRendering : function()
|
||||
{
|
||||
this.rootContentViewer.hide();
|
||||
},
|
||||
startRendering : function()
|
||||
{
|
||||
this.rootContentViewer.show();
|
||||
},
|
||||
get rootContentViewer()
|
||||
{
|
||||
return window
|
||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIWebNavigation)
|
||||
.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.contentViewer
|
||||
.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
|
||||
},
|
||||
|
||||
isEventFiredOnTwisty : function(aEvent)
|
||||
{
|
||||
var tab = this.getTabFromEvent(aEvent);
|
||||
@ -2658,7 +2676,7 @@ catch(e) {
|
||||
this.promoteTab(this.browser.selectedTab);
|
||||
},
|
||||
|
||||
demoteTab : function(aTab) /* PUBLIC API */
|
||||
demoteTab : function(aTab) /* PUBLIC API */
|
||||
{
|
||||
var b = this.getTabBrowserFromChild(aTab);
|
||||
var sv = b.treeStyleTab;
|
||||
|
@ -1498,10 +1498,14 @@ TreeStyleTabBrowser.prototype = {
|
||||
var closeParentBehavior = this.getTreePref('closeParentBehavior');
|
||||
var closeRootBehavior = this.getTreePref('closeRootBehavior');
|
||||
|
||||
var collapsed = this.isSubtreeCollapsed(tab);
|
||||
if (
|
||||
closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_CLOSE ||
|
||||
this.isSubtreeCollapsed(tab)
|
||||
collapsed
|
||||
) {
|
||||
if (collapsed)
|
||||
this.stopRendering();
|
||||
|
||||
this.getDescendantTabs(tab).reverse().forEach(function(aTab) {
|
||||
b.removeTab(aTab);
|
||||
}, this);
|
||||
@ -1513,6 +1517,9 @@ TreeStyleTabBrowser.prototype = {
|
||||
) {
|
||||
b.addTab('about:blank');
|
||||
}
|
||||
|
||||
if (collapsed)
|
||||
this.startRendering();
|
||||
}
|
||||
|
||||
var firstChild = this.getFirstChildTab(tab);
|
||||
|
@ -436,24 +436,6 @@ TreeStyleTabBrowserAutoHide.prototype = {
|
||||
}, 0, this);
|
||||
},
|
||||
|
||||
stopRendering : function()
|
||||
{
|
||||
this.rootContentViewer.hide();
|
||||
},
|
||||
startRendering : function()
|
||||
{
|
||||
this.rootContentViewer.show();
|
||||
},
|
||||
get rootContentViewer()
|
||||
{
|
||||
return window
|
||||
.QueryInterface(Components.interfaces.nsIInterfaceRequestor)
|
||||
.getInterface(Components.interfaces.nsIWebNavigation)
|
||||
.QueryInterface(Components.interfaces.nsIDocShell)
|
||||
.contentViewer
|
||||
.QueryInterface(Components.interfaces.nsIMarkupDocumentViewer);
|
||||
},
|
||||
|
||||
show : function(aReason)
|
||||
{
|
||||
if (!this.expanded)
|
||||
|
Loading…
x
Reference in New Issue
Block a user