WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
240947
-webkit-text-size-adjust doesn't work correctly on iPad
https://bugs.webkit.org/show_bug.cgi?id=240947
Summary
-webkit-text-size-adjust doesn't work correctly on iPad
Haowen
Reported
2022-05-26 01:56:52 PDT
Created
attachment 459778
[details]
How it looks like on iPad `configuration.defaultWebpagePreferences.preferredContentMode` has been set to `.mobile` But “webkit-text-size-adjust” doesn't work correctly on iPad. On iPhone, set “webkit-text-size-adjust” with 200%, both font-size and line-height will be scaled. But on iPad, only font-size gets scaled, line-height doesn't change. * STEPS TO REPRODUCE 1. Create a WKWebView with `config.defaultWebpagePreferences.preferredContentMode = .mobile` 2. loadHTMLString in WebView with "<h1 style="-webkit-text-size-adjust: 200%; font-size: 100px; line-height: 100px">Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!Hello, World!</h1>" 3. Run the app on iPhone and iPad * RESULTS Correct: On iPhone, the font-size and the line-height are all scaled to 200px Incorrect: On iPad, the font-size is scaled but the line-height is still 100px
Attachments
How it looks like on iPad
(276.70 KB, image/png)
2022-05-26 01:56 PDT
,
Haowen
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2022-06-02 01:57:13 PDT
<
rdar://problem/94274628
>
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