Bug 259435
Summary: | Remove iOS specific-quirk (non-standard) UA stylesheet rule from svg.css of 'text-size-adjust' | ||
---|---|---|---|
Product: | WebKit | Reporter: | Ahmad Saleem <ahmad.saleem792> |
Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
Status: | NEW | ||
Severity: | Normal | CC: | karlcow, mmaxfield, sabouhallawa, simon.fraser, webkit-bug-importer, wenson_hsieh, zimmermann |
Priority: | P2 | Keywords: | InRadar |
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=56543 https://bugs.webkit.org/show_bug.cgi?id=6487 https://bugs.webkit.org/show_bug.cgi?id=118818 |
Ahmad Saleem
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 | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Simon Fraser (smfr)
This CSS line prevents text size boosting on iOS from affecting SVG, which seems reasonable.
Ahmad Saleem
(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
<rdar://problem/113111959>
Myles C. Maxfield
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)
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)
s/rule/issue/
Ahmad Saleem
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
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;
}