Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: df0f1ca3a12d34484dee20e2a6e5bbcafc34fc4c
https://github.com/WebKit/WebKit/commit/df0f1ca3a12d34484dee20e2a6e5bbcafc34fc4c
Author: Ryosuke Niwa <[email protected]>
Date: 2026-10-13 (Tue, 13 Oct 2026)
Changed paths:
M Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm
M Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm
Log Message:
-----------
UnifiedPDF is not compatible with remote snapshotting
https://bugs.webkit.org/show_bug.cgi?id=325709
rdar://188758015
Reviewed by Matt Woodrow.
When remote snapshotting is enabled, WebPage::takeRemoteSnapshot paints into a
RemoteSnapshotRecorderProxy, which is a DisplayList::Recorder with no platform
context.
UnifiedPDFPlugin::paintPDFContent unconditionally called
GraphicsContext::platformContext()
to hand a CGContext to PDFKit, which hit ASSERT_NOT_REACHED() in
DisplayList::Recorder::platformContext() and drew nothing.
Fix this by rendering the page with PDFKit into a local ImageBuffer when the
destination
context has no platform context, then drawing that buffer into the recording
context. The
buffer must be created with RenderingMethod::Local; otherwise
RemoteGraphicsContextProxy
hands back a RemoteImageBufferProxy whose context is also a recorder.
Test: TestWebKitAPI.UnifiedPDF.RemoteSnapshotPaintsPageContent
* Source/WebKit/WebProcess/Plugins/PDF/UnifiedPDF/UnifiedPDFPlugin.mm:
(WebKit::UnifiedPDFPlugin::paintPDFContent):
* Tools/TestWebKitAPI/Tests/WebKit/WKWebView/UnifiedPDFTests.mm:
(TestWebKitAPI::UNIFIED_PDF_TEST):
Canonical link: https://commits.webkit.org/323672@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications