Closed Bug 1697210 Opened 5 years ago Closed 5 years ago

radio buttons can have uneven eye and border with non-native theme

Categories

(Core :: Widget: Win32, defect)

Unspecified
Windows
defect

Tracking

()

RESOLVED FIXED
88 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox86 --- unaffected
firefox87 --- unaffected
firefox88 + fixed

People

(Reporter: aryx, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(4 files)

Firefox 88.0a1 20210309094921 on Windows 8.1, device pixel ration 1.25

Radio buttons can have an uneven eye and border (border is stronger on the right than on the left).

Steps to reproduce: Open an open Phabricator revision and call its Lando page.

Flags: needinfo?(emilio)
Assignee: nobody → emilio
Status: NEW → ASSIGNED

This used to be the case (for default-sized radio buttons anyways)
before bug 1693688 (since GetMinimumWidgetSize returns a
LayoutDeviceIntSize, which rounded).

With the previous patch we never see uneven borders, but the radio might
be e.g. one pixel taller than its width, which also looks odd. So
truncate to device pixels to avoid it.

Depends on D107809

Flags: needinfo?(emilio)

data:text/html,<input type=checkbox checked disabled>

Has a weird double border because the DrawTarget codepath fills and
strokes the same path, which is fine if the border is opaque, but not
otherwise.

Since this is the only use for a non-opaque border that we have, I
think, dealing with it on the caller seems a bit simpler. But let me
know if you want me to fix it more generally in
PaintRoundedRectWithRadius. I think for the semi-transparent border
case we'd need to create two paths, one for the background and one for
the border, which is a bit unfortunate.

The webrender codepath does the right thing, but of course that doesn't
get used for checkboxes.

Attachment #9208056 - Attachment description: Bug 1697210 - Simplify radio button painting and fix some snapping issues. r=mstange → Bug 1697210 - Paint radio checkmark as part of nsNativeBasicTheme::PaintRadioControl, and snap the checkmark inset. r=mstange
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1e76b9c534c7 Paint radio checkmark as part of nsNativeBasicTheme::PaintRadioControl, and snap the checkmark inset. r=mstange https://hg.mozilla.org/integration/autoland/rev/be1d1b00f78d Make the checkbox / radio rect paint to an exact number of device pixels. r=mstange
Pushed by ealvarez@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/3466de88cadc Make disabled checkbox / radio buttons do the right thing when painted with non-webrender. r=mstange
Regressions: 1699931
Has Regression Range: --- → yes
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: