-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 5cdf58d. rdar://121706323
Cherry-pick 274016@main (98226f6). rdar://problem/121706323 [iOS] Update SPI headers for iOS 17.4 https://bugs.webkit.org/show_bug.cgi?id=268210 rdar://problem/121706323 Reviewed by Jonathan Bedard and Alexey Proskuryakov. Add platform flags for libxpc (which is API as of iOS 17.4+) and for other SPI that were promoted to API as part of the BrowserEngineKit introduction. Use them to avoid redeclaring things that are now publicly available. Additionally, write new BrowserEngineKit SPI declarations for symbols that are used in testing and by SPI clients of WebKit. * Source/WTF/wtf/PlatformHave.h: * Source/WTF/wtf/spi/cocoa/IOSurfaceSPI.h: * Source/WTF/wtf/spi/darwin/XPCSPI.h: * Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h: * Source/WebCore/PAL/pal/spi/ios/BrowserEngineKitSPI.h: * Source/WebKit/Platform/spi/ios/UIKitSPI.h: * Tools/TestRunnerShared/spi/UIKitSPIForTesting.h: Canonical link: https://commits.webkit.org/274016@main Canonical link: https://commits.webkit.org/272448.522@safari-7618-branch Identifier: 272448.530@safari-7618.1.15.12-branch
- Loading branch information
Showing
7 changed files
with
99 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* 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 <BrowserEngineKit/BrowserEngineKit.h> | ||
|
||
#if USE(APPLE_INTERNAL_SDK) | ||
// Note: SPI usage should be limited to testing purposes and binary compatibility with clients | ||
// of existing WebKit SPI. | ||
#import <BrowserEngineKit/BrowserEngineKit_Private.h> | ||
#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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters