Fix misplaced tab bar when I exit from the DOM fullscreen mode (#957)

This commit is contained in:
Piro / YUKI Hiroshi 2015-10-31 00:53:29 +09:00
parent b11a175cbf
commit 8b2af7ce6f

View File

@ -14,7 +14,7 @@
* The Original Code is the Tree Style Tab. * The Original Code is the Tree Style Tab.
* *
* The Initial Developer of the Original Code is YUKI "Piro" Hiroshi. * The Initial Developer of the Original Code is YUKI "Piro" Hiroshi.
* Portions created by the Initial Developer are Copyright (C) 2013 * Portions created by the Initial Developer are Copyright (C) 2013-2015
* the Initial Developer. All Rights Reserved. * the Initial Developer. All Rights Reserved.
* *
* Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex@gmail.com> * Contributor(s): YUKI "Piro" Hiroshi <piro.outsider.reflex@gmail.com>
@ -35,6 +35,8 @@
var EXPORTED_SYMBOLS = ['FullscreenObserver']; var EXPORTED_SYMBOLS = ['FullscreenObserver'];
Components.utils.import('resource://treestyletab-modules/constants.js');
Components.utils.import('resource://treestyletab-modules/utils.js'); Components.utils.import('resource://treestyletab-modules/utils.js');
function FullscreenObserver(aWindow) { function FullscreenObserver(aWindow) {
@ -60,7 +62,7 @@ FullscreenObserver.prototype = {
attributeFilter : ['sizemode'] attributeFilter : ['sizemode']
}); });
this.onSizeModeChange(); this.window.setTimeout(this.onSizeModeChange.bind(this), 0);
}, },
destroy : function FullscreenObserver_destroy() destroy : function FullscreenObserver_destroy()
@ -80,6 +82,11 @@ FullscreenObserver.prototype = {
}, },
onSizeModeChange : function FullscreenObserver_onSizeModeChange() onSizeModeChange : function FullscreenObserver_onSizeModeChange()
{
this.updateToolboxPosition();
this.window.gBrowser.treeStyleTab.updateFloatingTabbar(TreeStyleTabConstants.kTABBAR_UPDATE_BY_WINDOW_RESIZE);
},
updateToolboxPosition : function FullscreenObserver_onSizeModeChange()
{ {
var w = this.window; var w = this.window;
var d = w.document; var d = w.document;