他の場面でも描画の一時停止を行うようにしてみた

git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5576 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
piro 2009-12-21 05:45:07 +00:00
parent 551572acd3
commit c8cf5b26c2
2 changed files with 25 additions and 6 deletions

View File

@ -497,12 +497,17 @@ var TreeStyleTabService = {
stopRendering : function()
{
this.rootContentViewer.hide();
if (!this._stopRenderingLevel)
this.rootContentViewer.hide();
this._stopRenderingLevel++;
},
startRendering : function()
{
this.rootContentViewer.show();
this._stopRenderingLevel--;
if (!this._stopRenderingLevel)
this.rootContentViewer.show();
},
_stopRenderingLevel : 0,
get rootContentViewer()
{
return window

View File

@ -750,6 +750,8 @@ TreeStyleTabBrowser.prototype = {
initTabbar : function(aPosition)
{
this.stopRendering();
var b = this.mTabBrowser;
if (!aPosition) aPosition = this.currentTabbarPosition;
@ -954,10 +956,14 @@ TreeStyleTabBrowser.prototype = {
scrollInnerBox = null;
scrollInnerBox = null;
allTabsButton = null;
this.startRendering();
},
updateTabbarState : function()
{
this.stopRendering();
var b = this.mTabBrowser;
var orient;
if (this.isVertical) {
@ -997,6 +1003,7 @@ TreeStyleTabBrowser.prototype = {
else
b.removeAttribute(this.kHIDE_ALLTABS);
this.startRendering();
this.updateAllTabsIndent();
},
@ -1498,12 +1505,16 @@ TreeStyleTabBrowser.prototype = {
var closeParentBehavior = this.getTreePref('closeParentBehavior');
var closeRootBehavior = this.getTreePref('closeRootBehavior');
var collapsed = this.isSubtreeCollapsed(tab);
var collapsed = this.isCollapsed(tab);
if (collapsed)
this.stopRendering();
var subtreeCollapsed = this.isSubtreeCollapsed(tab);
if (
closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_CLOSE ||
collapsed
subtreeCollapsed
) {
if (collapsed)
if (subtreeCollapsed)
this.stopRendering();
this.getDescendantTabs(tab).reverse().forEach(function(aTab) {
@ -1518,7 +1529,7 @@ TreeStyleTabBrowser.prototype = {
b.addTab('about:blank');
}
if (collapsed)
if (subtreeCollapsed)
this.startRendering();
}
@ -1672,6 +1683,9 @@ TreeStyleTabBrowser.prototype = {
)
b.selectedTab = nextFocusedTab;
}
if (collapsed)
this.startRendering();
},
CLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST : 3,
CLOSE_PARENT_BEHAVIOR_PROMOTE_ALL : 0,