Skip to content

Commit

Permalink
Update floating tab bar when UI element is inserted/removed from the …
Browse files Browse the repository at this point in the history
…browser box (#546)
  • Loading branch information
piroor committed Oct 8, 2013
1 parent d2ff4f5 commit 4004ec6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions modules/browserUIShowHideObserver.js
Expand Up @@ -66,6 +66,7 @@ BrowserUIShowHideObserver.prototype = {
case 'childList':
this.destroyChildrenObserver();
this.initChildrenObserver();
this.owner.browser.treeStyleTab.updateFloatingTabbar(this.owner.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
return;

case 'attributes':
Expand Down
13 changes: 13 additions & 0 deletions modules/window.js
Expand Up @@ -166,6 +166,11 @@ TreeStyleTabWindow.prototype = {
return w.gToolbox || w.gNavToolbox;
},

get browserBox()
{
return this.document.getElementById('browser');
},

get browserBottomBox()
{
return this.document.getElementById('browser-bottombox');
Expand Down Expand Up @@ -470,6 +475,10 @@ TreeStyleTabWindow.prototype = {
if (toolbox)
this.browserToolboxObserver = new BrowserUIShowHideObserver(this, toolbox);

var browserBox = this.browserBox;
if (browserBox)
this.browserBoxObserver = new BrowserUIShowHideObserver(this, browserBox);

var bottomBox = this.browserBottomBox;
if (bottomBox)
this.browserBottomBoxObserver = new BrowserUIShowHideObserver(this, bottomBox);
Expand Down Expand Up @@ -510,6 +519,10 @@ TreeStyleTabWindow.prototype = {
this.browserToolboxObserver.destroy();
delete this.browserToolboxObserver;
}
if (this.browserBoxObserver) {
this.browserBoxObserver.destroy();
delete this.browserBoxObserver;
}
if (this.browserBottomBoxObserver) {
this.browserBottomBoxObserver.destroy();
delete this.browserBottomBoxObserver;
Expand Down

0 comments on commit 4004ec6

Please sign in to comment.