Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 9fe9df5b0e1ab383a10e0075623cd5ba14f4544c
https://github.com/WebKit/WebKit/commit/9fe9df5b0e1ab383a10e0075623cd5ba14f4544c
Author: Brent Fulgham <[email protected]>
Date: 2026-04-28 (Tue, 28 Apr 2026)
Changed paths:
A LayoutTests/http/tests/lockdown-mode/resources/opentype_font_graph.svg
A
LayoutTests/http/tests/lockdown-mode/svg-with-unsupported-font-does-not-crash-expected.txt
A
LayoutTests/http/tests/lockdown-mode/svg-with-unsupported-font-does-not-crash.html
M Source/WebCore/editing/markup.cpp
M Source/WebCore/svg/graphics/SVGImage.cpp
M Tools/TestWebKitAPI/Helpers/cocoa/PasteboardUtilities.h
M Tools/TestWebKitAPI/Helpers/cocoa/PasteboardUtilities.mm
A Tools/TestWebKitAPI/Resources/cocoa/opentype_test.webarchive
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/PasteWebArchive.mm
Log Message:
-----------
[LDM] Ensure temporary pages use the correct Font Parser
https://bugs.webkit.org/show_bug.cgi?id=307612
rdar://169196655
Reviewed by Aditya Keerthi.
Font Parsing in Lockdown Mode is done using the SafeFontParser. There are some
cases where
a temporary page is created in the WebContent Process to support drag/drop or
other
operations. Those pages were not honoring the decision to use Safe Font Parser
in the main
document (defaulting to the normal System parser), which could allow an unsafe
font to be
used on the page.
If a font that would be rejected by the Safe Font Parser was processed in one
of these
scenarios, it would be serialized to the GPU Process. The GPU Process always
uses the Safe
Font Parser when handling fonts for a LDM process (regardless of page
settings). When a
serialized font was encountered that failed to parse with Safe Font Parser, we
would trigger
a MESSAGE_CHECK condition and terminate the responsible WebContent Process.
This patch corrects this mismatch, and prevents LDM users encountering problems
with web
pages that should be usable in LDM.
Tests: http/tests/lockdown-mode/svg-with-unsupported-font-does-not-crash.html
* LayoutTests/http/tests/lockdown-mode/resources/opentype_font_graph.svg: Added.
*
LayoutTests/http/tests/lockdown-mode/svg-with-unsupported-font-does-not-crash-expected.txt:
Added.
*
LayoutTests/http/tests/lockdown-mode/svg-with-unsupported-font-does-not-crash.html:
Added.
* Source/WebCore/editing/markup.cpp:
(WebCore::createPageForSanitizingWebContent):
* Source/WebCore/svg/graphics/SVGImage.cpp:
(WebCore::SVGImage::dataChanged):
* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteWebArchive.mm:
(TEST(PasteWebArchive, DestinationUsesLockdownMode)):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.h:
* Tools/TestWebKitAPI/Tests/WebKitCocoa/PasteboardUtilities.mm:
(createLockdownModeWebViewWithCustomPasteboardDataEnabled):
* Tools/TestWebKitAPI/Tests/WebKitCocoa/opentype_test.webarchive: Added.
Originally-landed-as: 305413.325@safari-7624-branch (0df5d7cad40b).
rdar://173969242
Canonical link: https://commits.webkit.org/312238@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications