Open Bug 1406334 Opened 7 years ago Updated 2 years ago

Handle clamping width/height of checkbox/radio on OSX

Categories

(Core :: Widget: Cocoa, enhancement, P3)

57 Branch
enhancement

Tracking

()

People

(Reporter: lochang, Unassigned)

References

Details

Attachments

(1 file)

Currently, we do not handle clamping width/height of checkbox/radio on OSX correctly. We expect a 30px*30px checkbox in the test case. Although it will expand the checkbox, it's not 30px*30px.
No longer depends on: 1404770
Depends on: 1404770
Attached file testcases.html
Native checkboxes only have 3 sizes: https://dxr.mozilla.org/mozilla-central/rev/5eba13f5b3a6ad80decdd8c7b30bff5fa477844f/widget/cocoa/nsNativeThemeCocoa.mm#1009. When the checkbox is drawn, it will snap to one of these sizes (https://dxr.mozilla.org/mozilla-central/rev/5eba13f5b3a6ad80decdd8c7b30bff5fa477844f/widget/cocoa/nsNativeThemeCocoa.mm#838).

IIRC scaling to a random size doesn't look good - I'm not even sure Apple has 3 sizes, the checkbox in the testcase doesn't scale  / snap at all in Safari.
Last I checked, in Safari the control size was based on the font-size, not on the specified dimensions of the input element.
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: