[webkit-changes] [WebKit/WebKit] 0e71a3: Legacy PDF plugin should not build on platforms wh...

Abrar Rahman Protyasha noreply at github.com
Wed Jan 29 01:01:17 PST 2025


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 0e71a3bc363b2ae4a2f2ae2476197e2b90fe4151
      https://github.com/WebKit/WebKit/commit/0e71a3bc363b2ae4a2f2ae2476197e2b90fe4151
  Author: Abrar Rahman Protyasha <a_protyasha at apple.com>
  Date:   2025-01-29 (Wed, 29 Jan 2025)

  Changed paths:
    M Source/WTF/wtf/PlatformEnableCocoa.h
    M Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h
    M Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h
    M Source/WebKit/Shared/WebPreferencesDefaultValues.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm
    M Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm

  Log Message:
  -----------
  Legacy PDF plugin should not build on platforms where Unified PDF is enabled by default
https://bugs.webkit.org/show_bug.cgi?id=286536
rdar://143631480

Reviewed by Tim Horton.

We've been building both plugins for debugging purposes, but since the
Unified PDF Plugin has been enabled by default since macOS 15.2, it's
okay for us to start sunsetting the legacy PDF plugin. The first step
here being only building the legacy plugin for platforms where Unified
PDF is not enabled by default.

The feature flag toggle is an internal setting for engineering purposes
anyway, and not supposed to be user configurable.

* Source/WTF/wtf/PlatformEnableCocoa.h:

ENABLE_LEGACY_PDFKIT_PLUGIN should never be set when
ENABLE_UNIFIED_PDF_BY_DEFAULT is.

* Source/WebCore/PAL/pal/spi/cg/CoreGraphicsSPI.h:

Stop gating incremental PDF API declaration behind LEGACY_PDFKIT_PLUGIN,
and instead gate it behind PDF_PLUGIN at large.

Also, drive-by cleanup of the SPI declaration by moving it inside
!USE(APPLE_INTERNAL_SDK) for open source builds, while pulling in the
appropriate header (CGDataProviderPrivate.h) for internal builds.

* Source/WebKit/Platform/spi/Cocoa/PDFKitSPI.h:
* Source/WebKit/Shared/WebPreferencesDefaultValues.h:

The Unified PDF feature flag is an internal setting for engineering
purposes anyway, and not supposed to be user configurable. In this
patch, we mark the feature as "mature" - not configurable in any UI -
for platform configurations where the legacy PDF plugin is compiled
away.

* Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:

Move this -[PDFAnnotation accessibilityNode] SPI declaration to
PDFKitSPI.h, since it's used outside of PDFPlugin.[h|mm].

* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginAnnotation.mm:
* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginPasswordField.mm:
* Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm:

Drive-by PDFPlugin.h/PDFLayerControllerSPI.h include cleanup.

Canonical link: https://commits.webkit.org/289493@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