Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: a0c6667a0b87b8f7547a40186f41d003eb9f64fe
https://github.com/WebKit/WebKit/commit/a0c6667a0b87b8f7547a40186f41d003eb9f64fe
Author: Vitor Roriz <[email protected]>
Date: 2024-12-15 (Sun, 15 Dec 2024)
Changed paths:
M Source/WebCore/loader/cache/CachedFontLoadRequest.h
M
Source/WebCore/platform/graphics/coretext/FontCustomPlatformDataCoreText.cpp
A Tools/TestWebKitAPI/Tests/WebKitCocoa/Ahem-CFF.otf
M Tools/TestWebKitAPI/Tests/WebKitCocoa/LockdownModeFonts.mm
Log Message:
-----------
Text doesn't load properly in Lockdown mode
https://bugs.webkit.org/show_bug.cgi?id=284590
rdar://139031761
Reviewed by Brent Fulgham.
We are doing two related things on this patch:
1. We were failing to recgonize that Safe Font Parser could not handle a font.
When `softLinkCoreTextCTFontManagerCreateMemorySafeFontDescriptorFromData` fails
to produce a font description we should return a null FontCustomPlatformData
instead
of trying to create a FontCustomPlatformData object with it.
2. Avoiding fontLoaded re-entry:
When [1] happens we will fail to load the font and will deleted the related
extracted data. We do that by calling setErrorAndDeleteData, that calls
CachedResource::error.
`error` notifies this resource client's so that fontLoaded is invoked for each
of them. However,
this whole operation already started from a fontLoaded notification. So we are
adding a flag
to avoid processing it again for the same client, in this case,
CachedFontLoadRequest object.
* Source/WebCore/loader/cache/CachedFontLoadRequest.h:
* Source/WebCore/platform/graphics/coretext/FontCustomPlatformDataCoreText.cpp:
(WebCore::FontCustomPlatformData::createMemorySafe):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/Ahem-CFF.otf: Added.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/LockdownModeFonts.mm:
(TestWebKitAPI::TEST(LockdownMode, NotSupportedFontLoadingAPI)):
Canonical link: https://commits.webkit.org/287854@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes