Closed Bug 1907291 Opened 4 months ago Closed 4 months ago

Broken size of customized checkboxes and radio buttons

Categories

(Core :: Layout: Form Controls, defect)

Firefox 129
defect

Tracking

()

RESOLVED DUPLICATE of bug 1907243
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox128 --- unaffected
firefox129 --- disabled
firefox130 + fixed

People

(Reporter: HaitraMysh, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0

Steps to reproduce:

We use customized checkboxes and radio buttons in our project. I have created the following fiddle that demonstrates our customizations. Fiddle: https://jsfiddle.net/edha6r5w.

When there are checkboxes and radio buttons that are checked when page loads, unchecking them causes unwanted change of their size (they become smaller). If they are not checked on page load, checking and unchecking them do not change their size.

You can try unchecking checkbox with id "cb1" or switching radio buttons in the fiddle linked above.

It was working fine in Firefox 128 beta. The problem occurs in Firefox 129 beta. I used mozregression tool and found out that it is caused by the following revision: https://phabricator.services.mozilla.com/D214081

Actual results:

Size of checkboxes and radio buttons changes when changed from checked to unchecked state.

Expected results:

Size of checkboxes and radio buttons should stay the same.

I forgot to add that it seems to be caused by setting a border for the elements. If border is not set, the size does not change.

Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: needinfo?(emilio)
Keywords: regression
Regressed by: 1903191

99% sure I just fixed this in bug 1907243.

Status: NEW → RESOLVED
Closed: 4 months ago
Duplicate of bug: 1907243
Flags: needinfo?(emilio)
Resolution: --- → DUPLICATE

So... that fixes the wrong sizing, indeed, but it causes the baseline to be wrong (which is technically pre-existing, but now it's visible with that test-case). Will take a look at that.

Status: RESOLVED → REOPENED
No longer duplicate of bug: 1907243
Flags: needinfo?(emilio)
Resolution: DUPLICATE → ---
Component: Untriaged → Layout: Form Controls
Product: Firefox → Core

This makes tricks like the one in comment 0 not work anymore. Before 127
this "worked" because it was relying on the dynamic update bug fixed in
bug 1907243.

It makes the default baseline a bit worse IMO, but it matches other
browsers so...

Assignee: nobody → emilio

Can we back out the regressor from beta? The patch in comment 4, while simple, is not super-trivial...

Flags: needinfo?(emilio) → needinfo?(dmeehan)

Setting Fx129 to disabled
The regressor Bug 1903191 was backed out of beta

Flags: needinfo?(dmeehan)
Attachment #9412996 - Attachment description: Bug 1907291 - Remove checkbox's special baseline code. r=#layout → Bug 1907291 - Remove checkbox's baseline border offset. r=#layout

So... the patch in comment 4 makes us match other browsers a bit better (there's no 2px baseline offset for the border), but that seems like a bad thing to rely on...

Are you using baseline alignment in your production code? How do you guarantee that the baseline matches between the none and auto cases?

Flags: needinfo?(HaitraMysh)

We are not using baseline alignment.

Flags: needinfo?(HaitraMysh)

Ok, given that, that the baseline between none and non-none cases were not the same before either, and that the current baseline looks better for checkboxes, I'll leave the code as-is... The shift in size was fixed by back out in 129 and by bug 1907243 in 130.

Status: REOPENED → RESOLVED
Closed: 4 months ago4 months ago
Duplicate of bug: 1907243
Resolution: --- → DUPLICATE
Attachment #9412996 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: