New windows open with a flash of a smaller rectangle in the content area, if the first window is maximized and has a remembered-unmaximized-size that's relatively small
Categories
(Core :: Layout, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr140 | --- | unaffected |
| firefox144 | --- | unaffected |
| firefox145 | --- | verified |
| firefox146 | --- | verified |
People
(Reporter: dholbert, Assigned: emilio)
References
(Regression)
Details
(Keywords: regression)
Attachments
(7 files)
STR:
- Create a new directory (e.g.
/tmp/foo) that contains just the following file, namedxulstore.json(this is a reduced version of what I had in my ownxulstore.jsonfile):
{"chrome://browser/content/browser.xhtml":{"main-window":{"sizemode":"maximized","screenX":"0","screenY":"0","width":"500","height":"630"}}}
- Start Firefox using that directory as your Firefox profile (e.g.
firefox -profile /tmp/foo) - Open a new window in that Firefox session with Ctrl+N and watch carefully.
- Repeat step 3 several times.
ACTUAL RESULTS:
When your new window opens, it's maximized (per "sizemode":"maximized" in xulstore.json), BUT the initial paint of the maximized window has a weird rectangle that's roughly the size of the viewport that was specified in xulstore.json` (so in this case, 500px by 630px). This ends up looking like a weird rendering glitch/artifact.
EXPECTED RESULTS:
No such off-color rectangle.
ADDITIONAL RESULTS:
- This reproduces in light mode as well as dark mode.
- This is easy to reproduce without needing to hand-edit xulstore.json; that's just a shortcut. I'll post additional slighlty-longer STR in a later comment that don't require any json-crafting.
- I'm testing using Firefox Nightly 146.0a1 (2025-10-16) (64-bit) on Ubuntu 24.04
- Not sure yet what component this belongs in; starting in Widget for now. I haven't tested any platforms beyond Linux as of yet.
| Reporter | ||
Comment 1•3 months ago
|
||
STR that don't require you to mess with profile contents or JSON:
- Start Firefox with a fresh profile.
- Shrink your Firefox window to be relatively small.
- Click the Maximize button on your Firefox window.
- Open a new window (Ctrl + N) and watch carefully.
- Repeat step 4.
Actual/expected results are the same as in comment 0.
(Steps 1-3 here are equivalent to steps 1-2 in comment 0).
| Reporter | ||
Comment 2•3 months ago
|
||
Here's a screencast starting with a completely fresh profile, using a light OS color-scheme preference. When the bug happens here, there's a smaller white square and a larger light-gray background for the rest of the window.
| Reporter | ||
Comment 3•3 months ago
•
|
||
Here's a screenshot from t=13s in my just-attached screencast, showing the unwanted rendering. Note that the top-left corner of the viewport is a lighter shade of white from the light-gray in the rest of the window.
| Reporter | ||
Updated•3 months ago
|
| Reporter | ||
Comment 4•3 months ago
|
||
Here's a screencast of how this looks with a dark color-scheme (where the color-difference is much more pronounced and hence this is much more noticeable/annoying).
| Reporter | ||
Comment 5•3 months ago
|
||
| Reporter | ||
Updated•3 months ago
|
Comment 6•3 months ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
- Not sure yet what component this belongs in; starting in Widget for now. I haven't tested any platforms beyond Linux as of yet.
Since this is only confirmed on Linux for now let's start with Widget:Gtk and expand as appropriate.
| Reporter | ||
Comment 7•3 months ago
•
|
||
Pernosco recording (where I start Firefox, with the first window maximized; then I do Ctrl+N and see this bug in the new window)
https://pernos.co/debug/S9w484xgPxb3iHwhSmGz6Q/index.html
| Reporter | ||
Comment 8•3 months ago
|
||
(I have a nagging feeling that there might already be a bug on this too, that I interacted with at some point in the past, when using a device where I had Firefox ~always maximized. Though it's possible the symptoms have evolved a bit.)
Comment 9•3 months ago
|
||
Is that a recent regression? Can you use mozregression to find broken commit?
Thanks.
| Reporter | ||
Comment 10•3 months ago
|
||
I think it is, yeah. I'll bisect later today.
| Reporter | ||
Comment 11•3 months ago
•
|
||
Regression pushlog:
https://hg-edge.mozilla.org/integration/autoland/pushloghtml?fromchange=6e8c06620eebb349b6c2d7535a415a808a047abf&tochange=160d4122399e6be7adec23b507ba7c1510f809c7
--> Regression from bug 1993570's "Make painting code not use views directly" patch.
| Reporter | ||
Comment 12•3 months ago
•
|
||
(In reply to Daniel Holbert [:dholbert] from comment #0)
- Not sure yet what component this belongs in [...] I haven't tested any platforms beyond Linux as of yet.
I tested on macOS now and confirms it repro's there, too, though I need slightly different steps.
My STR there are:
- Start with a profile that contains the same
xulstore.jsonfile as in comment 0. - Open a new window (Cmd+N)
- Maximize that new window (click green button) to fill the display.
- Open more new windows by holding Cmd and mashing N.
ACTUAL RESULTS:
The new windows that open in step 4 will suffer from this problem, in a way that's worse than shown on linux - Firefox's own toolbar-UI (hamburger menu, etc) gets squished to fit the small rectangle as well, in the brief mis-rendering.
| Reporter | ||
Comment 13•3 months ago
|
||
| Reporter | ||
Comment 14•3 months ago
|
||
| Reporter | ||
Updated•3 months ago
|
Comment 15•3 months ago
|
||
Set release status flags based on info from the regressing bug 1993570
:emilio, since you are the author of the regressor, bug 1993570, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Reporter | ||
Comment 16•3 months ago
|
||
I can reproduce on Windows 11 as well (using STR from comment 0), FWIW; so this is not platform-specific.
| Reporter | ||
Comment 17•3 months ago
|
||
Triaging as S2 given that this is a fairly-visible cross-platform rendering glitch (and given that it's a new regression not yet shipped to release, rather than a longstanding behavior).
| Assignee | ||
Comment 18•3 months ago
|
||
The problem is that we're painting an about:blank document which hasn't
been laid out yet (there's no root frame).
In that case, we used to get a widget from the view tree, but now we
don't.
Introduce PresShell::GetNearestWidget(), and use it to get the closest
widget if there's no root frame so that we don't paint an opaque
backdrop incorrectly.
Updated•3 months ago
|
| Assignee | ||
Comment 19•3 months ago
|
||
If you could confirm on macOS that this also fixes the issue there (I don't see why not but...) that'd be great.
Thanks!
| Reporter | ||
Comment 21•3 months ago
|
||
Thanks for the fix!
(In reply to Emilio Cobos Álvarez [:emilio] from comment #19)
If you could confirm on macOS that this also fixes the issue there (I don't see why not but...) that'd be great.
Sure, I'll rebuild with the patch on macOS to double-check.
| Reporter | ||
Comment 22•3 months ago
•
|
||
Actually, the macOS bad-rendering shown in comment 14 is partly this, and partly an older regression:
(A) The severe dark-/light-gray differentiation is this bug here.
(B) The fact that we're squashing the hamburger-menu & location bar to fit that squished area is an older regression. [bisecting that now]
I imagine (and will confirm) that your patch fixes (A) but not the older (B) issue there. I'll file a bug for (B) once I've got a range for that.
Comment 24•3 months ago
|
||
| Reporter | ||
Comment 25•3 months ago
•
|
||
I built without & with this patch on macOS, and confirmed that the patch fixes (A) from comment 22. With this patch, the brief misrendering goes back to looking as it did before this regressed, i.e. it goes back to looking like the screenshot in bug 1995424 comment 2. Still two different gray colors, but not as severely-different as in comment 14.
Comment 26•3 months ago
|
||
| bugherder | ||
Comment 27•3 months ago
|
||
The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?
- If yes, please nominate the patch for beta approval.
- See https://wiki.mozilla.org/Release_Management/Requesting_an_Uplift for documentation on how to request an uplift.
- If no, please set
status-firefox145towontfix.
For more information, please visit BugBot documentation.
| Comment hidden (off-topic) |
| Assignee | ||
Comment 29•3 months ago
|
||
Can we back out https://hg-edge.mozilla.org/integration/autoland/rev/160d4122399e6be7adec23b507ba7c1510f809c7 from beta only?
Comment 31•3 months ago
|
||
(In reply to Emilio Cobos Álvarez [:emilio] from comment #29)
Can we back out https://hg-edge.mozilla.org/integration/autoland/rev/160d4122399e6be7adec23b507ba7c1510f809c7 from beta only?
Reverted in https://github.com/mozilla-firefox/firefox/commit/286ce97ccb75d4a9f004e98266324e61e1e0c8a7
I am marking 145 as fixed in this bug by this backout.
Updated•3 months ago
|
| Assignee | ||
Comment 32•3 months ago
|
||
Can QA confirm that 145 is fixed? https://github.com/i3roly/firefox-dynasty/issues/85#issuecomment-3482285472 claims it's not fixed but I can't repro on 145.0b9
Updated•3 months ago
|
Updated•3 months ago
|
Comment 33•3 months ago
|
||
I’ve reproduced the issue on Firefox 145.0b3 on Windows 10. I verified the fix on Windows 10, Ubuntu 22.04 and macOS 15 using Nightly 146.0a1 and Firefox 145.0b9 following the STR from Comment 0 and Comment 1. The issue no longer occurs on Windows 10 and Ubuntu 22.04, but on macOS, following the STR from Comment 12 (maximizing the window using the green button and then opening new windows with Cmd + N), the flash still appears. Please see the recording for reference.
@Daniel, is the macOS issue related to Comment 22 which will be addressed in a separate bug? I'll update the flags accordingly after this confirmation.
| Reporter | ||
Comment 34•3 months ago
•
|
||
(In reply to Ina Popescu, Desktop QA from comment #33)
but on macOS, following the STR from Comment 12 (maximizing the window using the green button and then opening new windows with Cmd + N), the flash still appears. Please see the recording for reference.
@Daniel, is the macOS issue related to Comment 22 which will be addressed in a separate bug? I'll update the flags accordingly after this confirmation.
Thanks! Yeah, the macOS issue shown in your screencast is covered by bug 1995424. It matches my screenshot / screencast in bug 1995424 comment 1 and bug 1995424 comment 2, and it's not expected to be fixed by the patch that landed here.
(This bug here was responsible for a much-more-severe color-difference as shown in bug 1994908 comment 14; and your screenshot doesn't show that severe difference, which is good news.)
Comment 35•3 months ago
|
||
(In reply to Daniel Holbert [:dholbert] from comment #34)
(In reply to Ina Popescu, Desktop QA from comment #33)
but on macOS, following the STR from Comment 12 (maximizing the window using the green button and then opening new windows with Cmd + N), the flash still appears. Please see the recording for reference.
@Daniel, is the macOS issue related to Comment 22 which will be addressed in a separate bug? I'll update the flags accordingly after this confirmation.Thanks! Yeah, the macOS issue shown in your screencast is covered by bug 1995424. It matches my screenshot / screencast in bug 1995424 comment 1 and bug 1995424 comment 2, and it's not expected to be fixed by the patch that landed here.
(This bug here was responsible for a much-more-severe color-difference as shown in bug 1994908 comment 14; and your screenshot doesn't show that severe difference, which is good news.)
Thanks for confirming! Updating the flags accordingly now.
Description
•