Add CAN_DRAW_IN_TITLEBAR since MENUBAR_CAN_AUTOHIDE is overloaded

RESOLVED FIXED in Firefox 4.0b8

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: dao, Assigned: wgianopoulos)

Tracking

Trunk
Firefox 4.0b8
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 2 obsolete attachments)

The patch in bug 585370 does this, but it would be wise to do it separately because a) it makes sense regardless of that bug and b) it will make the patch in that bug less scary.
Taking -> I will appropriately divide that patch up between both bugs.
Assignee: nobody → bill
Posted patch patch v1 (obsolete) — Splinter Review
I will ask for review once this passes my tests.
Status: NEW → ASSIGNED
Blocks: 585370
Posted patch patch v2-fix nested ifdefs (obsolete) — Splinter Review
Attachment #487458 - Attachment is obsolete: true
Attachment #487501 - Flags: review?(dao)
Attachment #487501 - Flags: review?(dao) → review+
Comment on attachment 487501 [details] [diff] [review]
patch v2-fix nested ifdefs

>--- a/browser/base/content/browser.js
>+++ b/browser/base/content/browser.js
>@@ -4720,22 +4720,26 @@ var TabsOnTop = {
> function updateAppButtonDisplay() {
>   var displayAppButton =
>     !gInPrintPreviewMode &&
>     window.menubar.visible &&
>     document.getElementById("toolbar-menubar").getAttribute("autohide") == "true";
> 
>   document.getElementById("titlebar").hidden = !displayAppButton;
> 
>+#ifdef CAN_DRAW_IN_TITLEBAR
>   if (displayAppButton)
>     document.documentElement.setAttribute("chromemargin", "0,-1,-1,-1");
>   else
>     document.documentElement.removeAttribute("chromemargin");
>-}
>-
>+#endif
>+}
>+#endif

document.getElementById("titlebar").hidden = !displayAppButton; should depend on CAN_DRAW_IN_TITLEBAR too.
(In reply to comment #4) 
> document.getElementById("titlebar").hidden = !displayAppButton; should depend
> on CAN_DRAW_IN_TITLEBAR too.

Of course it should.
With that fixed.

Carrying review forward.
Attachment #487501 - Attachment is obsolete: true
Attachment #487509 - Flags: approval2.0?
Attachment #487509 - Flags: approval2.0?
http://hg.mozilla.org/mozilla-central/rev/7ca426c55d9b
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 4.0b8
You need to log in before you can comment on or make changes to this bug.