Closed Bug 1813303 Opened 2 years ago Closed 2 years ago

windows: new window keeps shrinking with bookmarks toolbar shown

Categories

(Core :: Widget: Win32, defect, P2)

Firefox 111
defect

Tracking

()

VERIFIED FIXED
111 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox109 --- unaffected
firefox110 --- unaffected
firefox111 + verified

People

(Reporter: simon.mainey, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

moz-regression led to bug 1809430

STR

  • open Firefox in windowed mode and not tiled
  • set always show bookmarks toolbar (mine is set to always show)
  • close and reopen Firefox (or you can just nest new windows once set to get the same effect)
  • note inner window size
    • e.g. console.log(window.innerHeight, window.innerWidth)
  • click hamburger > new window, and note inner measurements of the new window

unexpected

  • it keeps shrinking (also on app startup from last remembered info from I assume xulstore)

expected

  • new windows or on app start, the window shouldn't shrink

notes

  • In my case it shrinks 4px width and 32px height - and 32px is my exactly my bookmarks toolbar height. Tested with never show and the issue does not exist (didn't test with only show on new tab - I'm guessing it depends on the current focused tab's toolbar state when you hamburger a new window?)
Regressed by: 1809430

Set release status flags based on info from the regressing bug 1809430

:emilio, since you are the author of the regressor, bug 1809430, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

if you can't immediately replicate, you may need to close the new window and try it again for it to happen. I only diagnosed it a few hours ago, so I'm still working out the STR 100% reliably

I can reproduce the issue on Nightly111.0a1 Windows10.

STR

  1. Disable Titlebar (by default)

  2. Make sure sizemode is normal

  3. To make the problem easily observable,
    Resize the window so that the bottom of the wallpaper is visible at least 100px.

  4. Ctrl+N to open new window
    --- observe, The new window is smaller in height ---BUG!

  5. Close the original window

  6. Ctrl+N to open another new window
    --- observe, The new window is also smaller in height ---BUG!

Actual results:
The new window is smaller in height than the first window.

Expected:
Same height.

Attached image shrink-a-rama.png (deleted) —

Disable Titlebar (by default)

that's interesting

To make the problem easily observable

yeah, just shrink the window and go for it with nested new windows

Severity: -- → S2
Priority: -- → P2
Assignee: nobody → emilio

Make it take a const reference and simplify callers.

No behavior change, but noticed while looking through this code.

Sync the chromemargin attribute to the widget before restoring the
sizes, since the later depend on the former.

This is the same order we use when sizing the shell in OnChromeLoaded,
so it should be more consistent.

Depends on D168199

Flags: needinfo?(emilio)
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/394f358959e3 Clean up nsIWidget::SetNonClientMargins usage. r=spohl
Keywords: leave-open
Attached file Bug 1813303 - Test. r=smaug (deleted) —
Keywords: leave-open
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/52bc2423d62c Tweak order of operations in AppWindow::BeforeStartLayout. r=smaug
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 111 Branch

verified fixed

Backed out for causing for causing mochitest failures in toolkit/content/tests/chrome/test_maximized_persist_with_no_titlebar.xhtml

Backout link: https://hg.mozilla.org/integration/autoland/rev/5059c9a6a7335504026c1b21b6893b69c30315a7

Push with failures

Failure log

Flags: needinfo?(emilio)
Blocks: 1814834
Flags: needinfo?(emilio)
Flags: qe-verify+

I wonder if this might have fixed bug 1493472.

Reproduced the issue with Firefox 111.0a1 (2023-01-28) by following the STR from comment 3. Opening a new window will display a smaller window than the original one.
The issue is verified fixed with Firefox 111.0b8 on Windows 10x64, macOS 12, and Ubuntu 20.04. The newly opened window has the same weight and height as the original one after following STR from comment 3.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: