Bug 996148 - With tabs in titlebar disabled, the private browsing mask can be incorrectly positioned in certain modes. r=MattN.

The positioning of the private browsing mask depends on us correctly setting the fullscreen placeholder
width. Unfortunately, we only ever did that when kicking off the tabs-in-titlebar code. This patch makes
it so that we set the width regardless of whether or not tabs in titlebar is enabled.
This commit is contained in:
Mike Conley 2014-04-15 14:11:19 -04:00
parent dd9e44d582
commit a1b253d755

View File

@ -4464,6 +4464,9 @@ var TabsInTitlebar = {
let titlebar = $("titlebar");
let titlebarContent = $("titlebar-content");
let menubar = $("toolbar-menubar");
#ifdef XP_MACOSX
let secondaryButtonsWidth = rect($("titlebar-secondary-buttonbox")).width;
#endif
if (allowed) {
// We set the tabsintitlebar attribute first so that our CSS for
@ -4481,7 +4484,6 @@ var TabsInTitlebar = {
let captionButtonsBoxWidth = rect($("titlebar-buttonbox-container")).width;
#ifdef XP_MACOSX
let secondaryButtonsWidth = rect($("titlebar-secondary-buttonbox")).width;
// No need to look up the menubar stuff on OS X:
let menuHeight = 0;
let fullMenuHeight = 0;
@ -4556,9 +4558,6 @@ var TabsInTitlebar = {
// Finally, size the placeholders:
#ifdef XP_MACOSX
this._sizePlaceholder("fullscreen-button", secondaryButtonsWidth);
#endif
this._sizePlaceholder("caption-buttons", captionButtonsBoxWidth);
if (!this._draghandles) {
@ -4586,6 +4585,10 @@ var TabsInTitlebar = {
titlebar.style.marginBottom = "";
menubar.style.paddingBottom = "";
}
#ifdef XP_MACOSX
this._sizePlaceholder("fullscreen-button", secondaryButtonsWidth);
#endif
},
_sizePlaceholder: function (type, width) {