[webkit-changes] [WebKit/WebKit] 408e8e: [UnifiedPDF] PDF Plugin methods on WebPage should ...

Abrar Rahman Protyasha noreply at github.com
Tue Jan 23 20:08:20 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 408e8ec982b719e359bae2fe750882a751cc24da
      https://github.com/WebKit/WebKit/commit/408e8ec982b719e359bae2fe750882a751cc24da
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2024-01-23 (Tue, 23 Jan 2024)

  Changed paths:
    M Source/WebKit/WebProcess/WebPage/WebPage.cpp
    M Source/WebKit/WebProcess/WebPage/WebPage.h
    M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

  Log Message:
  -----------
  [UnifiedPDF] PDF Plugin methods on WebPage should be called behind enablement flags only
https://bugs.webkit.org/show_bug.cgi?id=267917
rdar://121424071

Reviewed by Tim Horton.

There are a couple of instances inside WebPage where we unconditionally
call the WebPage class's PDF plugin methods. These examples still
compiled because the offending callsites were behind PLATFORM(MAC),
which meant at least one PDF plugin type was implemented, but let's
guard our calls behind the right conditions.

This patch also performs a drive-by fix of providing a Cocoa definition
for WebPage::pdfDocumentForPrintingFrame. Previously, it was only
defined for PLATFORM(MAC), which worked because no other Cocoa platform
was calling into it, but that will change when we implement
computePagesForPrintingDocument in WebPageIOS.

* Source/WebKit/WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pdfDocumentForPrintingFrame):
* Source/WebKit/WebProcess/WebPage/WebPage.h:
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getStringSelectionForPasteboard):

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




More information about the webkit-changes mailing list