Diff
Modified: trunk/Source/WTF/ChangeLog (278779 => 278780)
--- trunk/Source/WTF/ChangeLog 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WTF/ChangeLog 2021-06-11 20:44:21 UTC (rev 278780)
@@ -1,3 +1,14 @@
+2021-06-11 Jonathan Bedard <jbed...@apple.com>
+
+ [Monterey] Support building WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=226846
+ <rdar://problem/79095148>
+
+ Reviewed by Tim Horton.
+
+ * wtf/PlatformHave.h: Add HAVE(VK_IMAGE_ANALYSIS).
+ * wtf/spi/cocoa/SecuritySPI.h:
+
2021-06-09 Chris Dumez <cdu...@apple.com>
Avoid some calls to StringView::toString() / StringView::toStringWithoutCopying()
Modified: trunk/Source/WTF/wtf/PlatformHave.h (278779 => 278780)
--- trunk/Source/WTF/wtf/PlatformHave.h 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WTF/wtf/PlatformHave.h 2021-06-11 20:44:21 UTC (rev 278780)
@@ -1022,3 +1022,10 @@
|| (PLATFORM(MACCATALYST) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000))
#define HAVE_CORE_TEXT_SBIX_IMAGE_SIZE_FUNCTIONS 1
#endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 120000) \
+ || ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 150000)
+#if !defined(HAVE_VK_IMAGE_ANALYSIS)
+#define HAVE_VK_IMAGE_ANALYSIS 1
+#endif
+#endif
Modified: trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h (278779 => 278780)
--- trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WTF/wtf/spi/cocoa/SecuritySPI.h 2021-06-11 20:44:21 UTC (rev 278780)
@@ -81,11 +81,15 @@
SecAccessControlRef SecAccessControlCreateFromData(CFAllocatorRef, CFDataRef, CFErrorRef*);
CFDataRef SecAccessControlCopyData(SecAccessControlRef);
+CFDataRef SecKeyCopySubjectPublicKeyInfo(SecKeyRef);
+
#if PLATFORM(MAC)
#include <Security/SecAsn1Types.h>
CFStringRef SecTaskCopySigningIdentifier(SecTaskRef, CFErrorRef *);
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
extern const SecAsn1Template kSecAsn1AlgorithmIDTemplate[];
extern const SecAsn1Template kSecAsn1SubjectPublicKeyInfoTemplate[];
+ALLOW_DEPRECATED_DECLARATIONS_END
uint32_t SecTaskGetCodeSignStatus(SecTaskRef);
#endif
Modified: trunk/Source/WebCore/ChangeLog (278779 => 278780)
--- trunk/Source/WebCore/ChangeLog 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebCore/ChangeLog 2021-06-11 20:44:21 UTC (rev 278780)
@@ -1,3 +1,17 @@
+2021-06-11 Jonathan Bedard <jbed...@apple.com>
+
+ [Monterey] Support building WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=226846
+ <rdar://problem/79095148>
+
+ Reviewed by Tim Horton.
+
+ Covered by exisiting tests.
+
+ * testing/Internals.cpp:
+ (WebCore::Internals::installImageOverlay): Explicitly define second arugment
+ to avoid 'missing field' compilation error.
+
2021-06-11 Chris Dumez <cdu...@apple.com>
Enable release logging in ephemeral sessions for parts of WebCore
Modified: trunk/Source/WebCore/PAL/ChangeLog (278779 => 278780)
--- trunk/Source/WebCore/PAL/ChangeLog 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebCore/PAL/ChangeLog 2021-06-11 20:44:21 UTC (rev 278780)
@@ -1,3 +1,14 @@
+2021-06-11 Jonathan Bedard <jbed...@apple.com>
+
+ [Monterey] Support building WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=226846
+ <rdar://problem/79095148>
+
+ Reviewed by Tim Horton.
+
+ * pal/spi/cocoa/CryptoKitCBridgingSPI.h: Add RSA BSSA declarations.
+ * pal/spi/mac/QuickLookMacSPI.h: Add Image Analysis declarations.
+
2021-06-08 Alex Christensen <achristen...@webkit.org>
Move PrivacyStance code from WebKitAdditions
Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/CryptoKitCBridgingSPI.h (278779 => 278780)
--- trunk/Source/WebCore/PAL/pal/spi/cocoa/CryptoKitCBridgingSPI.h 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/CryptoKitCBridgingSPI.h 2021-06-11 20:44:21 UTC (rev 278780)
@@ -34,15 +34,26 @@
#else
@interface RSABSSATokenWaitingActivation : NSObject
-@property (nonatomic, retain, readonly) NSData *blindedMessage;
+#if HAVE(RSA_BSSA)
+- (RSABSSATokenReady*)activateTokenWithServerResponse:(NSData*)serverResponse error:(NSError* __autoreleasing *)error;
+#endif
+@property (nonatomic, retain, readonly) NSData* blindedMessage;
@end
@interface RSABSSATokenReady : NSObject
-@property (nonatomic, retain, readonly) NSData *tokenContent;
-@property (nonatomic, retain, readonly) NSData *keyId;
-@property (nonatomic, retain, readonly) NSData *signature;
+@property (nonatomic, retain, readonly) NSData* tokenContent;
+@property (nonatomic, retain, readonly) NSData* keyId;
+@property (nonatomic, retain, readonly) NSData* signature;
@end
+#if HAVE(RSA_BSSA)
+@interface RSABSSATokenBlinder : NSObject
+- (instancetype)initWithPublicKey:(NSData*)spkiBytes error:(NSError* __autoreleasing *)error;
+- (RSABSSATokenWaitingActivation*)tokenWaitingActivationWithContent:(NSData*)content error:(NSError* __autoreleasing *)error;
+@property (nonatomic, retain, readonly) NSData* keyId;
+@end
+#endif
+
#endif // USE(APPLE_INTERNAL_SDK)
#endif // HAVE(RSA_BSSA)
Modified: trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h (278779 => 278780)
--- trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebCore/PAL/pal/spi/mac/QuickLookMacSPI.h 2021-06-11 20:44:21 UTC (rev 278780)
@@ -59,11 +59,12 @@
@end
@interface QLItem : NSObject <QLPreviewItem>
+@property (nonatomic, copy) NSDictionary* previewOptions;
@end
#endif // USE(APPLE_INTERNAL_SDK)
-#if HAVE(QUICKLOOK_PREVIEW_ITEM_DATA_PROVIDER)
+#if HAVE(QUICKLOOK_PREVIEW_ITEM_DATA_PROVIDER) || HAVE(VK_IMAGE_ANALYSIS)
@class UTType;
@interface QLItem (Staging_74299451)
@@ -72,6 +73,17 @@
#endif
+#if HAVE(VK_IMAGE_ANALYSIS)
+
+typedef NS_ENUM(NSInteger, QLPreviewActivity) {
+ QLPreviewActivityNone,
+ QLPreviewActivityMarkup,
+ QLPreviewActivityTrim,
+ QLPreviewActivityVisualSearch
+};
+
+#endif
+
#if HAVE(QUICKLOOK_ITEM_PREVIEW_OPTIONS)
@interface QLItem (Staging_77864637)
Modified: trunk/Source/WebCore/testing/Internals.cpp (278779 => 278780)
--- trunk/Source/WebCore/testing/Internals.cpp 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebCore/testing/Internals.cpp 2021-06-11 20:44:21 UTC (rev 278780)
@@ -5650,6 +5650,9 @@
lines.map([] (auto& line) -> TextRecognitionLineData {
return makeDataForLine(line);
})
+#if ENABLE(DATA_DETECTION)
+ , Vector<TextRecognitionDataDetector>()
+#endif
});
#else
UNUSED_PARAM(lines);
Modified: trunk/Source/WebKit/ChangeLog (278779 => 278780)
--- trunk/Source/WebKit/ChangeLog 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/ChangeLog 2021-06-11 20:44:21 UTC (rev 278780)
@@ -1,3 +1,29 @@
+2021-06-11 Jonathan Bedard <jbed...@apple.com>
+
+ [Monterey] Support building WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=226846
+ <rdar://problem/79095148>
+
+ Reviewed by Tim Horton.
+
+ * Platform/cocoa/TextRecognitionUtilities.mm: Import VisionKitSPI.h.
+ * Platform/spi/Cocoa/VisionKitSPI.h: Added.
+ * UIProcess/API/Cocoa/WKBrowsingContextController.mm:
+ (setUpPageLoaderClient): Allow deprecated declarations.
+ (setUpPagePolicyClient): Ditto.
+ * UIProcess/API/Cocoa/WKConnection.mm:
+ (setUpClient): Allow deprecated declarations.
+ * UIProcess/API/Cocoa/WKProcessGroup.mm:
+ (setUpConnectionClient): Allow deprecated declarations.
+ (setUpInjectedBundleClient): Ditto.
+ (setUpHistoryClient): Ditto.
+ * UIProcess/API/Cocoa/WKWebViewTesting.mm:
+ (-[WKWebView _createMediaSessionCoordinatorForTesting:completionHandler:]): Explicitly define second arugment
+ to avoid 'missing field' compilation error.
+ * UIProcess/Cocoa/WebViewImpl.mm: Import VisionKitSPI.h.
+ * UIProcess/ios/WKContentViewInteraction.mm: Ditto.
+ * WebKit.xcodeproj/project.pbxproj: Ditto.
+
2021-06-11 Chris Dumez <cdu...@apple.com>
Enable release logging in ephemeral sessions for parts of WebCore
Modified: trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm (278779 => 278780)
--- trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/Platform/cocoa/TextRecognitionUtilities.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -28,8 +28,7 @@
#if ENABLE(IMAGE_ANALYSIS)
-#import <VisionKitCore/VKImageAnalysis_WebKit.h>
-#import <VisionKitCore/VKQuad.h>
+#import "VisionKitSPI.h"
#import <WebCore/TextRecognitionResult.h>
#import <pal/spi/cocoa/FeatureFlagsSPI.h>
Added: trunk/Source/WebKit/Platform/spi/Cocoa/VisionKitSPI.h (0 => 278780)
--- trunk/Source/WebKit/Platform/spi/Cocoa/VisionKitSPI.h (rev 0)
+++ trunk/Source/WebKit/Platform/spi/Cocoa/VisionKitSPI.h 2021-06-11 20:44:21 UTC (rev 278780)
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+#if HAVE(VK_IMAGE_ANALYSIS)
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <VisionKitCore/VKImageAnalysis_WebKit.h>
+#import <VisionKitCore/VKImageAnalyzer.h>
+#import <VisionKitCore/VKQuad.h>
+
+#else
+
+NS_ASSUME_NONNULL_BEGIN
+
+typedef int32_t VKImageAnalysisRequestID;
+
+typedef NS_OPTIONS(NSUInteger, VKAnalysisTypes) {
+ VKAnalysisTypeText = 1 << 0,
+ VKAnalysisTypeTextDataDetector = 1 << 1,
+ VKAnalysisTypeMachineReadableCode = 1 << 2,
+ VKAnalysisTypeAppClip = 1 << 3,
+ VKAnalysisTypeVisualSearch = 1 << 4,
+ VKAnalysisTypeNone = 0,
+ VKAnalysisTypeAll = NSUIntegerMax,
+};
+
+#if PLATFORM(IOS)
+
+typedef UIImage VKImageClass;
+
+typedef UIImageOrientation VKImageOrientation;
+
+#define VKImageOrientationUp UIImageOrientationUp
+#define VKImageOrientationDown UIImageOrientationDown
+#define VKImageOrientationLeft UIImageOrientationLeft
+#define VKImageOrientationRight UIImageOrientationRight
+#define VKImageOrientationUpMirrored UIImageOrientationUpMirrored
+#define VKImageOrientationDownMirrored UIImageOrientationDownMirrored
+#define VKImageOrientationLeftMirrored UIImageOrientationLeftMirrored
+#define VKImageOrientationRightMirrored UIImageOrientationRightMirrored
+
+#else
+
+typedef NSImage VKImageClass;
+
+typedef NS_ENUM(NSInteger, VKImageOrientation) {
+ VKImageOrientationUp,
+ VKImageOrientationDown,
+ VKImageOrientationLeft,
+ VKImageOrientationRight,
+ VKImageOrientationUpMirrored,
+ VKImageOrientationDownMirrored,
+ VKImageOrientationLeftMirrored,
+ VKImageOrientationRightMirrored,
+};
+
+#endif
+
+@interface VKImageAnalysis : NSObject <NSSecureCoding>
+- (BOOL)hasResultsForAnalysisTypes:(VKAnalysisTypes)analysisTypes;
+@end
+
+@protocol VKFeedbackAssetsProvider <NSObject>
+- (BOOL)saveAssetsToFeedbackAttachmentsFolder:(NSURL *)attachmentsFolderURL error:(NSError *)error;
+@end
+
+@interface VKImageAnalyzerRequest : NSObject <NSCopying, VKFeedbackAssetsProvider>
+- (instancetype)init NS_UNAVAILABLE;
+- (instancetype)initWithImage:(VKImageClass *)image requestType:(VKAnalysisTypes)analysisType;
+- (instancetype)initWithCGImage:(CGImageRef)image orientation:(VKImageOrientation)orientation requestType:(VKAnalysisTypes)analysisType;
+@end
+
+@interface VKImageAnalyzer : NSObject
+@property (nonatomic, strong, nullable) dispatch_queue_t callbackQueue;
+- (VKImageAnalysisRequestID)processRequest:(VKImageAnalyzerRequest *)request
+ progressHandler:(void (^_Nullable)(double progress))progressHandler
+ completionHandler:(void (^)(VKImageAnalysis* _Nullable analysis, NSError * _Nullable error))completionHandler;
+@end
+
+@interface VKQuad : NSObject <NSCopying, NSSecureCoding>
+@property (nonatomic, readonly) CGPoint topLeft;
+@property (nonatomic, readonly) CGPoint topRight;
+@property (nonatomic, readonly) CGPoint bottomLeft;
+@property (nonatomic, readonly) CGPoint bottomRight;
+@property (nonatomic, readonly) CGRect boundingBox;
+@end
+
+@interface VKWKTextInfo : NSObject
+@property (nonatomic, readonly) NSString *string;
+@property (nonatomic, readonly) VKQuad *quad;
+@end
+
+@interface VKWKLineInfo : VKWKTextInfo
+@property (nonatomic, readonly) NSArray<VKWKTextInfo *> *children;
+@end
+
+@interface VKImageAnalysis (WebKitSPI)
+@property (nonatomic, readonly) NSArray <VKWKLineInfo *> *allLines;
+#if PLATFORM(IOS)
+@property (nonatomic) UIMenu * mrcMenu;
+#endif
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+
+#endif
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm (278779 => 278780)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKBrowsingContextController.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -439,7 +439,9 @@
[(id <WKBrowsingContextLoadDelegatePrivate>)loadDelegate browsingContextControllerWebProcessDidCrash:browsingContext];
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
static void setUpPageLoaderClient(WKBrowsingContextController *browsingContext, WebKit::WebPageProxy& page)
+ALLOW_DEPRECATED_DECLARATIONS_END
{
WKPageNavigationClientV0 loaderClient;
memset(&loaderClient, 0, sizeof(loaderClient));
@@ -476,7 +478,9 @@
});
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
static void setUpPagePolicyClient(WKBrowsingContextController *browsingContext, WebKit::WebPageProxy& page)
+ALLOW_DEPRECATED_DECLARATIONS_END
{
WKPagePolicyClientInternal policyClient;
memset(&policyClient, 0, sizeof(policyClient));
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm (278779 => 278780)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKConnection.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -76,7 +76,9 @@
[delegate connectionDidClose:connection];
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
static void setUpClient(WKConnection *wrapper, WebKit::WebConnection& connection)
+ALLOW_DEPRECATED_DECLARATIONS_END
{
WKConnectionClientV0 client;
memset(&client, 0, sizeof(client));
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm (278779 => 278780)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKProcessGroup.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -73,7 +73,9 @@
[delegate processGroup:processGroup didCreateConnectionToWebProcessPlugIn:wrapper(*WebKit::toImpl(connectionRef))];
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
static void setUpConnectionClient(WKProcessGroup *processGroup, WKContextRef contextRef)
+ALLOW_DEPRECATED_DECLARATIONS_END
{
WKContextConnectionClientV0 connectionClient;
memset(&connectionClient, 0, sizeof(connectionClient));
@@ -101,7 +103,9 @@
return 0;
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
static void setUpInjectedBundleClient(WKProcessGroup *processGroup, WKContextRef contextRef)
+ALLOW_DEPRECATED_DECLARATIONS_END
{
WKContextInjectedBundleClientV1 injectedBundleClient;
memset(&injectedBundleClient, 0, sizeof(injectedBundleClient));
@@ -169,7 +173,9 @@
[historyDelegate browsingContextController:controller didUpdateHistoryTitle:wrapper(*WebKit::toImpl(titleRef)) forURL:wrapper(*WebKit::toImpl(urlRef))];
}
+ALLOW_DEPRECATED_DECLARATIONS_BEGIN
static void setUpHistoryClient(WKProcessGroup *processGroup, WKContextRef contextRef)
+ALLOW_DEPRECATED_DECLARATIONS_END
{
WKContextHistoryClientV0 historyClient;
memset(&historyClient, 0, sizeof(historyClient));
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm (278779 => 278780)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebViewTesting.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -454,7 +454,7 @@
std::optional<WebCore::ExceptionData> result(bool success) const
{
if (!success)
- return { WebCore::ExceptionData { WebCore::InvalidStateError } };
+ return { WebCore::ExceptionData { WebCore::InvalidStateError, String() } };
return { };
}
@@ -468,7 +468,7 @@
{
[m_clientCoordinator joinWithCompletion:makeBlockPtr([weakThis = makeWeakPtr(this), callback = WTFMove(callback)] (BOOL success) mutable {
if (!weakThis) {
- callback(WebCore::ExceptionData { WebCore::InvalidStateError });
+ callback(WebCore::ExceptionData { WebCore::InvalidStateError, String() });
return;
}
@@ -485,7 +485,7 @@
{
[m_clientCoordinator seekTo:time withCompletion:makeBlockPtr([weakThis = makeWeakPtr(this), callback = WTFMove(callback)] (BOOL success) mutable {
if (!weakThis) {
- callback(WebCore::ExceptionData { WebCore::InvalidStateError });
+ callback(WebCore::ExceptionData { WebCore::InvalidStateError, String() });
return;
}
@@ -497,7 +497,7 @@
{
[m_clientCoordinator playWithCompletion:makeBlockPtr([weakThis = makeWeakPtr(this), callback = WTFMove(callback)] (BOOL success) mutable {
if (!weakThis) {
- callback(WebCore::ExceptionData { WebCore::InvalidStateError });
+ callback(WebCore::ExceptionData { WebCore::InvalidStateError, String() });
return;
}
@@ -509,7 +509,7 @@
{
[m_clientCoordinator pauseWithCompletion:makeBlockPtr([weakThis = makeWeakPtr(this), callback = WTFMove(callback)] (BOOL success) mutable {
if (!weakThis) {
- callback(WebCore::ExceptionData { WebCore::InvalidStateError });
+ callback(WebCore::ExceptionData { WebCore::InvalidStateError, String() });
return;
}
@@ -521,7 +521,7 @@
{
[m_clientCoordinator setTrack:track withCompletion:makeBlockPtr([weakThis = makeWeakPtr(this), callback = WTFMove(callback)] (BOOL success) mutable {
if (!weakThis) {
- callback(WebCore::ExceptionData { WebCore::InvalidStateError });
+ callback(WebCore::ExceptionData { WebCore::InvalidStateError, String() });
return;
}
Modified: trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (278779 => 278780)
--- trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -146,11 +146,7 @@
#include "MediaSessionCoordinatorProxyPrivate.h"
#endif
-#if ENABLE(IMAGE_ANALYSIS)
-#import <VisionKitCore/VKImageAnalysis_WebKit.h>
-#import <VisionKitCore/VKImageAnalyzer.h>
-#import <VisionKitCore/VKQuad.h>
-#endif // ENABLE(IMAGE_ANALYSIS)
+#import "VisionKitSPI.h"
#if HAVE(TRANSLATION_UI_SERVICES)
#import <TranslationUIServices/LTUITranslationViewController.h>
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (278779 => 278780)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -177,8 +177,7 @@
#if ENABLE(IMAGE_ANALYSIS)
// FIXME: This should be pulled out into a separate softlinking header (either in PAL or WebKit2).
-#import <VisionKitCore/VKImageAnalysis_WebKit.h>
-#import <VisionKitCore/VKImageAnalyzer.h>
+#import "VisionKitSPI.h"
SOFT_LINK_PRIVATE_FRAMEWORK_OPTIONAL(VisionKitCore)
SOFT_LINK_CLASS_OPTIONAL(VisionKitCore, VKImageAnalyzer)
SOFT_LINK_CLASS_OPTIONAL(VisionKitCore, VKImageAnalyzerRequest)
Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (278779 => 278780)
--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj 2021-06-11 20:44:21 UTC (rev 278780)
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 52;
+ objectVersion = 54;
objects = {
/* Begin PBXAggregateTarget section */
@@ -813,6 +813,7 @@
312CC9F2215B06F100DE40CA /* HighPerformanceGPUManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 31ABA79C215AF9E000C90E31 /* HighPerformanceGPUManager.h */; };
3131261F148FF82C00BA2A39 /* NotificationPermissionRequestManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3131261A148FF82B00BA2A39 /* NotificationPermissionRequestManager.h */; };
31312621148FF82C00BA2A39 /* WebNotificationManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 3131261C148FF82B00BA2A39 /* WebNotificationManager.h */; };
+ 3155EE0D2673F4F00085E59A /* VisionKitSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 3155EE0C2673F4EF0085E59A /* VisionKitSPI.h */; };
3157135F2040A9B20084F9CF /* SystemPreviewController.h in Headers */ = {isa = PBXBuildFile; fileRef = 3157135D2040A9B20084F9CF /* SystemPreviewController.h */; };
316B8B642054B55800BD4A62 /* WKSystemPreviewView.h in Headers */ = {isa = PBXBuildFile; fileRef = 316B8B622054B55800BD4A62 /* WKSystemPreviewView.h */; };
317FE7C51C487A6C00A0CA89 /* APIExperimentalFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 317FE7C21C487A6600A0CA89 /* APIExperimentalFeature.h */; };
@@ -3550,6 +3551,7 @@
3131261D148FF82C00BA2A39 /* WebNotificationManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManager.messages.in; sourceTree = "<group>"; };
314888FE1D91B11D00377042 /* WKTextChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKTextChecker.cpp; sourceTree = "<group>"; };
314888FF1D91B11D00377042 /* WKTextChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKTextChecker.h; sourceTree = "<group>"; };
+ 3155EE0C2673F4EF0085E59A /* VisionKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VisionKitSPI.h; sourceTree = "<group>"; };
3157135C2040A9B20084F9CF /* SystemPreviewControllerCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = SystemPreviewControllerCocoa.mm; sourceTree = "<group>"; };
3157135D2040A9B20084F9CF /* SystemPreviewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SystemPreviewController.h; sourceTree = "<group>"; };
31607F3819627002009B87DA /* LegacySessionStateCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacySessionStateCoding.h; sourceTree = "<group>"; };
@@ -7908,6 +7910,7 @@
3754D5411B3A2998003A4C7F /* Cocoa */ = {
isa = PBXGroup;
children = (
+ 3155EE0C2673F4EF0085E59A /* VisionKitSPI.h */,
E3CAAA432413278A00CED2E2 /* AccessibilitySupportSPI.h */,
572EBBDC25392181000552B3 /* AppAttestSPI.h */,
57FABB0E25817CF00059DC95 /* AuthenticationServicesCoreSPI.h */,
@@ -12035,6 +12038,7 @@
93B2614E227D14B100B97A76 /* LocalStorageDatabase.h in Headers */,
93B2614F227D14B100B97A76 /* LocalStorageDatabaseTracker.h in Headers */,
46BEB6DB22FB9D4800269867 /* LocalStorageNamespace.h in Headers */,
+ 3155EE0D2673F4F00085E59A /* VisionKitSPI.h in Headers */,
51A7F2F3125BF820008AEB1D /* Logging.h in Headers */,
0FDCD7F71D47E92A009F08BC /* LogInitialization.h in Headers */,
1A6D86C21DF75265007745E8 /* MachMessage.h in Headers */,
Modified: trunk/Tools/ChangeLog (278779 => 278780)
--- trunk/Tools/ChangeLog 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Tools/ChangeLog 2021-06-11 20:44:21 UTC (rev 278780)
@@ -1,3 +1,16 @@
+2021-06-11 Jonathan Bedard <jbed...@apple.com>
+
+ [Monterey] Support building WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=226846
+ <rdar://problem/79095148>
+
+ Reviewed by Tim Horton.
+
+ * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj: Add CoreCryptoSPI.h.
+ * TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h: Added.
+ * TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm: Import CoreCryptoSPI.h.
+ * TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm: Ditto.
+
2021-06-11 Devin Rousso <drou...@apple.com>
Add an option to Copy WebKit Permalink that automatically opens the URL in the default browser for Sublime Text
Modified: trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj (278779 => 278780)
--- trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj 2021-06-11 20:44:21 UTC (rev 278780)
@@ -2001,6 +2001,7 @@
31B76E4423299BA3007FED2C /* system-preview-trigger.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = "system-preview-trigger.html"; sourceTree = "<group>"; };
31E9BDA0247F4C62002E51A2 /* WebGLPrepareDisplayOnWebThread.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebGLPrepareDisplayOnWebThread.mm; sourceTree = "<group>"; };
31E9BDA2247F4DD0002E51A2 /* webgl.html */ = {isa = PBXFileReference; lastKnownFileType = text.html; path = webgl.html; sourceTree = "<group>"; };
+ 31F865E526701E73003BFC6D /* CoreCryptoSPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CoreCryptoSPI.h; sourceTree = "<group>"; };
333B9CE11277F23100FEFCE3 /* PreventEmptyUserAgent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PreventEmptyUserAgent.cpp; sourceTree = "<group>"; };
33976D8224DC479B00812304 /* IndexSparseSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IndexSparseSet.cpp; sourceTree = "<group>"; };
33BE5AF4137B5A6C00705813 /* MouseMoveAfterCrash.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MouseMoveAfterCrash.cpp; sourceTree = "<group>"; };
@@ -4865,6 +4866,7 @@
isa = PBXGroup;
children = (
0711DF51226A95FB003DD2F7 /* AVFoundationSoftLinkTest.mm */,
+ 31F865E526701E73003BFC6D /* CoreCryptoSPI.h */,
751B05D51F8EAC1A0028A09E /* DatabaseTrackerTest.mm */,
57F1C91025DDD51900E8F6EA /* PrivateClickMeasurementCocoa.mm */,
5769C50A1D9B0001000847FB /* SerializedCryptoKeyWrap.mm */,
Added: trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h (0 => 278780)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h (rev 0)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/CoreCryptoSPI.h 2021-06-11 20:44:21 UTC (rev 278780)
@@ -0,0 +1,172 @@
+/*
+ * Copyright (C) 2021 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.
+ */
+
+#pragma once
+
+extern "C" {
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#include <corecrypto/cc_priv.h>
+#include <corecrypto/ccrng.h>
+#include <corecrypto/ccrsa.h>
+#include <corecrypto/ccrsabssa.h>
+
+#else
+
+typedef size_t cc_size;
+
+#if defined(__arm64__) || defined(__x86_64__) || defined(_WIN64)
+#define CCN_UNIT_SIZE 8
+typedef uint64_t cc_unit;
+#define CCN_LOG2_BITS_PER_UNIT 6
+#elif defined(__arm__) || defined(__i386__) || defined(_WIN32)
+#define CCN_UNIT_SIZE 4
+typedef uint32_t cc_unit;
+#define CCN_LOG2_BITS_PER_UNIT 5
+#else
+#error undefined architecture
+#endif
+
+// Temporary VLA warning opt-outs to help transition away from VLAs.
+#define CC_IGNORE_VLA_WARNINGS \
+ _Pragma("GCC diagnostic push") \
+ _Pragma("GCC diagnostic ignored \"-Wvla\"")
+#define CC_RESTORE_VLA_WARNINGS \
+ _Pragma("GCC diagnostic pop")
+
+#if __has_feature(ptrauth_calls) && (CC_KERNEL || CC_USE_L4 || CC_USE_SEPROM)
+#include <ptrauth.h>
+#define CC_SPTR(_sn_, _n_) \
+ __ptrauth(ptrauth_key_process_independent_code, 1, ptrauth_string_discriminator("cc_" #_sn_ #_n_)) _n_
+#else
+#define CC_SPTR(_sn_, _n_) _n_
+#endif
+
+#define CCN_UNIT_BITS (sizeof(cc_unit) *8)
+
+#define ccn_sizeof_n(_n_) (sizeof(cc_unit) * (_n_))
+#define ccn_nof(_bits_) (((_bits_) + CCN_UNIT_BITS - 1) >> CCN_LOG2_BITS_PER_UNIT)
+#define ccn_sizeof(_bits_) (ccn_sizeof_n(ccn_nof(_bits_)))
+#define ccn_nof_size(_size_) (((_size_) + sizeof(cc_unit) - 1) / sizeof(cc_unit))
+#define ccn_nof_sizeof(_expr_) ccn_nof_size(sizeof(_expr_))
+#define ccn_bitsof_n(_n_) ((_n_) * CCN_UNIT_BITS)
+#define ccn_bitsof_size(_size_) ((_size_) * 8)
+#define ccn_sizeof_size(_size_) ccn_sizeof_n(ccn_nof_size(_size_))
+
+#define cc_ceiling(a, b) (((a) + ((b) - 1)) / (b))
+#define cc_ctx_n(_type_, _size_) ((_size_ + sizeof(_type_) - 1) / sizeof(_type_))
+
+struct cczp_funcs;
+typedef const struct cczp_funcs *cczp_funcs_t;
+
+#if defined(_MSC_VER)
+#if defined(__clang__)
+#define CC_ALIGNED(x) __attribute__ ((aligned(x)))
+#else
+#define CC_ALIGNED(x) __declspec(align(x))
+#endif
+#else
+#if __clang__ || CCN_UNIT_SIZE==8
+#define CC_ALIGNED(x) __attribute__ ((aligned(x)))
+#else
+#define CC_ALIGNED(x) __attribute__ ((aligned((x)>8?8:(x))))
+#endif
+#endif
+
+#define __CCZP_HEADER_ELEMENTS_DEFINITIONS(pre) \
+ cc_size pre##n; \
+ cc_unit pre##bitlen; \
+ cczp_funcs_t pre##funcs;
+
+#define __CCZP_ELEMENTS_DEFINITIONS(pre) \
+ __CCZP_HEADER_ELEMENTS_DEFINITIONS(pre) \
+ cc_unit pre##ccn[];
+
+struct cczp {
+ __CCZP_ELEMENTS_DEFINITIONS()
+} CC_ALIGNED(CCN_UNIT_SIZE);
+
+struct ccrsa_full_ctx {
+ __CCZP_ELEMENTS_DEFINITIONS(pb_)
+} CC_ALIGNED(CCN_UNIT_SIZE);
+
+struct ccrsa_pub_ctx {
+ __CCZP_ELEMENTS_DEFINITIONS(pb_)
+} CC_ALIGNED(CCN_UNIT_SIZE);
+
+struct ccrsa_priv_ctx {
+ __CCZP_ELEMENTS_DEFINITIONS(pv_)
+} CC_ALIGNED(CCN_UNIT_SIZE);
+
+typedef struct ccrsa_full_ctx* ccrsa_full_ctx_t;
+typedef struct ccrsa_pub_ctx* ccrsa_pub_ctx_t;
+typedef struct ccrsa_priv_ctx* ccrsa_priv_ctx_t;
+
+#if defined(_MSC_VER)
+#define cc_ctx_decl(_type_, _size_, _name_) _type_ * _name_ = (_type_ *) _alloca(sizeof(_type_) * cc_ctx_n(_type_, _size_) )
+#else
+#define cc_ctx_decl(_type_, _size_, _name_) \
+ CC_IGNORE_VLA_WARNINGS \
+ _type_ _name_[cc_ctx_n(_type_, _size_)] \
+ CC_RESTORE_VLA_WARNINGS
+#endif
+
+#define ccrsa_pub_ctx_size(_nbytes_) (sizeof(struct cczp) + CCN_UNIT_SIZE + 3 * (ccn_sizeof_size(_nbytes_)))
+#define ccrsa_priv_ctx_size(_nbytes_) ((sizeof(struct cczp) + CCN_UNIT_SIZE) * 2 + 7 * ccn_sizeof(ccn_bitsof_size(_nbytes_) / 2 + 1))
+#define ccrsa_full_ctx_size(_nbytes_) (ccrsa_pub_ctx_size(_nbytes_) + ccn_sizeof_size(_nbytes_) + ccrsa_priv_ctx_size(_nbytes_))
+
+#define ccrsa_full_ctx_decl(_nbytes_, _name_) cc_ctx_decl(struct ccrsa_full_ctx, ccrsa_full_ctx_size(_nbytes_), _name_)
+
+enum {
+ CCERR_OK = 0
+};
+
+struct ccrng_state {
+ int (*CC_SPTR(ccrng_state, generate))(struct ccrng_state *rng, size_t outlen, void *out);
+};
+struct ccrng_state *ccrng(int *error);
+
+static inline ccrsa_pub_ctx_t ccrsa_ctx_public(ccrsa_full_ctx_t fk)
+{
+ return (ccrsa_pub_ctx_t) fk;
+}
+
+size_t ccrsa_pubkeylength(ccrsa_pub_ctx_t pubk);
+size_t ccder_encode_rsa_pub_size(const ccrsa_pub_ctx_t key);
+uint8_t *ccder_encode_rsa_pub(const ccrsa_pub_ctx_t key, uint8_t *der, uint8_t *der_end);
+int ccrsa_generate_key(size_t nbits, ccrsa_full_ctx_t fk, size_t e_nbytes, const void *e_bytes, struct ccrng_state *);
+
+extern const struct ccrsabssa_ciphersuite ccrsabssa_ciphersuite_rsa4096_sha384;
+int ccrsabssa_sign_blinded_message(
+ const struct ccrsabssa_ciphersuite *,
+ const ccrsa_full_ctx_t key,
+ const uint8_t * blinded_message, const size_t blinded_message_nbytes,
+ uint8_t *signature, const size_t signature_nbytes,
+ struct ccrng_state *blinding_rng);
+
+#endif
+
+}
Modified: trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm (278779 => 278780)
--- trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Tools/TestWebKitAPI/Tests/WebCore/cocoa/PrivateClickMeasurementCocoa.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -28,16 +28,11 @@
#if HAVE(RSA_BSSA)
-#include <Security/SecKeyPriv.h>
+#include "CoreCryptoSPI.h"
+
#include <WebCore/PrivateClickMeasurement.h>
+#include <wtf/spi/cocoa/SecuritySPI.h>
-extern "C" {
-#include <corecrypto/cc_priv.h>
-#include <corecrypto/ccrng.h>
-#include <corecrypto/ccrsa.h>
-#include <corecrypto/ccrsabssa.h>
-}
-
using namespace WebCore;
namespace TestWebKitAPI {
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm (278779 => 278780)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm 2021-06-11 20:36:45 UTC (rev 278779)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/EventAttribution.mm 2021-06-11 20:44:21 UTC (rev 278780)
@@ -37,16 +37,12 @@
#if HAVE(RSA_BSSA)
+#include "CoreCryptoSPI.h"
+
#include <Security/SecKeyPriv.h>
#include <WebCore/PrivateClickMeasurement.h>
+#include <wtf/spi/cocoa/SecuritySPI.h>
-extern "C" {
-#include <corecrypto/cc_priv.h>
-#include <corecrypto/ccrng.h>
-#include <corecrypto/ccrsa.h>
-#include <corecrypto/ccrsabssa.h>
-}
-
#endif // HAVE(RSA_BSSA)
@interface MockEventAttribution : NSObject