Bug 2051611 Comment 5 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

Current suspicion is that this could be a regression from Bug 1957069.  From an AI triage tool, which speculates:

This is a genuine, in-scope frontend/chrome defect. I localized it to a **Windows widget regression** rather than a JS/CSS issue:

- The "custom titlebar" (tabs-in-titlebar) needs the DOM `customtitlebar` attribute and the widget's native non-client area to stay in sync. `CustomTitlebar._update()` only toggles the DOM attribute.
- **Bug 1957069** (`ded44b2b9717`, landed 2026-06-23 — one week before this report) added an early `SetCustomTitlebar(true)` in the pre-XUL skeleton-UI branch of `nsWindow::Create` (`nsWindow.cpp:1078`). It sets `mCustomNonClient = true` prematurely, so the real init-time sync hits the early-return at `nsWindow.cpp:2841` and never runs `UpdateNonClientMargins()` at the right time → native title bar with dead buttons until a relayout (maximize) fixes it.
- Skeleton UI is disabled in Troubleshooting Mode, which explains why safe mode is fine.

Proposed fix: scope that early `SetCustomTitlebar(true)` to the maximized branch where it's actually needed (or re-assert `UpdateNonClientMargins()` after chrome shows).

Greg, what do you think?
Current suspicion is that this could be a regression from Bug 1957069.  From an AI triage tool, which suggests:

This is a genuine, in-scope frontend/chrome defect. I localized it to a **Windows widget regression** rather than a JS/CSS issue:

- The "custom titlebar" (tabs-in-titlebar) needs the DOM `customtitlebar` attribute and the widget's native non-client area to stay in sync. `CustomTitlebar._update()` only toggles the DOM attribute.
- **Bug 1957069** (`ded44b2b9717`, landed 2026-06-23 — one week before this report) added an early `SetCustomTitlebar(true)` in the pre-XUL skeleton-UI branch of `nsWindow::Create` (`nsWindow.cpp:1078`). It sets `mCustomNonClient = true` prematurely, so the real init-time sync hits the early-return at `nsWindow.cpp:2841` and never runs `UpdateNonClientMargins()` at the right time → native title bar with dead buttons until a relayout (maximize) fixes it.
- Skeleton UI is disabled in Troubleshooting Mode, which explains why safe mode is fine.

Proposed fix: scope that early `SetCustomTitlebar(true)` to the maximized branch where it's actually needed (or re-assert `UpdateNonClientMargins()` after chrome shows).

Greg, what do you think?

Back to Bug 2051611 Comment 5