after I exit from the toolbar customize, then count of child tabs were lost.
This commit is contained in:
parent
be197178b5
commit
56d79c8b11
@ -188,14 +188,7 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
this.fireTabbarPositionEvent(true, oldPosition, aNewPosition);
|
this.fireTabbarPositionEvent(true, oldPosition, aNewPosition);
|
||||||
|
|
||||||
this.initTabbar(aNewPosition, oldPosition);
|
this.initTabbar(aNewPosition, oldPosition);
|
||||||
|
this.reinitAllTabs();
|
||||||
var tabs = this.getAllTabsArray(this.mTabBrowser);
|
|
||||||
tabs.forEach(function(aTab) {
|
|
||||||
this.initTabAttributes(aTab);
|
|
||||||
}, this);
|
|
||||||
tabs.forEach(function(aTab) {
|
|
||||||
this.initTabContents(aTab);
|
|
||||||
}, this);
|
|
||||||
|
|
||||||
window.setTimeout(function(aSelf) {
|
window.setTimeout(function(aSelf) {
|
||||||
aSelf.checkTabsIndentOverflow();
|
aSelf.checkTabsIndentOverflow();
|
||||||
@ -1579,30 +1572,34 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
reinitAllTabs : function TSTBrowser_reinitAllTabs(aSouldUpdateCount)
|
||||||
|
{
|
||||||
|
var tabs = this.getAllTabsArray(this.mTabBrowser);
|
||||||
|
tabs.forEach(function(aTab) {
|
||||||
|
this.initTabAttributes(aTab);
|
||||||
|
this.initTabContents(aTab);
|
||||||
|
if (aSouldUpdateCount)
|
||||||
|
this.updateTabsCount(aTab);
|
||||||
|
}, this);
|
||||||
|
},
|
||||||
|
|
||||||
syncReinitTabbar : function TSTBrowser_syncReinitTabbar()
|
syncReinitTabbar : function TSTBrowser_syncReinitTabbar()
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
window.setTimeout(function(aSelf) {
|
|
||||||
aSelf._syncReinitTabbarInternal();
|
|
||||||
}, 0, this);
|
|
||||||
},
|
|
||||||
_syncReinitTabbarInternal : function TSTBrowser_syncReinitTabbarInternal()
|
|
||||||
{
|
|
||||||
*/
|
|
||||||
this.mTabBrowser.mTabContainer.parentNode.classList.add(this.kTABBAR_TOOLBAR);
|
this.mTabBrowser.mTabContainer.parentNode.classList.add(this.kTABBAR_TOOLBAR);
|
||||||
|
|
||||||
if (this._lastTabbarPositionBeforeDestroyed) {
|
var position = this._lastTabbarPositionBeforeDestroyed || this.position;
|
||||||
let self = this;
|
delete this._lastTabbarPositionBeforeDestroyed;
|
||||||
this.doAndWaitDOMEvent(
|
|
||||||
this.kEVENT_TYPE_TABBAR_INITIALIZED,
|
var self = this;
|
||||||
window,
|
this.doAndWaitDOMEvent(
|
||||||
100,
|
this.kEVENT_TYPE_TABBAR_INITIALIZED,
|
||||||
function() {
|
window,
|
||||||
self.initTabbar(self._lastTabbarPositionBeforeDestroyed, 'top');
|
100,
|
||||||
}
|
function() {
|
||||||
);
|
self.initTabbar(position, 'top');
|
||||||
delete this._lastTabbarPositionBeforeDestroyed;
|
}
|
||||||
}
|
);
|
||||||
|
this.reinitAllTabs(true);
|
||||||
|
|
||||||
this.tabbarDNDObserver.startListenEvents();
|
this.tabbarDNDObserver.startListenEvents();
|
||||||
},
|
},
|
||||||
@ -1708,8 +1705,8 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
|
|
||||||
syncDestroyTabbar : function TSTBrowser_syncDestroyTabbar()
|
syncDestroyTabbar : function TSTBrowser_syncDestroyTabbar()
|
||||||
{
|
{
|
||||||
|
this._lastTabbarPositionBeforeDestroyed = this.position;
|
||||||
if (this.position != 'top') {
|
if (this.position != 'top') {
|
||||||
this._lastTabbarPositionBeforeDestroyed = this.position;
|
|
||||||
let self = this;
|
let self = this;
|
||||||
this.doAndWaitDOMEvent(
|
this.doAndWaitDOMEvent(
|
||||||
this.kEVENT_TYPE_TABBAR_POSITION_CHANGED,
|
this.kEVENT_TYPE_TABBAR_POSITION_CHANGED,
|
||||||
@ -4224,9 +4221,11 @@ TreeStyleTabBrowser.prototype = {
|
|||||||
if (count) {
|
if (count) {
|
||||||
count.setAttribute('value', this.getDescendantTabs(aTab).length);
|
count.setAttribute('value', this.getDescendantTabs(aTab).length);
|
||||||
}
|
}
|
||||||
var parent = this.getParentTab(aTab);
|
if (!aDontUpdateAncestor) {
|
||||||
if (parent && !aDontUpdateAncestor)
|
let parent = this.getParentTab(aTab);
|
||||||
this.updateTabsCount(parent);
|
if (parent)
|
||||||
|
this.updateTabsCount(parent);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
promoteTooDeepLevelTabs : function TSTBrowser_promoteTooDeepLevelTabs(aParent)
|
promoteTooDeepLevelTabs : function TSTBrowser_promoteTooDeepLevelTabs(aParent)
|
||||||
|
Loading…
Reference in New Issue
Block a user