Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[watchOS] Turning on lockdown mode should not cause certain web fonts…
… to be enabled https://bugs.webkit.org/show_bug.cgi?id=259791 rdar://112281112 Reviewed by Aditya Keerthi. To optimize performance and data use, web fonts are currently always disabled on watchOS. However, enabling lockdown mode on watchOS actually causes us to *enable* support for a small subset for web fonts, since we change `DownloadableBinaryFontAllowedTypes` state from `None` (i.e. no web fonts allowed at all) to `Restricted`. This subsequently causes cached fonts in the GPU process to end up in an unexpected state on watchOS, triggering a `MESSAGE_CHECK` and causing the web process to terminate. It doesn't make sense for Lockdown mode to make web fonts *less* restrictive, so we can simply fix this by maintaining `DownloadableBinaryFontAllowedTypes::None` in the case where web fonts are already unconditionally disabled. * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::adjustSettingsForLockdownMode): * Tools/TestWebKitAPI/Tests/WebKitCocoa/LockdownModeFonts.mm: Rebaseline an API test for compatibility with watchOS as well, where web fonts are always disabled. Canonical link: https://commits.webkit.org/266563@main
- Loading branch information