Save position safely

This commit is contained in:
Piro / YUKI Hiroshi 2015-03-04 01:45:09 +09:00
parent a6fe5e8fdb
commit e80ffd1b11

View File

@ -1346,20 +1346,20 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
this._startListenTabbarEvents();
this.window.TreeStyleTabWindowHelper.initTabbarMethods(b);
if (!aIsTemporaryChange) {
let positionName = this.normalizeTabbarPosition(aNewPosition);
this.setWindowValue(this.kTABBAR_POSITION, positionName);
this.setPrefForActiveWindow(function() {
utils.setTreePref('tabbar.position', positionName);
});
}
var pos = aNewPosition || this.getPositionFlag(this.position);
if (b.getAttribute('id') != 'content' &&
!utils.getTreePref('tabbar.position.subbrowser.enabled')) {
pos = this.kTABBAR_TOP;
}
if (!aIsTemporaryChange) {
let positionName = this.normalizeTabbarPosition(pos);
this.setWindowValue(this.kTABBAR_POSITION, positionName);
this.setPrefForActiveWindow(function() {
utils.setTreePref('tabbar.position', positionName);
});
}
aOldPosition = aOldPosition || pos;
var strip = this.tabStrip;