Closed Bug 1782082 Opened 2 years ago Closed 2 years ago

Rounding error with some text zoom values cause mispositioned select dropdowns

Categories

(Core :: Widget, defect)

defect

Tracking

()

VERIFIED FIXED
105 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox-esr102 --- unaffected
firefox103 --- wontfix
firefox104 --- verified
firefox105 --- verified

People

(Reporter: emilio, Assigned: emilio)

References

(Regression, )

Details

(Keywords: regression)

Attachments

(3 files)

Attached image Example in the bug url

This is more visible with 1.5 in the windows / GNOME text zoom settings, since it maximizes the rounding error.

Make sure to use the same scale the browser chrome would actually use by
rounding to full app units.

This is specially visible with 1.5 text scale factor.

Set release status flags based on info from the regressing bug 1773342

(In reply to Emilio Cobos Álvarez (:emilio) from comment #0)

This is more visible with 1.5 in the windows / GNOME text zoom settings, since it maximizes the rounding error.

FWIW, I can't repro anywhere as much offset as your screenshot shows, with current Nightly on Ubuntu, after setting 1.5 as the scaling-factor in the gnome-tweaks tool's "fonts" pane. (In case it matters: I have 100% pixel-scaling, i.e. no HiDPI pixel-scaling in my screen resolution settings.)

Here's the worst that I was able to trigger (after trying various window-sizes; the popup-offset seems to vary subtly based on window size). There's a very tiny offset between the popup and the button, but not very much.

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/501e11ab6aea
Avoid rounding error accumulation in nsDOMWindowUtils::ToScreenRectInCSSUnits. r=dholbert
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 Branch

Comment on attachment 9287529 [details]
Bug 1782082 - Avoid rounding error accumulation in nsDOMWindowUtils::ToScreenRectInCSSUnits. r=#layout,handyman

Beta/Release Uplift Approval Request

  • User impact if declined: comment 0
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: No
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: comment 0 is an example, on a HiDPI screen with a large text scale factor.
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Simple behavior-preserving patch that just improves the precision of the returned values.
  • String changes made/needed: none
  • Is Android affected?: No
Attachment #9287529 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9287529 [details]
Bug 1782082 - Avoid rounding error accumulation in nsDOMWindowUtils::ToScreenRectInCSSUnits. r=#layout,handyman

Approved for 104.0b5

Attachment #9287529 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
QA Whiteboard: [qa-triaged]

I've reproduced this bug using an affected Beta build, 104.0b4, with the STR from comment 0.

The issue is verified as fixed on latest Nightly 105.0a1, under Win 10 x64.

This is also verified as fixed on Beta 104.0b5 with Win 10 x64.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: