Enable InstallAPI for iOS unconditionally
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 00:15:41 +0000 (00:15 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 31 Oct 2018 00:15:41 +0000 (00:15 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191043
rdar://problem/32728423

Reviewed by Dan Bernstein.

Source/WebKit:

* Configurations/Base.xcconfig: Enabled it. Added NSURLDownloadSPI.h as an
excluded header - WebKit doesn't export NSURLDownload, so the definition
shouldn't be processed by InstallAPI.

Source/WebKitLegacy:

* WebKitLegacy.xcodeproj/project.pbxproj: Added NSURLDownloadSPI.h.

Source/WebKitLegacy/mac:

* Configurations/WebKitLegacy.xcconfig: Enabled it. Added NSURLDownloadSPI.h as an
excluded header - WebKitLegacy doesn't export NSURLDownload, so the definition
shouldn't be processed by InstallAPI.
* MigrateHeaders.make: Removed an obsolete workaround.
* Misc/NSURLDownloadSPI.h: Added.
* Misc/WebDownload.h: Use NSURLDownloadSPI.h instead of defining SPI inline.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@237610 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit/ChangeLog
Source/WebKit/Configurations/Base.xcconfig
Source/WebKit/Configurations/WebKit.xcconfig
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj
Source/WebKitLegacy/mac/ChangeLog
Source/WebKitLegacy/mac/Configurations/WebKitLegacy.xcconfig
Source/WebKitLegacy/mac/MigrateHeaders.make
Source/WebKitLegacy/mac/Misc/NSURLDownloadSPI.h [new file with mode: 0644]
Source/WebKitLegacy/mac/Misc/WebDownload.h

index 5e58901..a9c3d9a 100644 (file)
@@ -1,5 +1,17 @@
 2018-10-30  Alexey Proskuryakov  <ap@apple.com>
 
+        Enable InstallAPI for iOS unconditionally
+        https://bugs.webkit.org/show_bug.cgi?id=191043
+        rdar://problem/32728423
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/Base.xcconfig: Enabled it. Added NSURLDownloadSPI.h as an
+        excluded header - WebKit doesn't export NSURLDownload, so the definition
+        shouldn't be processed by InstallAPI.
+
+2018-10-30  Alexey Proskuryakov  <ap@apple.com>
+
         Clean up some obsolete MAX_ALLOWED macros
         https://bugs.webkit.org/show_bug.cgi?id=190916
 
index 75be3c8..d17cf0f 100644 (file)
@@ -124,7 +124,7 @@ OTHER_CFLAGS = $(ASAN_OTHER_CFLAGS);
 OTHER_CPLUSPLUSFLAGS = $(ASAN_OTHER_CPLUSPLUSFLAGS) -isystem $(SDKROOT)/System/Library/Frameworks/System.framework/PrivateHeaders;
 OTHER_LDFLAGS = $(ASAN_OTHER_LDFLAGS);
 
-SUPPORTS_TEXT_BASED_API[sdk=iphone*] = $(USE_INTERNAL_SDK);
+SUPPORTS_TEXT_BASED_API[sdk=iphone*] = YES;
 SUPPORTS_TEXT_BASED_API[sdk=appletv*] = NO;
 SUPPORTS_TEXT_BASED_API[sdk=watch*] = NO;
 
index 25c9e6e..730a4f1 100644 (file)
@@ -139,7 +139,7 @@ REEXPORTED_FRAMEWORK_NAMES[sdk=macosx*] = $(inherited) WebCore;
 
 // FIXME: Remove -reexport_install_name once rdar://problem/30820233 is fixed.
 OTHER_TAPI_FLAGS = $(OTHER_TAPI_FLAGS_$(WK_COCOA_TOUCH));
-OTHER_TAPI_FLAGS_cocoatouch = $(inherited) -reexport_install_name $(WK_ALTERNATE_WEBKIT_SDK_PATH)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy -extra-private-header $(SRCROOT)/Platform/ExtraPrivateSymbolsForTAPI.h -extra-public-header $(SRCROOT)/Platform/ExtraPublicSymbolsForTAPI.h;
+OTHER_TAPI_FLAGS_cocoatouch = $(inherited) -reexport_install_name $(WK_ALTERNATE_WEBKIT_SDK_PATH)$(SYSTEM_LIBRARY_DIR)/PrivateFrameworks/WebKitLegacy.framework/WebKitLegacy -extra-private-header $(SRCROOT)/Platform/ExtraPrivateSymbolsForTAPI.h -extra-public-header $(SRCROOT)/Platform/ExtraPublicSymbolsForTAPI.h -exclude-private-header $(BUILT_PRODUCTS_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/NSURLDownloadSPI.h;
 
 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebKit.order;
index 612429f..46a3cac 100644 (file)
@@ -1,3 +1,13 @@
+2018-10-30  Alexey Proskuryakov  <ap@apple.com>
+
+        Enable InstallAPI for iOS unconditionally
+        https://bugs.webkit.org/show_bug.cgi?id=191043
+        rdar://problem/32728423
+
+        Reviewed by Dan Bernstein.
+
+        * WebKitLegacy.xcodeproj/project.pbxproj: Added NSURLDownloadSPI.h.
+
 2018-10-30  Commit Queue  <commit-queue@webkit.org>
 
         Unreviewed, rolling out r237600 and r237604.
index defd170..234a678 100644 (file)
                DD89682009AA87240097E7F0 /* WebElementDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = DD89681E09AA87240097E7F0 /* WebElementDictionary.h */; };
                DD89682109AA87240097E7F0 /* WebElementDictionary.mm in Sources */ = {isa = PBXBuildFile; fileRef = DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */; };
                E13E782C1E5A7365001849D1 /* WebCreateFragmentInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = E13E782B1E5A7365001849D1 /* WebCreateFragmentInternal.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               E1531BD82187B954002E3F81 /* NSURLDownloadSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = E1531BD72187B8F2002E3F81 /* NSURLDownloadSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                E15663190FB61C1F00C199CA /* WebDownload.mm in Sources */ = {isa = PBXBuildFile; fileRef = E15663180FB61C1F00C199CA /* WebDownload.mm */; };
                E169836211346D1B00894115 /* ProxyRuntimeObject.h in Headers */ = {isa = PBXBuildFile; fileRef = E169836111346D1B00894115 /* ProxyRuntimeObject.h */; };
                E169836C11346D5600894115 /* ProxyRuntimeObject.mm in Sources */ = {isa = PBXBuildFile; fileRef = E169836B11346D5600894115 /* ProxyRuntimeObject.mm */; };
                DD89681E09AA87240097E7F0 /* WebElementDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebElementDictionary.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                DD89681F09AA87240097E7F0 /* WebElementDictionary.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebElementDictionary.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
                E13E782B1E5A7365001849D1 /* WebCreateFragmentInternal.h */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.h; fileEncoding = 4; path = WebCreateFragmentInternal.h; sourceTree = "<group>"; };
+               E1531BD72187B8F2002E3F81 /* NSURLDownloadSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = NSURLDownloadSPI.h; sourceTree = "<group>"; };
                E15663180FB61C1F00C199CA /* WebDownload.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDownload.mm; sourceTree = "<group>"; };
                E169836111346D1B00894115 /* ProxyRuntimeObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyRuntimeObject.h; sourceTree = "<group>"; };
                E169836B11346D5600894115 /* ProxyRuntimeObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProxyRuntimeObject.mm; sourceTree = "<group>"; };
                        isa = PBXGroup;
                        children = (
                                A10C1D2018202FAF0036883A /* ios */,
+                               E1531BD72187B8F2002E3F81 /* NSURLDownloadSPI.h */,
                                29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */,
                                5241ADF30B1BC48A004012BD /* WebCache.h */,
                                5241ADF40B1BC48A004012BD /* WebCache.mm */,
                                93D436AB1D57ABEE00AB85EA /* DOMException.h in Headers */,
                                93D436AC1D57ABEE00AB85EA /* DOMExtensions.h in Headers */,
                                93D436AD1D57ABEE00AB85EA /* DOMFile.h in Headers */,
+                               E1531BD82187B954002E3F81 /* NSURLDownloadSPI.h in Headers */,
                                93D436AF1D57ABEE00AB85EA /* DOMFileInternal.h in Headers */,
                                93D436B01D57ABEE00AB85EA /* DOMFileList.h in Headers */,
                                93D436B21D57ABEE00AB85EA /* DOMFileListInternal.h in Headers */,
index ff20b7c..dbb0b68 100644 (file)
@@ -1,5 +1,20 @@
 2018-10-30  Alexey Proskuryakov  <ap@apple.com>
 
+        Enable InstallAPI for iOS unconditionally
+        https://bugs.webkit.org/show_bug.cgi?id=191043
+        rdar://problem/32728423
+
+        Reviewed by Dan Bernstein.
+
+        * Configurations/WebKitLegacy.xcconfig: Enabled it. Added NSURLDownloadSPI.h as an
+        excluded header - WebKitLegacy doesn't export NSURLDownload, so the definition
+        shouldn't be processed by InstallAPI.
+        * MigrateHeaders.make: Removed an obsolete workaround.
+        * Misc/NSURLDownloadSPI.h: Added.
+        * Misc/WebDownload.h: Use NSURLDownloadSPI.h instead of defining SPI inline.
+
+2018-10-30  Alexey Proskuryakov  <ap@apple.com>
+
         Clean up some obsolete MAX_ALLOWED macros
         https://bugs.webkit.org/show_bug.cgi?id=190916
 
index d422f16..91bd017 100644 (file)
@@ -135,9 +135,8 @@ WK_OVERRIDE_FRAMEWORKS_DIR_USE_STAGING_INSTALL_PATH_YES = $(SYSTEM_LIBRARY_DIR)/
 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR = $(WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_$(WK_USE_OVERRIDE_FRAMEWORKS_DIR));
 WK_QUOTED_OVERRIDE_FRAMEWORKS_DIR_YES = "$(WK_OVERRIDE_FRAMEWORKS_DIR)";
 
-// FIXME: Enable TAPI in open source builds once <rdar://problem/24582471> is fixed in all supported SDKs.
-SUPPORTS_TEXT_BASED_API[sdk=iphone*] = $(USE_INTERNAL_SDK);
+SUPPORTS_TEXT_BASED_API[sdk=iphone*] = YES;
 SUPPORTS_TEXT_BASED_API[sdk=appletv*] = NO;
 SUPPORTS_TEXT_BASED_API[sdk=watch*] = NO;
-OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++17 -fno-rtti -DRELEASE_WITHOUT_OPTIMIZATIONS;
+OTHER_TAPI_FLAGS[sdk=iphone*] = -x objective-c++ -std=c++17 -fno-rtti -DRELEASE_WITHOUT_OPTIMIZATIONS -exclude-private-header $(BUILT_PRODUCTS_DIR)/$(PRIVATE_HEADERS_FOLDER_PATH)/NSURLDownloadSPI.h;
 TAPI_VERIFY_MODE[sdk=iphone*] = Pedantic;
index d3b5525..223c9d5 100644 (file)
@@ -87,15 +87,9 @@ REEXPORT_FILE = $(BUILT_PRODUCTS_DIR)/DerivedSources/WebKitLegacy/ReexportedWebC
 reexport_headers : $(REEXPORT_FILE)
 
 TAPI_PATH = $(strip $(shell xcrun --find tapi 2>/dev/null))
-ifneq (,$(TAPI_PATH))
-REEXPORT_COMMAND = $(TAPI_PATH) reexport -arch $(WK_CURRENT_ARCH) -$(DEPLOYMENT_TARGET_CLANG_FLAG_NAME)=$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)) -isysroot $(SDK_DIR) $(HEADER_FLAGS) $(FRAMEWORK_FLAGS) $^ -o $@
-else
-# Temporary stub for SDKs that don't have the tapi command, <rdar://problem/24582471>.
-REEXPORT_COMMAND = touch $@
-endif
 
 $(REEXPORT_FILE) : $(HEADERS)
-       $(REEXPORT_COMMAND)
+       $(TAPI_PATH) reexport -arch $(WK_CURRENT_ARCH) -$(DEPLOYMENT_TARGET_CLANG_FLAG_NAME)=$($(DEPLOYMENT_TARGET_CLANG_ENV_NAME)) -isysroot $(SDK_DIR) $(HEADER_FLAGS) $(FRAMEWORK_FLAGS) $^ -o $@
 
 else
 
diff --git a/Source/WebKitLegacy/mac/Misc/NSURLDownloadSPI.h b/Source/WebKitLegacy/mac/Misc/NSURLDownloadSPI.h
new file mode 100644 (file)
index 0000000..db76ba1
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2018 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+@interface NSURLDownload : NSObject
+@end
+
+@protocol NSURLDownloadDelegate;
index 3c8f870..f434c28 100644 (file)
 #if !TARGET_OS_IPHONE || (defined USE_APPLE_INTERNAL_SDK && USE_APPLE_INTERNAL_SDK)
 #import <Foundation/NSURLDownload.h>
 #else
-@interface NSURLDownload : NSObject
-@end
-
-@protocol NSURLDownloadDelegate;
+#import <WebKitLegacy/NSURLDownloadSPI.h>
 #endif
 
 #if TARGET_OS_IPHONE