Closed Bug 1735095 Opened 3 years ago Closed 3 years ago

[wayland][layout.css.devPixelsPerPx] popup menu flickers when scale != 1

Categories

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

Firefox 93
defect

Tracking

()

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: ian.s.mcb, Assigned: stransky)

References

(Blocks 1 open bug)

Details

Attachments

(6 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

  • Enable Wayland using: export MOZ_ENABLE_WAYLAND=1
  • In about:config, set layout.css.devPixelsPerPx=1.2

Actual results:

Popup menu flickers (for all add-ons, as well as for the Firefox settings/hamburger button).

Expected results:

According to bug 1708709, Firefox 93 should contain a fix for this flickering menu issue.

In case it helps, I'm running Sway/Wayland on Arch Linux and I have my packages up-to-date as of today.

$ pacman -Q sway-git wlroots-git
sway-git r6794.f4db502d-1
wlroots-git 0.14.0.r293.gdc22a061-1

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core

I just finished trying the latest nightly (installed via a tarball from mozilla.org). Same issue. Is there any more info I can provide, Martin?

Flags: needinfo?(ian.s.mcb)

Well, the layout.css.devPixelsPerPx scale is broken.

Summary: [wayland] popup menu flickers when scale != 1 → [wayland][layout.css.devPixelsPerPx] popup menu flickers when scale != 1

(In reply to Martin Stránský [:stransky] (ni? me) from comment #7)

Well, the layout.css.devPixelsPerPx scale is broken.

Huh? Is it something that can be fixed? It worked with Wayland enabled on Firefox 91. And It currently works with Wayland disabled.

It's on my todo list.

Got it. I'll be patient. I hope I was not rude.

Do you think this bug report should be marked "confirmed"?

(In reply to ian-s-mcb from comment #10)

Do you think this bug report should be marked "confirmed"?

Sure.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(ian.s.mcb)
Flags: needinfo?(ian.s.mcb)

(In reply to Martin Stránský [:stransky] (ni? me) from comment #12)

I'm unable to reproduce on Mutter (40.0) - can you try that? see:
https://fedoraproject.org/wiki/How_to_debug_Firefox_problems?rd=Bug_info_Firefox#Testing_different_Wayland_compositor
Thanks.

Thank you. I followed the instructions and got Firefox Nightly to run inside the nested mutter compositor.

I was able to reproduce the issue in Mutter. This screenshot shows the hamburger menu selected but the popup isn't show. When I revert the layout.css.devPixelsPerPx setting the popup shows up properly.

Priority: -- → P2

Which mutter version do you run?

Please run Firefox in mutter with MOZ_LOG="WidgetPopup:5" env variable and attach the log here.
Thanks.

Attached file popup_issue_log.txt
$ mutter --version
mutter 40.5

I see, Thanks. Looks like we enter to endless loop where the popup is positioned again and again, perhaps because of small screen area (on the mutter).

Blocks: wayland-popup
No longer blocks: wayland-sway

Yes, this is the famous +-1 rounding error bug. We end in endless loop due to rounding error while popup coordinates are oscillating around given value.

Assignee: nobody → stransky
Status: NEW → ASSIGNED

When font scale is used, move-to-rect popup positiong may end up in endless loop due to rounding error while
popup position oscilates around layout position.

We don't have a fox for that so let's disable such small popup movements when font scale is used.

Depends on D129153

Pushed by stransky@redhat.com:
https://hg.mozilla.org/integration/autoland/rev/b53d3a6df92b
[Wayland] Polish cursorOffset logging, r=jhorak
https://hg.mozilla.org/integration/autoland/rev/aceba6246b0e
[Wayland] When font/text scale factor is used, don't reposition popups for +-1 pixel moves, r=jhorak
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch
Flags: qe-verify+

I'm seeing that this was fixed in Firefox 95, however it has regressed for me when I upgraded from 94.

My config has layout.css.devPixelsPerPx set to 1.15, which renders context menus unusable in Firefox versions 95 and now 96.
The issue is solved if I set it to 1.0, 1.12 or 1.25. So some values still cause problems.

I am using Wayland with Sway. This doesn't happen if I disable Wayland in Firefox using MOZ_ENABLE_WAYLAND=0.

(In reply to quietvoid from comment #28)

I'm seeing that this was fixed in Firefox 95, however it has regressed for me when I upgraded from 94.

My config has layout.css.devPixelsPerPx set to 1.15, which renders context menus unusable in Firefox versions 95 and now 96.
The issue is solved if I set it to 1.0, 1.12 or 1.25. So some values still cause problems.

I am using Wayland with Sway. This doesn't happen if I disable Wayland in Firefox using MOZ_ENABLE_WAYLAND=0.

I can confirm your issue. The config value of 1.15 breaks context menus on Firefox 96, with Sway 1.6.1. Fortunately, I'm fine with the config value of 1.25 which, like you mentioned, does work.

Martin, should I create a new bug report for issue that @quietvoid and I are seeing? My setup is now Firefox 97.0.1 and Sway 1.7.

Flags: needinfo?(stransky)

(In reply to ian-s-mcb from comment #30)

Martin, should I create a new bug report for issue that @quietvoid and I are seeing? My setup is now Firefox 97.0.1 and Sway 1.7.

Yes please.

Flags: needinfo?(stransky)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: