Skip to content

Commit

Permalink
Unreviewed, fix the internal iOS build after 274016@main
Browse files Browse the repository at this point in the history
Avoid redeclarations by only declaring BrowserEngineKit SPI methods and properties when using the
non-internal SDK.

* Source/WebCore/PAL/pal/spi/ios/BrowserEngineKitSPI.h:
* Tools/TestRunnerShared/spi/UIKitSPIForTesting.h:

Canonical link: https://commits.webkit.org/274034@main
  • Loading branch information
whsieh committed Feb 3, 2024
1 parent 802150b commit 3a3309b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
12 changes: 7 additions & 5 deletions Source/WebCore/PAL/pal/spi/ios/BrowserEngineKitSPI.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,7 @@
// Note: SPI usage should be limited to testing purposes and binary compatibility with clients
// of existing WebKit SPI.
#import <BrowserEngineKit/BrowserEngineKit_Private.h>
#endif

@interface BEKeyEntry (Staging_121227027)
@property (nonatomic, readonly) BEKeyPressState state;
@end
#else

@class NSTextAlternatives;
@class UIKeyEvent;
Expand Down Expand Up @@ -69,4 +65,10 @@
- (instancetype)_initWithUIKitTextSuggestion:(UITextSuggestion *)suggestion;
@end

#endif

@interface BEKeyEntry (Staging_121227027)
@property (nonatomic, readonly) BEKeyPressState state;
@end

#endif // USE(BROWSERENGINEKIT)
17 changes: 10 additions & 7 deletions Tools/TestRunnerShared/spi/UIKitSPIForTesting.h
Original file line number Diff line number Diff line change
Expand Up @@ -494,12 +494,16 @@ typedef enum {
- (UIEventButtonMask)_buttonMask;
@end

#endif // USE(APPLE_INTERNAL_SDK)
@interface UIKeyEvent : NSObject
- (instancetype)initWithWebEvent:(WebEvent *)webEvent;
@end

@class UITextInputArrowKeyHistory;
#endif // USE(APPLE_INTERNAL_SDK)

// Start of UIKit IPI

@class UITextInputArrowKeyHistory;

@interface UITextAutofillSuggestion ()
+ (instancetype)autofillSuggestionWithUsername:(NSString *)username password:(NSString *)password;
@end
Expand Down Expand Up @@ -615,11 +619,6 @@ typedef NS_ENUM(NSInteger, NSTextBlockLayer) {
#endif

#if USE(BROWSERENGINEKIT)
@interface UIKeyEvent : NSObject
- (instancetype)initWithWebEvent:(WebEvent *)webEvent;
@property (nonatomic, readonly) WebEvent *webEvent;
@end

// FIXME: Replace this with BEResponderEditActions once that's in the SDK.
@interface UIResponder (Staging_121208689)
- (void)addShortcut:(id)sender;
Expand Down Expand Up @@ -655,4 +654,8 @@ typedef NS_ENUM(NSInteger, NSTextBlockLayer) {
- (UIPressInfo *)_pressInfoForPhysicalKeyboardEvent:(UIPhysicalKeyboardEvent *)physicalKeyboardEvent;
@end

@interface UIKeyEvent (IPI)
@property (nonatomic, readonly) WebEvent *webEvent;
@end

#endif // PLATFORM(IOS_FAMILY)

0 comments on commit 3a3309b

Please sign in to comment.