[Webkit-unassigned] [Bug 240947] New: -webkit-text-size-adjust doesn't work correctly on iPad

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu May 26 01:56:52 PDT 2022


https://bugs.webkit.org/show_bug.cgi?id=240947

            Bug ID: 240947
           Summary: -webkit-text-size-adjust doesn't work correctly on
                    iPad
           Product: WebKit
           Version: Safari 15
          Hardware: iPhone / iPad
                OS: iOS 15
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: CSS
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: chenhaowen0116 at gmail.com

Created attachment 459778

  --> https://bugs.webkit.org/attachment.cgi?id=459778&action=review

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20220526/67b48b31/attachment-0001.htm>


More information about the webkit-unassigned mailing list