RESOLVED FIXED267679
<input type=checkbox switch> paints outside its box and the thumb is slightly misaligned on macOS
https://bugs.webkit.org/show_bug.cgi?id=267679
Summary <input type=checkbox switch> paints outside its box and the thumb is slightly...
Anne van Kesteren
Reported 2024-01-17 23:51:11 PST
As discovered in https://github.com/WebKit/WebKit/pull/22703#issuecomment-1890437523 <input type=checkbox> (and <input type=checkbox switch>) paint outside their box. Given it's only a couple points per pixel it's presumably shadows.
Attachments
Aditya Keerthi
Comment 1 2024-01-18 08:34:25 PST
If it's the shadows this is not a bug. If it's the control, then the implication is that these values are wrong: ``` static const int* checkboxMargins(NSControlSize controlSize) { static const int margins[4][4] = { // top right bottom left { 2, 2, 2, 2 }, { 2, 1, 2, 1 }, { 0, 0, 1, 0 }, { 2, 2, 2, 2 }, }; return margins[controlSize]; } ```
Anne van Kesteren
Comment 2 2024-01-19 04:57:32 PST
It's only the shadows. Is there a better way to test that? I guess we should rename the test at least to clarify shadows can leak here.
Radar WebKit Bug Importer
Comment 3 2024-01-24 23:52:14 PST
Anne van Kesteren
Comment 4 2024-03-07 09:23:41 PST
When I add masking for the thumb this goes away, so I suspect this was a real bug after all.
Anne van Kesteren
Comment 5 2024-03-07 09:31:42 PST
Anne van Kesteren
Comment 6 2024-03-07 10:30:39 PST
Hmm, there's still some bleeding on the bots, but noticeably less with that patch.
EWS
Comment 7 2024-03-07 14:41:05 PST
Committed 275808@main (5381f48e7a04): <https://commits.webkit.org/275808@main> Reviewed commits have been landed. Closing PR #25582 and removing active labels.
Note You need to log in before you can comment on or make changes to this bug.