Use meaningful name for "tabs in titlebar" hack

This commit is contained in:
Piro / YUKI Hiroshi 2015-11-05 23:28:38 +09:00
parent 49dd724d0d
commit d534c28a6d
2 changed files with 11 additions and 11 deletions

View File

@ -6906,8 +6906,8 @@ TreeStyleTabBrowser.prototype = inherit(TreeStyleTabWindow.prototype, {
isPopupShown : function TSTBrowser_isPopupShown(...aArgs) {
return this._callWindowServiceMethod('isPopupShown', aArgs);
},
updateTabsOnTop : function TSTBrowser_updateTabsOnTop(...aArgs) {
return this._callWindowServiceMethod('updateTabsOnTop', aArgs);
updateTabsInTitlebar : function TSTBrowser_updateTabsInTitlebar(...aArgs) {
return this._callWindowServiceMethod('updateTabsInTitlebar', aArgs);
},
registerTabFocusAllowance : function TSTBrowser_registerTabFocusAllowance(...aArgs) {
return this._callWindowServiceMethod('registerTabFocusAllowance', aArgs);

View File

@ -438,7 +438,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
w.TreeStyleTabWindowHelper.onAfterBrowserInit();
this.processRestoredTabs();
this.updateTabsOnTop();
this.updateTabsInTitlebar();
this.autoHideWindow; // initialize
@ -632,7 +632,7 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
case this.kEVENT_TYPE_TABBAR_POSITION_CHANGED:
case this.kEVENT_TYPE_TABBAR_STATE_CHANGED:
return this.updateTabsOnTop();
return this.updateTabsInTitlebar();
case this.kEVENT_TYPE_FOCUS_NEXT_TAB:
return this.onFocusNextTab(aEvent);
@ -1110,20 +1110,20 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
}, this);
},
updateTabsOnTop : function TSTWindow_updateTabsOnTop()
updateTabsInTitlebar : function TSTWindow_updateTabsInTitlebar()
{
if (
this.isPopupWindow ||
this.tabsOnTopChangingByTST
this.tabsInTitlebarChanging
)
return;
this.tabsOnTopChangingByTST = true;
this.tabsInTitlebarChanging = true;
// We have to do this with delay, because the tab bar is always on top
// for the toolbar customizing and returned to left or right after a delay.
setTimeout(this.updateTabsOnTopInternal.bind(this), 0);
setTimeout(this.updateTabsInTitlebarInternal.bind(this), 0);
},
updateTabsOnTopInternal : function TSTWindow_updateTabsOnTopInternal()
updateTabsInTitlebarInternal : function TSTWindow_updateTabsInTitlebarInternal()
{
var TabsInTitlebar = this.window.TabsInTitlebar;
var isTopTabbar = this.browser.treeStyleTab.position == 'top';
@ -1137,11 +1137,11 @@ TreeStyleTabWindow.prototype = inherit(TreeStyleTabBase, {
('classicthemerestorerjs' in this.window && utils.getTreePref('compatibility.ClassicThemeRestorer'))
)
allowed = true;
TabsInTitlebar.allowedBy('TreeStyleTab-tabsOnTop', allowed);
TabsInTitlebar.allowedBy('TreeStyleTab-tabsInTitlebar', allowed);
}
}
finally {
this.tabsOnTopChangingByTST = false;
this.tabsInTitlebarChanging = false;
}
},