Bug 873449 - Fix determination of drawing in titlebar to work for chromeless popups, r=dao

--HG--
extra : rebase_source : 7438861afa05c4b2661be1dcd5e2d15b26b12ae2
This commit is contained in:
Gijs Kruitbosch 2013-05-17 18:09:41 +02:00
parent f4897dfd63
commit 447bbd7ff9

View File

@ -4629,14 +4629,15 @@ var TabsInTitlebar = {
#ifdef CAN_DRAW_IN_TITLEBAR
function updateTitlebarDisplay() {
document.getElementById("titlebar").hidden = gInPrintPreviewMode;
let drawInTitlebar = !gInPrintPreviewMode && window.toolbar.visible;
document.getElementById("titlebar").hidden = !drawInTitlebar;
if (!gInPrintPreviewMode)
if (drawInTitlebar)
document.documentElement.setAttribute("chromemargin", "0,2,2,2");
else
document.documentElement.removeAttribute("chromemargin");
TabsInTitlebar.allowedBy("drawing-in-titlebar", !gInPrintPreviewMode);
TabsInTitlebar.allowedBy("drawing-in-titlebar", drawInTitlebar);
}
#endif