Initialize the browser window correctly with the preference browser.tabs.drawInTitlebar=false

See: https://github.com/piroor/treestyletab/issues/1183
This commit is contained in:
Piro / YUKI Hiroshi 2016-09-08 23:51:35 +09:00
parent 841866d1bc
commit 09f25bb962

View File

@ -47,7 +47,8 @@ var TreeStyleTabWindowHelper = {
TabsInTitlebar._update = function(...aArgs) { TabsInTitlebar._update = function(...aArgs) {
// See: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/browser-tabsintitlebar.js#104 // See: https://dxr.mozilla.org/mozilla-central/rev/dbe4b47941c7b3d6298a0ead5e40dd828096c808/browser/base/content/browser-tabsintitlebar.js#104
let result = this.__treestyletab__update(...aArgs); let result = this.__treestyletab__update(...aArgs);
if (gBrowser.treeStyleTab.position != 'top') if (gBrowser.treeStyleTab && // possibly not available while the startup process
gBrowser.treeStyleTab.position != 'top')
document.getElementById('titlebar').style.marginBottom = document.getElementById('titlebar').style.marginBottom =
document.getElementById('titlebar-content').style.marginBottom = ''; document.getElementById('titlebar-content').style.marginBottom = '';
return result; return result;