[webkit-changes] [WebKit/WebKit] eb66cb: [watchOS] Turning on lockdown mode should not caus...
Wenson Hsieh
noreply at github.com
Thu Aug 3 18:20:21 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: eb66cb9547364e0a6565d017cc90aa590ea26ed3
https://github.com/WebKit/WebKit/commit/eb66cb9547364e0a6565d017cc90aa590ea26ed3
Author: Wenson Hsieh <wenson_hsieh at apple.com>
Date: 2023-08-03 (Thu, 03 Aug 2023)
Changed paths:
M Source/WebKit/WebProcess/WebPage/WebPage.cpp
M Tools/TestWebKitAPI/Tests/WebKitCocoa/LockdownModeFonts.mm
Log Message:
-----------
[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
More information about the webkit-changes
mailing list