[webkit-changes] [WebKit/WebKit] 95b06f: [Unified PDF] Embedded PDFs are blank in snapshots

Tim Horton noreply at github.com
Wed Aug 21 01:41:45 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 95b06f4446ccccd849b94e81168963f7cb7ceb2e
      https://github.com/WebKit/WebKit/commit/95b06f4446ccccd849b94e81168963f7cb7ceb2e
  Author: Tim Horton <thorton at apple.com>
  Date:   2024-08-21 (Wed, 21 Aug 2024)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm

  Log Message:
  -----------
  [Unified PDF] Embedded PDFs are blank in snapshots
https://bugs.webkit.org/show_bug.cgi?id=278420
rdar://132092364

Reviewed by Simon Fraser and Abrar Rahman Protyasha.

258399 at main made us opt explicitly into local snapshot buffers for PDFPlugin
in the main frame, but not for subframes. We need local buffers in both cases,
since UnifiedPDFPlugin depends on having a platform context to paint into.

Check for PluginView (which is always PDFPlugin) instead of checking that the
frame itself is plugin-backed.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
(WebKit::snapshotImageOptions): Deleted.

* Tools/TestWebKitAPI/Tests/WebKitCocoa/UnifiedPDFTests.mm:
(TestWebKitAPI::configurationForWebViewTestingUnifiedPDF):
(TestWebKitAPI::TEST(UnifiedPDF, SnapshotsPaintPageContent)):
Add a test that confirms that the PDF content is painted.

Canonical link: https://commits.webkit.org/282551@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list