diff --git a/Source/WTF/wtf/PlatformHave.h b/Source/WTF/wtf/PlatformHave.h index ec509f0752e2..a17ea24cc8d6 100644 --- a/Source/WTF/wtf/PlatformHave.h +++ b/Source/WTF/wtf/PlatformHave.h @@ -1701,15 +1701,3 @@ && (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400) #define HAVE_MARKETPLACE_KIT 1 #endif - -#if !defined(HAVE_XPC_API) \ - && (PLATFORM(MAC) \ - || ((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400)) -#define HAVE_XPC_API 1 -#endif - -#if !defined(HAVE_BROWSER_ENGINE_SUPPORTING_API) \ - && (((PLATFORM(IOS) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 170400) \ - || (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED >= 170400)) -#define HAVE_BROWSER_ENGINE_SUPPORTING_API 1 -#endif diff --git a/Source/WTF/wtf/spi/cocoa/IOSurfaceSPI.h b/Source/WTF/wtf/spi/cocoa/IOSurfaceSPI.h index 0c7b5af991e4..74586b3d1229 100644 --- a/Source/WTF/wtf/spi/cocoa/IOSurfaceSPI.h +++ b/Source/WTF/wtf/spi/cocoa/IOSurfaceSPI.h @@ -96,7 +96,7 @@ WTF_EXTERN_C_END WTF_EXTERN_C_BEGIN -#if (HAVE(IOSURFACE_SET_OWNERSHIP) || HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY)) && !HAVE(BROWSER_ENGINE_SUPPORTING_API) +#if HAVE(IOSURFACE_SET_OWNERSHIP) || HAVE(IOSURFACE_SET_OWNERSHIP_IDENTITY) typedef CF_ENUM(int, IOSurfaceMemoryLedgerTags) { kIOSurfaceMemoryLedgerTagDefault = 0x00000001, diff --git a/Source/WTF/wtf/spi/darwin/XPCSPI.h b/Source/WTF/wtf/spi/darwin/XPCSPI.h index 8c71dcc83ae9..e68e6e27391c 100644 --- a/Source/WTF/wtf/spi/darwin/XPCSPI.h +++ b/Source/WTF/wtf/spi/darwin/XPCSPI.h @@ -28,7 +28,7 @@ #include #include -#if HAVE(XPC_API) || USE(APPLE_INTERNAL_SDK) +#if PLATFORM(MAC) || USE(APPLE_INTERNAL_SDK) #include #else diff --git a/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h b/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h index d647a7531e93..3b59f857b655 100644 --- a/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h +++ b/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h @@ -247,17 +247,16 @@ NS_ASSUME_NONNULL_END #endif #if HAVE(AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS) -#if !HAVE(BROWSER_ENGINE_SUPPORTING_API) typedef NS_ENUM(NSInteger, AVExternalContentProtectionStatus) { AVExternalContentProtectionStatusPending = 0, AVExternalContentProtectionStatusSufficient = 1, AVExternalContentProtectionStatusInsufficient = 2, }; -#endif + @interface AVContentKeyRequest (AVContentKeyRequest_PendingProtectionStatus) - (AVExternalContentProtectionStatus)externalContentProtectionStatus; @end -#endif // HAVE(AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS) +#endif #if HAVE(AVCONTENTKEYREQUEST_COMPATABILITIY_MODE) NS_ASSUME_NONNULL_BEGIN @@ -384,14 +383,7 @@ NS_ASSUME_NONNULL_END #endif // __has_include() -#if HAVE(BROWSER_ENGINE_SUPPORTING_API) -#import -@interface AVVideoPerformanceMetrics (AVVideoPerformanceMetricsDisplayCompositedVideoFrames) -@property (nonatomic, readonly) unsigned long numberOfDisplayCompositedVideoFrames; -@property (nonatomic, readonly) unsigned long numberOfNonDisplayCompositedVideoFrames; -@property (nonatomic, readonly) double totalFrameDelay; -@end -#else +#if !USE(APPLE_INTERNAL_SDK) @interface AVVideoPerformanceMetrics : NSObject @property (nonatomic, readonly) unsigned long totalNumberOfVideoFrames; @property (nonatomic, readonly) unsigned long numberOfDroppedVideoFrames; @@ -400,7 +392,12 @@ NS_ASSUME_NONNULL_END @property (nonatomic, readonly) unsigned long numberOfNonDisplayCompositedVideoFrames; @property (nonatomic, readonly) double totalFrameDelay; @end -#endif // HAVE(BROWSER_ENGINE_SUPPORTING_API) +#else +@interface AVVideoPerformanceMetrics (AVVideoPerformanceMetricsDisplayCompositedVideoFrames) +@property (nonatomic, readonly) unsigned long numberOfDisplayCompositedVideoFrames; +@property (nonatomic, readonly) unsigned long numberOfNonDisplayCompositedVideoFrames; +@end +#endif #if !USE(APPLE_INTERNAL_SDK) && HAVE(AVAUDIOSESSION) && !PLATFORM(MACCATALYST) #import diff --git a/Source/WebCore/PAL/pal/spi/ios/BrowserEngineKitSPI.h b/Source/WebCore/PAL/pal/spi/ios/BrowserEngineKitSPI.h deleted file mode 100644 index a3532be151d7..000000000000 --- a/Source/WebCore/PAL/pal/spi/ios/BrowserEngineKitSPI.h +++ /dev/null @@ -1,68 +0,0 @@ -/* - * Copyright (C) 2024 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 - -#if USE(BROWSERENGINEKIT) - -#import - -#if USE(APPLE_INTERNAL_SDK) -// Note: SPI usage should be limited to testing purposes and binary compatibility with clients -// of existing WebKit SPI. -#import -#endif - -@class NSTextAlternatives; -@class UIKeyEvent; -@class UITextSuggestion; -@class UIWKDocumentContext; - -@interface BEKeyEntry (ForTesting) -- (UIKeyEvent *)_uikitKeyEvent; -- (instancetype)_initWithUIKitKeyEvent:(UIKeyEvent *)keyEvent; -@end - -@interface BETextAlternatives () -@property (readonly) BOOL isLowConfidence; -- (NSTextAlternatives *)_nsTextAlternative; -- (instancetype)_initWithNSTextAlternatives:(NSTextAlternatives *)nsTextAlternatives; -@end - -@interface BETextDocumentContext () -@property (strong, nonatomic, readonly) UIWKDocumentContext *_uikitDocumentContext; -@property (nonatomic, copy) NSAttributedString *annotatedText; -@end - -@interface BETextDocumentRequest () -@property (nonatomic, assign) CGRect _documentRect; -@end - -@interface BETextSuggestion () -@property (nonatomic, readonly, strong) UITextSuggestion *_uikitTextSuggestion; -- (instancetype)_initWithUIKitTextSuggestion:(UITextSuggestion *)suggestion; -@end - -#endif // USE(BROWSERENGINEKIT) diff --git a/Source/WebKit/Platform/spi/ios/UIKitSPI.h b/Source/WebKit/Platform/spi/ios/UIKitSPI.h index 301d03227dd7..0c2d165d1e16 100644 --- a/Source/WebKit/Platform/spi/ios/UIKitSPI.h +++ b/Source/WebKit/Platform/spi/ios/UIKitSPI.h @@ -443,10 +443,8 @@ typedef struct CGSVGDocument *CGSVGDocumentRef; @property (nonatomic, readonly) UIEdgeInsets _systemContentInset; @property (nonatomic, getter=_allowsAsyncScrollEvent, setter=_setAllowsAsyncScrollEvent:) BOOL _allowsAsyncScrollEvent; @property (nonatomic, getter=_isFirstResponderKeyboardAvoidanceEnabled, setter=_setFirstResponderKeyboardAvoidanceEnabled:) BOOL firstResponderKeyboardAvoidanceEnabled; -#if !HAVE(BROWSER_ENGINE_SUPPORTING_API) @property (nonatomic) BOOL bouncesHorizontally; @property (nonatomic) BOOL bouncesVertically; -#endif @property (nonatomic, setter=_setAllowsParentToBeginHorizontally:) BOOL _allowsParentToBeginHorizontally; @property (nonatomic, setter=_setAllowsParentToBeginVertically:) BOOL _allowsParentToBeginVertically; @property (nonatomic) BOOL tracksImmediatelyWhileDecelerating; diff --git a/Tools/TestRunnerShared/spi/UIKitSPIForTesting.h b/Tools/TestRunnerShared/spi/UIKitSPIForTesting.h index 8abe14b607aa..1d93e1eab47d 100644 --- a/Tools/TestRunnerShared/spi/UIKitSPIForTesting.h +++ b/Tools/TestRunnerShared/spi/UIKitSPIForTesting.h @@ -143,7 +143,6 @@ WTF_EXTERN_C_END @interface UITextSuggestion : NSObject @property (nonatomic, copy) NSString *displayText; -+ (instancetype)textSuggestionWithInputText:(NSString *)inputText; @end @protocol UITextInputTraits_Private @@ -623,8 +622,8 @@ typedef NS_ENUM(NSInteger, NSTextBlockLayer) { @end #endif -#if USE(BROWSERENGINEKIT) -@interface UIKeyEvent : NSObject +#if HAVE(UI_ASYNC_TEXT_INTERACTION) +@interface UIKeyEvent (Internal) - (instancetype)initWithWebEvent:(WebEvent *)webEvent; @property (nonatomic, readonly) WebEvent *webEvent; @end