WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
311188
Identical buttons drawn differently with font: -apple-system-short-body
https://bugs.webkit.org/show_bug.cgi?id=311188
Summary
Identical buttons drawn differently with font: -apple-system-short-body
Jeff Johnson
Reported
2026-03-31 07:49:22 PDT
Created
attachment 478864
[details]
Sample HTML demonstrating the bug This bug occurs on iOS 26.4 and iPadOS 26.4. The bug may be new, but I'm not certain about that. When there are multiple buttons on the page, and they use font: -apple-system-short-body, then they can be drawn with different corner radiuses. See the attached sample HTML and screenshot. If I remove the CSS font rule, the bug no longer occurs. The sample HTML is adapted from my Safari extension popup window.
Attachments
Sample HTML demonstrating the bug
(1.04 KB, text/html)
2026-03-31 07:49 PDT
,
Jeff Johnson
no flags
Details
Screenshot on iPhone
(17.99 KB, image/png)
2026-03-31 07:50 PDT
,
Jeff Johnson
no flags
Details
variant of the testcase that jiggles as it moves across the screen
(1.37 KB, text/html)
2026-05-18 17:32 PDT
,
Tim Horton
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Jeff Johnson
Comment 1
2026-03-31 07:50:00 PDT
Created
attachment 478865
[details]
Screenshot on iPhone
Radar WebKit Bug Importer
Comment 2
2026-03-31 09:02:46 PDT
<
rdar://problem/173786057
>
Tim Horton
Comment 3
2026-05-18 17:31:54 PDT
I worked this one out. It has nothing /really/ to do with the font, it's about the logic in RenderThemeCocoa's shapeForButton that tries to make "squareish" buttons not draw a circle"ish" background (by dropping to a much lower corner radius). The reason that identical buttons can vary across the page is that it uses the pixel-snapped size to decide which path (pill or roundrect) to go down, and different positions on the screen can result in different sizes. It just so happens that the font in the testcase puts the button right on the boundary, and rounding can kick it either way. I think the fix is to use the un-snapped size to decide which shape path to take.
Tim Horton
Comment 4
2026-05-18 17:32:49 PDT
Created
attachment 479707
[details]
variant of the testcase that jiggles as it moves across the screen Adding a variant of the testcase that moves the buttons around and clearly shows them pop between the two paths as they move.
Tim Horton
Comment 5
2026-05-19 16:06:48 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/65230
EWS
Comment 6
2026-05-19 18:42:52 PDT
Committed
313535@main
(8bf88660a664): <
https://commits.webkit.org/313535@main
> Reviewed commits have been landed. Closing PR #65230 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug