[wayland] popup can be wrongly repositioned due to rounding errors when font scaling != 1
Categories
(Core :: Widget: Gtk, defect, P2)
Tracking
()
Tracking | Status | |
---|---|---|
firefox93 | --- | fixed |
People
(Reporter: jhorak, Assigned: stransky)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
This could occasional lead to bug 1661516 and some other flickering/popup repositioning by one pixel horizontally or vertically.
It's because the rounding error which occurs between nsView/nsMenuPopupFrame and nsWindow.
Reporter | ||
Updated•4 years ago
|
Reporter | ||
Comment 1•4 years ago
|
||
We have to use wayland to position popup windows and we need to propagate the modified
position (if happens) back to nsView. The mScreenRect in the nsMenuPopupFrame is in the CSS units
and that produce rounding error when font scale factor is not 1. To fix that we will use appunits
for the mScreenRect.
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 2•3 years ago
|
||
Can you please test latest nightly under Wayland? A new popup handling code landed there.
Thanks.
Assignee | ||
Comment 3•3 years ago
|
||
Please re-test with new nightly as it gets another popup fixes.
Thanks.
Updated•3 years ago
|
Assignee | ||
Comment 4•3 years ago
|
||
The patch here works for me 'as-is'. Just updated to latest trunk and fired try:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=f43b791f113cbf2e818d71d6c3d1e384819e923a
Assignee | ||
Updated•3 years ago
|
Assignee | ||
Comment 8•3 years ago
|
||
Comment 9•3 years ago
|
||
Yes, issue is fixed for context menus.
And partially fixed for extension popup windows (before, when i click on extension icon - it was transparent/blinking, and i cannot interact with it), now it does not blinks and renders fine, but i still cannot interact with it.
Affected extensions, for example:
Popup windows created by Pocket are not affected (works fine), but that's not really "extension" i guess.
Comment 10•3 years ago
|
||
Comment 11•3 years ago
|
||
bugherder |
Comment 12•3 years ago
|
||
Martin, do you think this is safe to uplift to beta? It seems to fix a major usability issue.
Assignee | ||
Comment 13•3 years ago
|
||
This code it not Linux/Wayland specific and affects Windows/Mac too. Also recent Nightly will be Beta in ~week - so I think it's better to keep it in Nightly.
Assignee | ||
Comment 14•3 years ago
|
||
Serhii, can you retest please?
Thanks.
Assignee | ||
Comment 15•3 years ago
|
||
Also If there's any popup bug remaining please open a new report for it.
Thanks.
Comment 16•3 years ago
|
||
Martin, everything is working fine.
- Browser menus not blinking
- Popup windows from extensions rendering correctly.
Thanks!
Comment 17•3 years ago
|
||
Oh, wait.
I was testing it without MOZ_ENABLE_WAYLAND=1
flag.
So, bug with inaccessible popup remains. I'll create separate issue then.
Comment 18•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #13)
This code it not Linux/Wayland specific and affects Windows/Mac too. Also recent Nightly will be Beta in ~week - so I think it's better to keep it in Nightly.
Martin: just wanted to let you know that at least on my setup this makes some weird popup flickering go away which makes daily usage much better. Would be super happy if you could consider adding it downstream in Fedora for the 92 build :)
Assignee | ||
Comment 19•3 years ago
|
||
Okay, will do.
Comment 22•3 years ago
|
||
Martin: I'm still having the menu flickering after updating to Firefox 93. Should I open a new bug report? I'm using Sway on Arch Linux with layout.css.devPixelsPerPx=1.2
. Thanks for your time.
Comment 23•3 years ago
|
||
(In reply to Martin Stránský [:stransky] (ni? me) from comment #15)
Also If there's any popup bug remaining please open a new report for it.
Thanks.
Gosh, I didn't see this comment. I'll go ahead open a new report.
Description
•