Closed Bug 1634404 Opened 4 years ago Closed 4 years ago

[wayland] Popup windows does not behave correctly when layout.css.devPixelsPerPx != -1

Categories

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

77 Branch
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
83 Branch
Tracking Status
firefox-esr68 --- unaffected
firefox-esr78 --- disabled
firefox75 --- unaffected
firefox76 --- unaffected
firefox77 --- disabled
firefox78 --- disabled
firefox79 --- disabled
firefox82 --- wontfix
firefox83 --- fixed

People

(Reporter: dm, Assigned: jhorak)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: nightly-community, regression)

Attachments

(4 files)

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

Steps to reproduce:

Set layout.css.devPixelsPerPx to value different than 1 or -1.

Actual results:

The menus are misplaced

Expected results:

The menus shouldn't be misplaced

Regression introduced by https://bugzilla.mozilla.org/show_bug.cgi?id=1623974.
It doesn't work since 57400551129c73bf1a5b738e7fa03d331c02601d.

Blocks: wayland
Component: Untriaged → Widget: Gtk
OS: Unspecified → Linux
Product: Firefox → Core
Regressed by: 1623974
Hardware: Unspecified → x86_64
Has Regression Range: --- → yes

Jan, can you look at it please?
Thanks.

Flags: needinfo?(d.masserut)
Flags: needinfo?(d.masserut) → needinfo?(jhorak)

Because this bug's Severity has not been changed from the default since it was filed, and it's Priority is -- (non,) indicating it has has not been previously triaged, the bug's Severity is being updated to -- (default, untriaged.)

Severity: normal → --

Wouldn't it be enough to apply a patch like https://hg.mozilla.org/mozilla-central/rev/3fe51c2cecad?

A screenshot showing the context menu placement with layout.css.devPixelsPerPx set to 1.15 and with Wayland enabled in Firefox 77.0.

Assignee: nobody → jhorak
Blocks: wayland-popup
No longer blocks: wayland
Status: UNCONFIRMED → NEW
Ever confirmed: true
Priority: -- → P2
Hardware: x86_64 → Desktop

Is there any progress on this? I suppose many Linux users with hiDPI display rely on layout.css.devPixelsPerPx to scale the UI. It's been months with a broken browser experience for them. If there's anything I can do that does not involve writing code, I am happy to help.

Here two patch files, back ported some code from: 57400551129c73bf1a5b738e7fa03d331c02601d.
Tested with firefox-80.0.1, wayland and config layout.css.devPixelsPerPx = 1.25.
firefox-80.0.1-nsMenuPopupFrame.cpp.patch
firefox-80.0.1-nsWindow.cpp.patch

Jan, can you look at them? I'm afraid the anchor changes may introduce a regression when popup is moved on screen edge but I may be wrong.
Thanks.

I've tried the patch, but unfortunately we cannot accept it. It fixes the devPixelsPerPx issue but the regression is with menu overflow as they are not starting under the menuitem but rather from the top of the screen. We need to use the anchorRect for that.

Flags: needinfo?(jhorak)

(In reply to posinghaiku from comment #7)

Is there any progress on this? I suppose many Linux users with hiDPI display rely on layout.css.devPixelsPerPx to scale the UI. It's been months with a broken browser experience for them. If there's anything I can do that does not involve writing code, I am happy to help.

Yup, I'm one of those Linux users. I am on Sway/Wayland and Arch Linux. I haven't been able to use Firefox with my 4K display and Wayland enabled. My C++ skills are beyond bad, so I don't think I can help with the bugfix.

Pushed by cbrindusan@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/0a3b63449f4b
Fix popup position when layout.css.devPixelsPerPx > 0; r=stransky
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 83 Branch

Hello,

I'm happy to see the issue resolved but when will this fix be released? I'm on Firefox Version 84.0.2. Ubuntu 20.10 Wayland.

(In reply to Ari from comment #18)

Hello,

I'm happy to see the issue resolved but when will this fix be released? I'm on Firefox Version 84.0.2. Ubuntu 20.10 Wayland.

The milestone at the top of the bug report indicates that this issue was resolved for the Firefox 83.0 release. I can confirm that this bug has been fixed for me ever since: https://i.imgur.com/5I8ptdz.png.

(In reply to Sibo Dong from comment #19)

(In reply to Ari from comment #18)

Hello,

I'm happy to see the issue resolved but when will this fix be released? I'm on Firefox Version 84.0.2. Ubuntu 20.10 Wayland.

The milestone at the top of the bug report indicates that this issue was resolved for the Firefox 83.0 release. I can confirm that this bug has been fixed for me ever since: https://i.imgur.com/5I8ptdz.png.

My layout.css.devPixelsPerPx was set to 1.16 which causes the bug to occur still, but doesn't change the size when compared to 1.15. So using 1.15 as the value fixed the issue for me. Thank you.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: