他の場面でも描画の一時停止を行うようにしてみた
git-svn-id: http://www.cozmixng.org/repos/piro/treestyletab/trunk@5576 599a83e7-65a4-db11-8015-0010dcdd6dc2
This commit is contained in:
parent
551572acd3
commit
c8cf5b26c2
@ -497,12 +497,17 @@ var TreeStyleTabService = {
|
|||||||
|
|
||||||
stopRendering : function()
|
stopRendering : function()
|
||||||
{
|
{
|
||||||
this.rootContentViewer.hide();
|
if (!this._stopRenderingLevel)
|
||||||
|
this.rootContentViewer.hide();
|
||||||
|
this._stopRenderingLevel++;
|
||||||
},
|
},
|
||||||
startRendering : function()
|
startRendering : function()
|
||||||
{
|
{
|
||||||
this.rootContentViewer.show();
|
this._stopRenderingLevel--;
|
||||||
|
if (!this._stopRenderingLevel)
|
||||||
|
this.rootContentViewer.show();
|
||||||
},
|
},
|
||||||
|
_stopRenderingLevel : 0,
|
||||||
get rootContentViewer()
|
get rootContentViewer()
|
||||||
{
|
{
|
||||||
return window
|
return window
|
||||||
|
@ -750,6 +750,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
initTabbar : function(aPosition)
|
initTabbar : function(aPosition)
|
||||||
{
|
{
|
||||||
|
this.stopRendering();
|
||||||
|
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
|
|
||||||
if (!aPosition) aPosition = this.currentTabbarPosition;
|
if (!aPosition) aPosition = this.currentTabbarPosition;
|
||||||
@ -954,10 +956,14 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
scrollInnerBox = null;
|
scrollInnerBox = null;
|
||||||
scrollInnerBox = null;
|
scrollInnerBox = null;
|
||||||
allTabsButton = null;
|
allTabsButton = null;
|
||||||
|
|
||||||
|
this.startRendering();
|
||||||
},
|
},
|
||||||
|
|
||||||
updateTabbarState : function()
|
updateTabbarState : function()
|
||||||
{
|
{
|
||||||
|
this.stopRendering();
|
||||||
|
|
||||||
var b = this.mTabBrowser;
|
var b = this.mTabBrowser;
|
||||||
var orient;
|
var orient;
|
||||||
if (this.isVertical) {
|
if (this.isVertical) {
|
||||||
@ -997,6 +1003,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
else
|
else
|
||||||
b.removeAttribute(this.kHIDE_ALLTABS);
|
b.removeAttribute(this.kHIDE_ALLTABS);
|
||||||
|
|
||||||
|
this.startRendering();
|
||||||
this.updateAllTabsIndent();
|
this.updateAllTabsIndent();
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -1498,12 +1505,16 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
var closeParentBehavior = this.getTreePref('closeParentBehavior');
|
var closeParentBehavior = this.getTreePref('closeParentBehavior');
|
||||||
var closeRootBehavior = this.getTreePref('closeRootBehavior');
|
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 (
|
if (
|
||||||
closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_CLOSE ||
|
closeParentBehavior == this.CLOSE_PARENT_BEHAVIOR_CLOSE ||
|
||||||
collapsed
|
subtreeCollapsed
|
||||||
) {
|
) {
|
||||||
if (collapsed)
|
if (subtreeCollapsed)
|
||||||
this.stopRendering();
|
this.stopRendering();
|
||||||
|
|
||||||
this.getDescendantTabs(tab).reverse().forEach(function(aTab) {
|
this.getDescendantTabs(tab).reverse().forEach(function(aTab) {
|
||||||
@ -1518,7 +1529,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
b.addTab('about:blank');
|
b.addTab('about:blank');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (collapsed)
|
if (subtreeCollapsed)
|
||||||
this.startRendering();
|
this.startRendering();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1672,6 +1683,9 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
)
|
)
|
||||||
b.selectedTab = nextFocusedTab;
|
b.selectedTab = nextFocusedTab;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (collapsed)
|
||||||
|
this.startRendering();
|
||||||
},
|
},
|
||||||
CLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST : 3,
|
CLOSE_PARENT_BEHAVIOR_PROMOTE_FIRST : 3,
|
||||||
CLOSE_PARENT_BEHAVIOR_PROMOTE_ALL : 0,
|
CLOSE_PARENT_BEHAVIOR_PROMOTE_ALL : 0,
|
||||||
|
Loading…
Reference in New Issue
Block a user