Fix some PiP code to not assume outer window size equals inner size.
Categories
(Toolkit :: Picture-in-Picture, defect)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr128 | --- | unaffected |
| firefox132 | --- | unaffected |
| firefox133 | --- | unaffected |
| firefox134 | blocking | verified |
People
(Reporter: loic.yhuel, Assigned: emilio)
References
(Regressed 2 open bugs, Regression)
Details
(Keywords: regression)
Attachments
(3 files, 3 obsolete files)
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
Steps to reproduce:
Updated to latest Nightly (20241116214436) on Windows 11.
Previous Nightly (20241115210754) was fine.
Actual results:
Windows are square with no border and shadow
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Widget: Win32' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•1 year ago
|
||
I am on Windows11, and i didnt notice anything different. So' this may be something specific.
Can you
copy-paste the contents of "about:support" from your browser
Attach a screenshot of what is the issue?
| Reporter | ||
Comment 3•1 year ago
|
||
| Reporter | ||
Comment 4•1 year ago
|
||
notice the lack of rounded corners and shadow
Comment 5•1 year ago
|
||
Thanks!
Bisection:
Bug 1930292 - Stop setting non-zero chromemargin values. r=win-reviewers,handyman
Differential Revision: https://phabricator.services.mozilla.com/D228528
Comment 6•1 year ago
|
||
Set release status flags based on info from the regressing bug 1930292
:emilio, since you are the author of the regressor, bug 1930292, could you take a look? Also, could you set the severity field?
For more information, please visit BugBot documentation.
| Assignee | ||
Comment 7•1 year ago
|
||
Ugh, I think if I can repro this I couldn't notice because I had this applied locally:
diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
index 979eca7a443e5..d99092dae00fd 100644
--- a/widget/windows/nsWindow.cpp
+++ b/widget/windows/nsWindow.cpp
@@ -1078,6 +1078,9 @@ nsresult nsWindow::Create(nsIWidget* aParent, const LayoutDeviceIntRect& aRect,
const DWM_SYSTEMBACKDROP_TYPE tabbedWindow = DWMSBT_TABBEDWINDOW;
DwmSetWindowAttribute(mWnd, DWMWA_SYSTEMBACKDROP_TYPE, &tabbedWindow,
sizeof tabbedWindow);
+ const auto round = DWMWCP_ROUND;
+ DwmSetWindowAttribute(mWnd, DWMWA_WINDOW_CORNER_PREFERENCE, &round,
+ sizeof round);
}
if (mOpeningAnimationSuppressed) {
| Assignee | ||
Comment 8•1 year ago
|
||
We always have Dwm{Get,Set}WindowAttribute because we fail if we can't
load them.
This in practice means that we release the DC and uncloak the window a
bit later (due to the MakeScopeExits), but I think that's fine.
Updated•1 year ago
|
| Assignee | ||
Comment 9•1 year ago
|
||
It seems bug 1930292 can cause DWM heuristics to not round our windows
some of the time. Explicitly ask it to do that. This has an extra
benefit which is that PiP windows are now rounded like on macOS.
| Assignee | ||
Updated•1 year ago
|
Comment 10•1 year ago
|
||
FWIW, if you enable mica from about:config, you dont see this bug (that is, window borders have both shadow and rounded corners)
| Assignee | ||
Comment 11•1 year ago
|
||
Windows 10 and 11 don't have fat windows, so this is unnecessary and
breaks other effects like the accent-color border (if you have "Show
accent color on titlebar and window borders" enabled).
We need to make the custom resize margin thing we have for PiP not mess
with our non-client area, but that is trivial.
| Assignee | ||
Comment 12•1 year ago
|
||
Comment 13•1 year ago
|
||
Comment on attachment 9438204 [details]
Bug 1931747 - Remove unnecessary condition in PreXULSkeletonUI. r=#win-reviewers
Revision D229267 was moved to bug 1931778. Setting attachment 9438204 [details] to obsolete.
Updated•1 year ago
|
Comment 14•1 year ago
|
||
simple workaround for now:
#main-window[sizemode="normal"] {
border-radius: 2px;
}
Updated•1 year ago
|
| Assignee | ||
Comment 16•1 year ago
|
||
The previous patch makes the PiP window have rounded corners and shadows
on Windows (like on macOS).
That uncovers some cases where PiP was using inner rather than outer
sizes incorrectly, mostly in test code. This wasn't a problem before my
patch because innerSize used to be the same as outerSize before my
patch.
I could restore the previous behavior (by using hidechrome="true" or
so), but I think this is nicer, and the code works with outer sizes
regardless (i.e., if we want to restore the old behavior we don't need
to touch any of this code, just add hidechrome, so that outer and inner
sizes match).
Note that all the code in PictureInPicture.sys.mjs already deals with
outer sizes (correctly so).
| Assignee | ||
Comment 17•1 year ago
•
|
||
https://treeherder.mozilla.org/jobs?repo=try&revision=6ead823b1e6d3ef757a3ad6c633db8db1442c16b (https://treeherder.mozilla.org/jobs?repo=try&revision=937d167d28e7eb29241b11cd7f088d2d1c9607da for a previous try run with the PiP failures)
| Assignee | ||
Updated•1 year ago
|
Comment 19•1 year ago
|
||
Comment 21•1 year ago
|
||
Please consider resolving the above test failures by reverting the relevant patch, and then (if you still think it can and should be committed separately) moving the PiP changes to their own bug. I'd much prefer to avoid another situation like bug 1891063.
Comment 22•1 year ago
|
||
| bugherder | ||
| Assignee | ||
Comment 23•1 year ago
|
||
Ok, let's repurpose this bug for the PiP issue fixed in https://hg.mozilla.org/mozilla-central/rev/5fea4129f696. I'll ask for backout of the regressor and will move the patch somewhere else.
Updated•1 year ago
|
Comment 24•1 year ago
|
||
Comment on attachment 9438214 [details]
Bug 1931747 - Don't extend into the frame border area with chromemargin=0,0,0,0. r=#win-reviewers
Revision D229270 was moved to bug 1930292. Setting attachment 9438214 [details] to obsolete.
Updated•1 year ago
|
Updated•1 year ago
|
Comment 25•1 year ago
|
||
I was able to reproduce the issue on Win10x64 using Firefox build 134.0a1(20241116214436).
Verified as fixed on Win10x64 using Firefox builds 135.0a1 and 134.0b4.
Description
•