Skip to content
  • mrowe@apple.com's avatar
    <https://webkit.org/b/126499> Move WebKit off the legacy WebKit availability macros · 7d764722
    mrowe@apple.com authored
    The legacy WebKit availability macros are verbose, confusing, and provide no benefit
    over using the system availability macros directly. The original vision was that
    they'd serve a cross-platform purpose but that never came to be.
    
    Since WebKit1 is API on OS X but SPI on iOS, some indirection is still needed in the
    availability macros to allow the headers to advertise the API as unavailable on OS X
    without interfering with the ability to build on iOS. This is achieved by defining
    WEBKIT-prefixed versions of the Foundation availability macros that are defined to
    their NS-prefixed equivalents. The installed headers are post-processed to map these
    macros back to their Foundation equivalents.
    
    Part of <rdar://problem/15512304>.
    
    Source/WebCore:
    
    Reviewed by Sam Weinig.
    
    * WebCore.xcodeproj/project.pbxproj:
    * bindings/objc/WebKitAvailability.h: Added. This lives at the WebCore level since it
    will be needed by the Objective-C DOM bindings.
    
    Source/WebKit:
    
    Reviewed by Sam Weinig.
    
    * WebKit.xcodeproj/project.pbxproj: Change the Postprocess Headers build phase to
    invoke mac/postprocess-headers.sh.
    
    Source/WebKit/mac:
    
    The OS X version used in the new availability macros is based on the mapping in
    JavaScriptCore/WebKitAvailability.h.
    
    Reviewed by Sam Weinig.
    
    * Carbon/CarbonUtils.h:
    * Carbon/HIWebView.h:
    * MigrateHeaders.make: Migrate WebKitAvailability.h from WebCore as an API header.
    * Plugins/WebPlugin.h:
    * Plugins/WebPluginViewFactory.h:
    * WebView/WebFrameLoadDelegate.h:
    * WebView/WebResourceLoadDelegatePrivate.h:
    * WebView/WebUIDelegate.h:
    * postprocess-headers.sh: Added. Extracted from the Xcode project. Extended to map the
    WEBKIT-prefixed macros to their NS-prefixed equivalents on OS X and to remove them on iOS.
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@161332 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    7d764722