From 9b7bae9a234f5f10efd9f9f9eef8c1fd2848356e Mon Sep 17 00:00:00 2001 From: SHIMODA Hiroshi Date: Mon, 20 Dec 2010 13:22:13 +0900 Subject: [PATCH] On Minefield, previewing of a persona broke appearance of the floating tab bar. (fix for https://github.com/piroor/treestyletab/issues#issue/5 ) --- content/treestyletab/treestyletabbrowser.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/content/treestyletab/treestyletabbrowser.js b/content/treestyletab/treestyletabbrowser.js index 14e2d021..ecb1e841 100644 --- a/content/treestyletab/treestyletabbrowser.js +++ b/content/treestyletab/treestyletabbrowser.js @@ -637,8 +637,9 @@ TreeStyleTabBrowser.prototype = { this.ObserverService.addObserver(this, this.kTOPIC_INDENT_MODIFIED, false); this.ObserverService.addObserver(this, this.kTOPIC_COLLAPSE_EXPAND_ALL, false); - this.ObserverService.addObserver(this, 'private-browsing-change-granted', false); this.ObserverService.addObserver(this, this.kTOPIC_CHANGE_TREEVIEW_AVAILABILITY, false); + this.ObserverService.addObserver(this, 'private-browsing-change-granted', false); + this.ObserverService.addObserver(this, 'lightweight-theme-styling-update', false); this.addPrefListener(this); this.autoHide; @@ -1549,8 +1550,9 @@ TreeStyleTabBrowser.prototype = { this.ObserverService.removeObserver(this, this.kTOPIC_INDENT_MODIFIED); this.ObserverService.removeObserver(this, this.kTOPIC_COLLAPSE_EXPAND_ALL); - this.ObserverService.removeObserver(this, 'private-browsing-change-granted'); this.ObserverService.removeObserver(this, this.kTOPIC_CHANGE_TREEVIEW_AVAILABILITY); + this.ObserverService.removeObserver(this, 'private-browsing-change-granted'); + this.ObserverService.removeObserver(this, 'lightweight-theme-styling-update'); this.removePrefListener(this); delete this.mTabBrowser; @@ -1618,9 +1620,11 @@ TreeStyleTabBrowser.prototype = { case 'private-browsing-change-granted': this.collapseExpandAllSubtree(false, true); - window.setTimeout(function(aSelf) { - aSelf.updateFloatingTabbar(aSelf.kTABBAR_UPDATE_BY_PRIVATE_BROWSING); - }, 0, this); + this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_PRIVATE_BROWSING); + break; + + case 'lightweight-theme-styling-update': + this.updateFloatingTabbar(this.kTABBAR_UPDATE_BY_WINDOW_RESIZE); break; case this.kTOPIC_CHANGE_TREEVIEW_AVAILABILITY: