[Catalina] Enable WebKit build
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2019 23:26:03 +0000 (23:26 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Jul 2019 23:26:03 +0000 (23:26 +0000)
https://bugs.webkit.org/show_bug.cgi?id=199209

Reviewed by Darin Adler.

Source/WebCore:

No new tests, Catalina test expectations will be migrated in the near future.

* WebCorePrefix.h: Exclude the header which declares SecTrustedApplicationCreateFromPath unavailable on Mac.
* crypto/mac/SerializedCryptoKeyWrapMac.mm: Ensure that we define SecTrustedApplicationCreateFromPath
before other headers declare it unavailable on Mac.

Source/WebCore/PAL:

* pal/spi/cf/CFNetworkSPI.h: Add new NSURLSessionConfiguration SPI.
* pal/spi/mac/AVFoundationSPI.h: resourceConservationLevelWhilePaused should
be defined after AVPlayerResourceConservationLevel.
* pal/spi/mac/NSViewSPI.h: Add subviewsIvar.

Source/WebKit:

* UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h: AppSSO is SPI.
* WebKit2Prefix.h: SecTask.h declares SecTaskGetCodeSignStatus(...) unavailable
on Mac, exclude this header.

Source/WebKitLegacy:

* mac/WebView/WebHTMLView.mm: Move NSView declaration to SPI header.
* mac/WebView/WebView.mm: Use _subviewsIvar instead of _subviews.

Source/WTF:

* wtf/spi/cocoa/SecuritySPI.h: Declare SecTrustedApplicationCreateFromPath(...).

Tools:

* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Add Mac framework stubs.

WebKitLibraries:

* WebKitPrivateFrameworkStubs/Mac: Added.
* WebKitPrivateFrameworkStubs/Mac/101500: Added.
* WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework: Added.
* WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework/AuthKit.tbd: Added.

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

19 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/spi/cocoa/SecuritySPI.h
Source/WebCore/ChangeLog
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/spi/cf/CFNetworkSPI.h
Source/WebCore/PAL/pal/spi/mac/AVFoundationSPI.h
Source/WebCore/PAL/pal/spi/mac/NSViewSPI.h
Source/WebCore/WebCorePrefix.h
Source/WebCore/crypto/mac/SerializedCryptoKeyWrapMac.mm
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h
Source/WebKit/WebKit2Prefix.h
Source/WebKitLegacy/ChangeLog
Source/WebKitLegacy/mac/WebView/WebHTMLView.mm
Source/WebKitLegacy/mac/WebView/WebView.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework/AuthKit.tbd [new file with mode: 0644]

index 88f81b7..d541c97 100644 (file)
@@ -1,3 +1,12 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        * wtf/spi/cocoa/SecuritySPI.h: Declare SecTrustedApplicationCreateFromPath(...).
+
 2019-07-03  Keith Miller  <keith_miller@apple.com>
 
         PACCage should first cage leaving PAC bits intact then authenticate
index 9357d0c..e3f6aee 100644 (file)
@@ -57,6 +57,10 @@ enum {
 
 WTF_EXTERN_C_BEGIN
 
+#if PLATFORM(MAC)
+OSStatus SecTrustedApplicationCreateFromPath(const char* path, SecTrustedApplicationRef*);
+#endif
+
 SecSignatureHashAlgorithm SecCertificateGetSignatureHashAlgorithm(SecCertificateRef);
 
 WTF_EXTERN_C_END
index e531427..502db28 100644 (file)
@@ -1,3 +1,16 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        No new tests, Catalina test expectations will be migrated in the near future.
+
+        * WebCorePrefix.h: Exclude the header which declares SecTrustedApplicationCreateFromPath unavailable on Mac.
+        * crypto/mac/SerializedCryptoKeyWrapMac.mm: Ensure that we define SecTrustedApplicationCreateFromPath
+        before other headers declare it unavailable on Mac.
+
 2019-07-02  Myles C. Maxfield  <mmaxfield@apple.com>
 
         [WHLSL] Standard library is too big to directly include in WebCore
index f43dae8..ba4f177 100644 (file)
@@ -1,3 +1,15 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        * pal/spi/cf/CFNetworkSPI.h: Add new NSURLSessionConfiguration SPI.
+        * pal/spi/mac/AVFoundationSPI.h: resourceConservationLevelWhilePaused should
+        be defined after AVPlayerResourceConservationLevel.
+        * pal/spi/mac/NSViewSPI.h: Add subviewsIvar.
+
 2019-07-03  Ryan Haddad  <ryanhaddad@apple.com>
 
         Unreviewed, rolling out r246616.
index 41786e1..e055425 100644 (file)
@@ -207,6 +207,12 @@ typedef NS_ENUM(NSInteger, NSURLSessionCompanionProxyPreference) {
 #if PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED >= 60000
 @property NSURLSessionCompanionProxyPreference _companionProxyPreference;
 #endif
+#if HAVE(APP_SSO)
+@property BOOL _preventsAppSSO;
+#endif
+#if HAVE(ALLOWS_SENSITIVE_LOGGING)
+@property BOOL _allowsSensitiveLogging;
+#endif
 @end
 
 @interface NSURLSessionTask ()
index 7addf5b..332d6c8 100644 (file)
@@ -327,13 +327,14 @@ NS_ASSUME_NONNULL_END
 #if !USE(APPLE_INTERNAL_SDK) && HAVE(AVPLAYER_RESOURCE_CONSERVATION_LEVEL)
 @interface AVPlayer (AVPlayerPrivate)
 
-@property (nonatomic) AVPlayerResourceConservationLevel resourceConservationLevelWhilePaused;
-
 typedef NS_ENUM(NSInteger, AVPlayerResourceConservationLevel) {
     AVPlayerResourceConservationLevelNone                                 = 0,
     AVPlayerResourceConservationLevelReduceReadAhead                      = 1,
     AVPlayerResourceConservationLevelReuseActivePlayerResources           = 2,
     AVPlayerResourceConservationLevelRecycleBuffer                        = 3,
 };
+
+@property (nonatomic) AVPlayerResourceConservationLevel resourceConservationLevelWhilePaused;
+
 @end
 #endif
index d71ff6b..e0d5b4e 100644 (file)
@@ -23,6 +23,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#import <wtf/Platform.h>
+
 #if USE(APPKIT)
 
 #import <pal/spi/cocoa/QuartzCoreSPI.h>
@@ -33,4 +35,8 @@
 
 @end
 
+@interface NSView (SubviewsIvar)
+@property (assign, setter=_setSubviewsIvar:) NSMutableArray<__kindof NSView *> *_subviewsIvar;
+@end
+
 #endif // PLATFORM(MAC)
index 782a847..db7cdca 100644 (file)
 #endif
 
 #if PLATFORM(MAC)
+#if !USE(APPLE_INTERNAL_SDK)
+/* SecTrustedApplication.h declares SecTrustedApplicationCreateFromPath(...) to
+ * be unavailable on macOS, so do not include that header. */
+#define _SECURITY_SECTRUSTEDAPPLICATION_H_
+#endif
 #include <CoreServices/CoreServices.h>
 #endif
 
index 3daef22..eba1bb0 100644 (file)
@@ -32,6 +32,7 @@
 #include "LocalizedStrings.h"
 #include <CommonCrypto/CommonSymmetricKeywrap.h>
 #include <crt_externs.h>
+#include <wtf/spi/cocoa/SecuritySPI.h>
 #include <wtf/text/Base64.h>
 #include <wtf/text/CString.h>
 #include <wtf/CryptographicUtilities.h>
index 5463163..ee4975c 100644 (file)
@@ -1,3 +1,14 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/Cocoa/SOAuthorization/SOAuthorizationSession.h: AppSSO is SPI.
+        * WebKit2Prefix.h: SecTask.h declares SecTaskGetCodeSignStatus(...) unavailable
+        on Mac, exclude this header.
+
 2019-07-03  Daniel Bates  <dabates@apple.com>
 
         REGRESSION (r246817): fast/events/ios/key-events-comprehensive/key-events-{control, control-shift}.html are failing
index a66365b..2a620c5 100644 (file)
@@ -27,7 +27,7 @@
 
 #if HAVE(APP_SSO)
 
-#include <AppSSO/SOBase.h>
+#include <pal/spi/cocoa/AppSSOSPI.h>
 #include <wtf/Forward.h>
 #include <wtf/RefCounted.h>
 #include <wtf/RetainPtr.h>
index 5b6d0b1..519b57a 100644 (file)
 #include <CoreGraphics/CoreGraphics.h>
 
 #ifdef __OBJC__
+#if !USE(APPLE_INTERNAL_SDK)
+/* SecTask.h declares SecTaskGetCodeSignStatus(...) to
+ * be unavailable on macOS, so do not include that header. */
+#define _SECURITY_SECTASK_H_
+#endif
 #import <Foundation/Foundation.h>
 #if USE(APPKIT)
 #import <Cocoa/Cocoa.h>
index 902bf19..6c959be 100644 (file)
@@ -1,3 +1,13 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        * mac/WebView/WebHTMLView.mm: Move NSView declaration to SPI header.
+        * mac/WebView/WebView.mm: Use _subviewsIvar instead of _subviews.
+
 2019-06-27  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [CMake] Bump cmake_minimum_required version to 3.10
index 48ea186..4ca160e 100644 (file)
@@ -218,10 +218,6 @@ using namespace WTF;
 - (id)_newFirstResponderAfterResigning;
 @end
 
-@interface NSView (SubviewsIvar)
-@property (nullable, assign, setter=_setSubviewsIvar:) NSMutableArray<__kindof NSView *> *_subviewsIvar;
-@end
-
 #if !HAVE(SUBVIEWS_IVAR_SPI)
 @implementation NSView (SubviewsIvar)
 
index 262c74a..cdcc0fc 100644 (file)
 #import <pal/spi/cocoa/NSURLFileTypeMappingsSPI.h>
 #import <pal/spi/mac/NSResponderSPI.h>
 #import <pal/spi/mac/NSSpellCheckerSPI.h>
+#import <pal/spi/mac/NSViewSPI.h>
 #import <pal/spi/mac/NSWindowSPI.h>
 #import <wtf/Assertions.h>
 #import <wtf/FileSystem.h>
@@ -5808,19 +5809,15 @@ static bool needsWebViewInitThreadWorkaround()
 
 - (void)encodeWithCoder:(NSCoder *)encoder
 {
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     // Set asside the subviews before we archive. We don't want to archive any subviews.
     // The subviews will always be created in _commonInitializationFrameName:groupName:.
-    id originalSubviews = _subviews;
-    _subviews = nil;
-    ALLOW_DEPRECATED_DECLARATIONS_END
+    id originalSubviews = self._subviewsIvar;
+    self._subviewsIvar = nil;
 
     [super encodeWithCoder:encoder];
 
-    ALLOW_DEPRECATED_DECLARATIONS_BEGIN
     // Restore the subviews we set aside.
-    _subviews = originalSubviews;
-    ALLOW_DEPRECATED_DECLARATIONS_END
+    self._subviewsIvar = originalSubviews;
 
     BOOL useBackForwardList = _private->page && static_cast<BackForwardList&>(_private->page->backForward().client()).enabled();
     if ([encoder allowsKeyedCoding]) {
index 0f9aa75..0d48573 100644 (file)
@@ -1,3 +1,12 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig: Add Mac framework stubs.
+
 2019-07-03  Sam Weinig  <weinig@apple.com>
 
         Adopt simple structured bindings in more places
index 891a6f3..7caa997 100644 (file)
 PRODUCT_NAME = TestWebKitAPI;
 GCC_ENABLE_OBJC_EXCEPTIONS = YES;
 
+WK_PRIVATE_FRAMEWORKS_DIR = $(WK_PRIVATE_FRAMEWORKS_DIR_$(USE_INTERNAL_SDK));
+WK_PRIVATE_FRAMEWORKS_DIR_[sdk=mac*] = $(PROJECT_DIR)/../../WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/$(MAC_OS_X_VERSION_MAJOR);
+FRAMEWORK_SEARCH_PATHS[sdk=mac*] = $(inherited) $(WK_PRIVATE_FRAMEWORK_STUBS_DIR) $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions/A/Frameworks;
+
 UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZN7testing4Test16TearDownTestCaseEv -Wl,-unexported_symbol -Wl,__ZN7testing4Test13SetUpTestCaseEv
 
 WK_AUTHKIT_LDFLAGS = $(WK_AUTHKIT_LDFLAGS_$(WK_PLATFORM_NAME));
index 4a46faf..e6749dc 100644 (file)
@@ -1,3 +1,15 @@
+2019-07-03  Jonathan Bedard  <jbedard@apple.com>
+
+        [Catalina] Enable WebKit build
+        https://bugs.webkit.org/show_bug.cgi?id=199209
+
+        Reviewed by Darin Adler.
+
+        * WebKitPrivateFrameworkStubs/Mac: Added.
+        * WebKitPrivateFrameworkStubs/Mac/101500: Added.
+        * WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework: Added.
+        * WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework/AuthKit.tbd: Added.
+
 2019-04-29  Basuke Suzuki  <Basuke.Suzuki@sony.com>
 
         [Win] Add flag to enable version information stamping and disable by default.
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework/AuthKit.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/Mac/101500/AuthKit.framework/AuthKit.tbd
new file mode 100644 (file)
index 0000000..eb45d16
--- /dev/null
@@ -0,0 +1,8 @@
+--- !tapi-tbd-v3
+archs:           [ x86_64 ]
+install-name:    '/System/Library/PrivateFrameworks/AuthKit.framework/AuthKit'
+platform: zippered
+exports:
+  - archs:           [ x86_64 ]
+    objc-classes:    [ AKAuthorizationController ]
+...