Bug 776773 - put tabs in the title bar before updating the tab strip. r=ttaubert

This commit is contained in:
Dão Gottwald 2012-07-26 15:27:32 +02:00
Родитель 68761b3c9a
Коммит 90ed48aad7
2 изменённых файлов: 8 добавлений и 8 удалений

Просмотреть файл

@ -4681,15 +4681,9 @@ var TabsInTitlebar = {
this._readPref(); this._readPref();
Services.prefs.addObserver(this._prefName, this, false); Services.prefs.addObserver(this._prefName, this, false);
// Don't trust the initial value of the sizemode attribute; wait for the resize event. // Don't trust the initial value of the sizemode attribute; wait for
// the resize event (handled in tabbrowser.xml).
this.allowedBy("sizemode", false); this.allowedBy("sizemode", false);
window.addEventListener("resize", function (event) {
if (event.target != window)
return;
let sizemode = document.documentElement.getAttribute("sizemode");
TabsInTitlebar.allowedBy("sizemode",
sizemode == "maximized" || sizemode == "fullscreen");
}, false);
this._initialized = true; this._initialized = true;
#endif #endif

Просмотреть файл

@ -3092,6 +3092,11 @@
case "resize": case "resize":
if (aEvent.target != window) if (aEvent.target != window)
break; break;
let sizemode = document.documentElement.getAttribute("sizemode");
TabsInTitlebar.allowedBy("sizemode",
sizemode == "maximized" || sizemode == "fullscreen");
var width = this.mTabstrip.boxObject.width; var width = this.mTabstrip.boxObject.width;
if (width != this.mTabstripWidth) { if (width != this.mTabstripWidth) {
this.adjustTabstrip(); this.adjustTabstrip();
@ -3099,6 +3104,7 @@
this._handleTabSelect(); this._handleTabSelect();
this.mTabstripWidth = width; this.mTabstripWidth = width;
} }
this.tabbrowser.updateWindowResizers(); this.tabbrowser.updateWindowResizers();
break; break;
case "mouseout": case "mouseout":