NEW 259435
Remove iOS specific-quirk (non-standard) UA stylesheet rule from svg.css of 'text-size-adjust'
https://bugs.webkit.org/show_bug.cgi?id=259435
Summary Remove iOS specific-quirk (non-standard) UA stylesheet rule from svg.css of '...
Ahmad Saleem
Reported 2023-07-23 16:27:53 PDT
Hi Team, I am unable to find the rationale for the following rule and understand why iOS need it since it does not exist for desktop and also not any other browser. WebKit Source: https://github.com/WebKit/WebKit/blob/b5e4644abe94ff8a2991e7a9ceec14e2df43b6f7/Source/WebCore/css/svg.css#L64 It was added by this commit in 2014: https://github.com/WebKit/WebKit/commit/4c7785360b6851a86bab1caf0bde837b13e0a45f and with just this comment in change log without any further explanation: * css/svg.css: Added iOS-specific CSS styles. (text, tspan, tref): ________ I think it also causes issue in one specific test failing on ios-wk2 when in the past, I tried to merge Blink patch to account for 'zoom' for SVG Text. If there is valid reason than I think adding bit comment would help or else we should explore to get rid of it. CCing - @Simon - since he reviewed the commit, which added this. Thanks!
Attachments
Simon Fraser (smfr)
Comment 1 2023-07-24 09:35:40 PDT
This CSS line prevents text size boosting on iOS from affecting SVG, which seems reasonable.
Ahmad Saleem
Comment 2 2023-07-24 12:18:50 PDT
(In reply to Simon Fraser (smfr) from comment #1) > This CSS line prevents text size boosting on iOS from affecting SVG, which > seems reasonable. It think it hinders fixing - bug 118818 Link: https://github.com/WebKit/WebKit/pull/4011 ^ When I do, I get failure in iOS-wk2 for 'svg/text/font-small-enlarged-minimum-larger.svg' but it does not account for new zoom stuff.
Radar WebKit Bug Importer
Comment 3 2023-07-30 16:28:15 PDT
Myles C. Maxfield
Comment 4 2023-07-31 11:44:48 PDT
I guess I'm kind of confused why -webkit-text-size-adjust has an effect on the zoom property. I'd expect zoom to still work even if -webkit-text-size-adjust is set to none. If I were debugging this, that's probably where I would start.
Simon Fraser (smfr)
Comment 5 2023-07-31 12:35:17 PDT
Hold up, there's history here. `-webkit-text-size-adjust` was introduced independently on iOS webkit and trunk webkit to mean two different things. On trunk webkit, it affected min font size and zoom: see https://commits.webkit.org/6018@main I suspect that's what this rule is about.
Simon Fraser (smfr)
Comment 6 2023-07-31 12:35:54 PDT
s/rule/issue/
Ahmad Saleem
Comment 7 2023-07-31 16:09:18 PDT
In See 'Also' - bug removed 'webkit-text-size-adjust' and from looking into commit, it removed it from svg.css as well: https://github.com/WebKit/WebKit/commit/8c4b005b82057a009759524e4fb3494eed039e78 and later it was added by commit referred in "Comment 0". NOTE - I am trying to understand impact and history, so if I put some comments to record details, please don't mind. Also StackOverlfow: https://stackoverflow.com/questions/5303263/fix-font-size-issue-on-mobile-safari-iphone-where-text-is-rendered-inconsisten
Ahmad Saleem
Comment 8 2023-07-31 17:00:00 PDT
I took test case from Chrome bug reported (for bug 118818 - candidate merge) and then did it run on iOS 16.6: Test Case - https://jsfiddle.net/mEZq8/5/show iOS does not zoom 'text' issue [pinch to zoom and A+-] and don't have bug where 'A' text go out of container etc. but we have it on desktop as can be test on WebKit ToT etc. Separate Note - Local patch of bug 118818 still fixes it for desktop. ______ text, tspan, tref { -webkit-text-size-adjust: none; }
Note You need to log in before you can comment on or make changes to this bug.