Window position incorrect wnen restore size-mode to normal from maximized after relanch
Categories
(Core :: Widget: Win32, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox-esr115 | --- | unaffected |
firefox-esr128 | --- | unaffected |
firefox133 | + | verified |
firefox134 | --- | verified |
firefox135 | --- | verified |
People
(Reporter: alice0775, Assigned: emilio)
References
(Regression)
Details
(Keywords: nightly-community, regression)
Attachments
(1 file)
48 bytes,
text/x-phabricator-request
|
dmeehan
:
approval-mozilla-beta+
dmeehan
:
approval-mozilla-release+
|
Details | Review |
This problem occurs every time when exiting Firefox in maximized size-mode.
Steps to reproduce:
- Create New profile
- Run firefox.exe without any command line options
- Reduce browser size and move to center of screen (To make it easier to check for bugs)
And remember the browser position - Maximize the browser
- Exit the browser
- Run firefox.exe again without any command line options
- Restore size-mode
Actual results:
Browser moves to the upper left corner of the screen and the top part goes off-screen.
Screencast: https://youtu.be/0DMK8DH5tow
Expected results:
The browser is positioned as remembered in step 3.
Regression window:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=45ed66ca8512ae779333dab919d7d365757eaf4c&tochange=ae53bce6521b13768eb4aba4a62b7bffd40174e2
Workaround:
Set browser.startup.blankWindow to false in about:config
OR
Launch with command line option, i.e., firefox.exe -p
![]() |
Reporter | |
Updated•3 months ago
|
Updated•3 months ago
|
![]() |
Reporter | |
Updated•3 months ago
|
Comment 1•3 months ago
|
||
:emilio, since you are the author of the regressor, bug 1922250, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
Assignee | ||
Comment 2•3 months ago
|
||
So I see a LoadPositionFromXUL call from the early blank window and nothing from session restore.
Assignee | ||
Comment 3•3 months ago
|
||
The relevant MoveTo() call is:
MoveTo(-22, -22)
From the window.stop() call in:
0 _earlyBlankFirstPaint(cmdLine = "[xpconnect wrapped nsICommandLine @ 0x1f793cbfe20 (native @ 0x1f794f4a800)]") ["resource:///modules/BrowserGlue.sys.mjs":1860:9]
this = [object Object]
1 BG_observe(subject = "[xpconnect wrapped nsICommandLine @ 0x1f793cbfe20 (native @ 0x1f794f4a800)]", topic = ""app-startup"", data = """") ["resource:///modules/BrowserGlue.sys.mjs":1353:14]
this = [object Object]
Which triggers:
nsWindow::Move (D:\moz\gecko\widget\windows\nsWindow.cpp:1914)
mozilla::AppWindow::MoveResize (D:\moz\gecko\xpfe\appshell\AppWindow.cpp:707)
mozilla::AppWindow::LoadPositionFromXUL (D:\moz\gecko\xpfe\appshell\AppWindow.cpp:1224)
mozilla::AppWindow::SizeShell (D:\moz\gecko\xpfe\appshell\AppWindow.cpp:2501)
mozilla::AppWindow::OnChromeLoaded (D:\moz\gecko\xpfe\appshell\AppWindow.cpp:1084)
mozilla::AppWindow::OnStateChange (D:\moz\gecko\xpfe\appshell\AppWindow.cpp:3071)
nsDocLoader::DoFireOnStateChange (D:\moz\gecko\uriloader\base\nsDocLoader.cpp:1425)
nsDocLoader::doStopDocumentLoad (D:\moz\gecko\uriloader\base\nsDocLoader.cpp:971)
nsDocLoader::DocLoaderIsEmpty (D:\moz\gecko\uriloader\base\nsDocLoader.cpp:785)
nsDocLoader::OnStopRequest (D:\moz\gecko\uriloader\base\nsDocLoader.cpp:667)
nsDocShell::OnStopRequest (D:\moz\gecko\docshell\base\nsDocShell.cpp:13740)
mozilla::net::nsLoadGroup::NotifyRemovalObservers (D:\moz\gecko\netwerk\base\nsLoadGroup.cpp:638)
mozilla::net::nsLoadGroup::Cancel (D:\moz\gecko\netwerk\base\nsLoadGroup.cpp:259)
nsDocLoader::Stop (D:\moz\gecko\uriloader\base\nsDocLoader.cpp:254)
nsDocShell::Stop (D:\moz\gecko\docshell\base\nsDocShell.cpp:4147)
nsGlobalWindowOuter::StopOuter (D:\moz\gecko\dom\base\nsGlobalWindowOuter.cpp:4937)
nsGlobalWindowInner::Stop (D:\moz\gecko\dom\base\nsGlobalWindowInner.cpp:3742)
mozilla::dom::Window_Binding::stop (D:\moz\gecko\obj-debug\dom\bindings\WindowBinding.cpp:2128)
The window is already properly maximized (which can happen with the
pre-skeleton UI), we shouldn't adjust the position of the window.
The reason this worked before my patch was because the skeleton UI
didn't have the right bounds, so the position didn't change.
But I don't think we should move the window at all in this case (I
believe the current patch in bug 1866583 part 4 maybe fix this too, but
it's better to be explicit).
Updated•3 months ago
|
Comment 6•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.
- If no, please set
status-firefox134
towontfix
.
For more information, please visit BugBot documentation.
Assignee | ||
Comment 7•3 months ago
|
||
Comment on attachment 9440766 [details]
Bug 1934238 - Don't try to position anything from XUL if the widget is not in the normal sizemode. r=rkraesig
Beta/Release Uplift Approval Request
- User impact if declined/Reason for urgency: regression fix
- Is this code covered by automated tests?: No
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: Yes
- If yes, steps to reproduce: comment 0
- List of other uplifts needed: none
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky): One-liner
- String changes made/needed: none
- Is Android affected?: No
Assignee | ||
Updated•3 months ago
|
Comment 8•3 months ago
|
||
:emilio, is this also safe for a release uplift request? We could include it in next week's Fx133 planned dot release.
Assignee | ||
Comment 9•3 months ago
|
||
Comment on attachment 9440766 [details]
Bug 1934238 - Don't try to position anything from XUL if the widget is not in the normal sizemode. r=rkraesig
I think it probably is, if QA is happy with it.
Updated•3 months ago
|
Comment 10•3 months ago
|
||
Reproduced the issue on Firefox 135.0a1 (2024-11-29) on Windows 11 by following the STR from Comment 0.
The issue is no longer reproducible on Firefox 135.0a1 (2024-12-02) on the same system. Will look over 134/133 once it is uplifted.
Comment 11•3 months ago
|
||
Comment on attachment 9440766 [details]
Bug 1934238 - Don't try to position anything from XUL if the widget is not in the normal sizemode. r=rkraesig
Approved for 134.0b5 to get coverage before the 133 dot release.
Comment 12•3 months ago
|
||
uplift |
Updated•3 months ago
|
Comment 13•3 months ago
|
||
Verified that this is fixed as well on Firefox 134.0b5 (Treeherder build) on Windows 11.
Comment 14•3 months ago
|
||
Comment on attachment 9440766 [details]
Bug 1934238 - Don't try to position anything from XUL if the widget is not in the normal sizemode. r=rkraesig
Approved for 133.0.3
Comment 15•3 months ago
|
||
uplift |
Updated•3 months ago
|
Comment 16•3 months ago
|
||
Verified the fix on Firefox 133.0.3 (Treeherder build) on Windows 11.
Description
•