Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: b1d937d5f61d1d842df7c1b27cc187ce5c727182
      
https://github.com/WebKit/WebKit/commit/b1d937d5f61d1d842df7c1b27cc187ce5c727182
  Author: Zak Ridouh <[email protected]>
  Date:   2026-08-20 (Thu, 20 Aug 2026)

  Changed paths:
    M Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h
    M Source/WebKit/WebProcess/Plugins/PluginView.cpp
    M Source/WebKit/WebProcess/Plugins/PluginView.h
    M Source/cmake/OptionsCocoa.cmake
    M Source/cmake/WebKitXcodeSDK.cmake

  Log Message:
  -----------
  [CMake][iOS] Let Platform.h own the Cocoa features it already derives
https://bugs.webkit.org/show_bug.cgi?id=322199
rdar://185440265

Reviewed by David Kilzer.

cmakeconfig.h is force-included, so any feature the Cocoa option list sets by
hand suppresses the #if !defined(...) guard in PlatformEnableCocoa.h and wins.
It is force-included into the --defines-file derivation too, so the generators
see the hand-set value as well. Five of those values disagreed with what
Platform.h computes for iOS:

  - ENABLE_CURSOR_VISIBILITY was OFF for iOS; Platform.h enables it for all of
    PLATFORM(COCOA). It sat under a "Mac-only features" comment, which is wrong.
  - ENABLE_PERIODIC_MEMORY_MONITOR was ON everywhere and never overridden for
    iOS; Platform.h gates it on PLATFORM(MAC).
  - ENABLE_UNIFIED_PDF and ENABLE_PDF_PLUGIN were OFF for iOS; Platform.h
    enables both, so this was the only iOS build without the PDF plugin.
  - ENABLE_PDF_HUD agreed, but it derives from ENABLE(PDF_PLUGIN) &&
    PLATFORM(MAC), so hardcoding it would diverge once the chain changes.

Retire all five. Retiring the two PDF options exposed a guard mismatch:
PDFPluginBase::openWithPreview was declared outside the ENABLE(PDF_HUD) block
but defined inside it, leaving the symbol undefined with the plugin on and the
HUD off. Move the declaration in and guard the two PluginView entry points to
match; the only caller is mac-only and PDF_HUD is 1 on macOS.

No change on macOS, where all five already matched Platform.h. On iOS,
CURSOR_VISIBILITY, UNIFIED_PDF and PDF_PLUGIN go 0 -> 1 and
PERIODIC_MEMORY_MONITOR goes 1 -> 0.

Also reject unsupported Apple SDKs instead of falling through as macOS. An
unrecognized WEBKIT_SDK_NAME left the platform booleans OFF and
WEBKIT_PLATFORM_NAME unset, which evaluated Platform.h against
-mmacosx-version-min and wrote an empty DTPlatformName into the XPC service
Info.plists.

* Source/WebKit/WebProcess/Plugins/PDF/PDFPluginBase.h:
* Source/WebKit/WebProcess/Plugins/PluginView.cpp:
* Source/WebKit/WebProcess/Plugins/PluginView.h:
* Source/cmake/OptionsCocoa.cmake:
* Source/cmake/WebKitXcodeSDK.cmake:

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



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

Reply via email to