Bug 1445737: Update tabsintitlebar stuff before layout. r=dao
Not doing can it cause perf issues, but old Linux distros aren't really happy
about it, and they barf when the chromemargin is removed dynamically, so prevent
that happening by default.
Right now it happens on the resize we do right before loading the window, but
that will stop working after
bug 1439875.
MozReview-Commit-ID: 1Rhaz07fHaY
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -1224,16 +1224,19 @@ var gBrowserInit = {
document.documentElement.setAttribute("width", width);
document.documentElement.setAttribute("height", height);
if (width < TARGET_WIDTH && height < TARGET_HEIGHT) {
document.documentElement.setAttribute("sizemode", "maximized");
}
}
+
+ TabsInTitlebar.init();
+ TabsInTitlebar.updateAppearance();
},
onDOMContentLoaded() {
gBrowser = window._gBrowser;
delete window._gBrowser;
gBrowser.init();
window.QueryInterface(Ci.nsIInterfaceRequestor)
--- a/browser/base/content/tabbrowser.xml
+++ b/browser/base/content/tabbrowser.xml
@@ -751,17 +751,16 @@
</method>
<method name="handleEvent">
<parameter name="aEvent"/>
<body><![CDATA[
switch (aEvent.type) {
case "DOMContentLoaded":
this.updateVisibility();
- TabsInTitlebar.init();
break;
case "resize":
if (aEvent.target != window)
break;
TabsInTitlebar.updateAppearance();
this._updateCloseButtons();
this._handleTabSelect(true);