8000 Update additional TBD availability versions for macOS 13 and iOS 16 · WebKit/WebKit@a202ced · GitHub
[go: up one dir, main page]

Skip to content

Commit a202ced

Browse files
committed
Update additional TBD availability versions for macOS 13 and iOS 16
https://bugs.webkit.org/show_bug.cgi?id=251135 Reviewed by Jonathan Bedard and Alexey Proskuryakov. Replace some TBD macros with the (now official) SDK versions they first appeared in. * Source/WebKit/UIProcess/API/Cocoa/WKNavigationActionPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h: * Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h: Change the wk_api_available style check to only consider the *major* version number of an availability macro. This prevents us from having to update webkitpy's VersionNameMap for every software update we want to declare API/SPI for, though it of course means that someone could accidentally declare an availiability version for an unreleased update. * Tools/Scripts/webkitpy/style/checkers/cpp.py: (check_arguments_for_wk_api_available.max_major_version_for_platform): (check_arguments_for_wk_api_available.check_version_string): (check_arguments_for_wk_api_available.max_version_for_platform): Deleted. Canonical link: https://commits.webkit.org/259406@main
1 parent 9838d68 commit a202ced

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

Source/WebKit/UIProcess/API/Cocoa/WKNavigationActionPrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ typedef NS_ENUM(NSInteger, WKSyntheticClickType) {
6161

6262
@property (nonatomic, readonly) BOOL _isRedirect WK_API_AVAILABLE(macos(10.13), ios(11.0));
6363
@property (nonatomic, readonly) WKNavigation *_mainFrameNavigation WK_API_AVAILABLE(macos(10.14.4), ios(12.2));
64-
- (void)_storeSKAdNetworkAttribution WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
64+
- (void)_storeSKAdNetworkAttribution WK_API_AVAILABLE(macos(13.0), ios(16.1));
6565

6666
@property (nonatomic, readonly) _WKHitTestResult *_hitTestResult WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
6767

Source/WebKit/UIProcess/API/Cocoa/WKUIDelegatePrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ struct UIEdgeInsets;
202202
- (void)_webView:(WKWebView *)webView requestPermissionForXRSessionOrigin:(NSString *)originString mode:(_WKXRSessionMode)mode grantedFeatures:(_WKXRSessionFeatureFlags)grantedFeatures consentRequiredFeatures:(_WKXRSessionFeatureFlags)consentRequiredFeatures consentOptionalFeatures:(_WKXRSessionFeatureFlags)consentOptionalFeatures completionHandler:(void (^)(_WKXRSessionFeatureFlags))completionHandler WK_API_AVAILABLE(macos(13.0), ios(16.0));
203203
- (void)_webView:(WKWebView *)webView startXRSessionWithCompletionHandler:(void (^)(id))completionHandler WK_API_AVAILABLE(macos(12.0), ios(15.0));
204204
- (void)_webView:(WKWebView *)webView requestNotificationPermissionForSecurityOrigin:(WKSecurityOrigin *)securityOrigin decisionHandler:(void (^)(BOOL))decisionHandler WK_API_AVAILABLE(macos(10.13.4), ios(16.0));
205-
- (void)_webViewEndXRSession:(WKWebView *)webView WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
205+
- (void)_webViewEndXRSession:(WKWebView *)webView WK_API_AVAILABLE(macos(13.0), ios(16.0));
206206

207207
- (void)_webView:(WKWebView *)webView requestCookieConsentWithMoreInfoHandler:(void (^)(void))moreInfoHandler decisionHandler:(void (^)(BOOL))decisionHandler WK_API_AVAILABLE(macos(13.0), ios(16.0));
208208

Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ typedef NS_ENUM(NSUInteger, _WKContentSecurityPolicyModeForExtension) {
9393

9494
@property (nonatomic, readonly) WKWebsiteDataStore *_websiteDataStoreIfExists WK_API_AVAILABLE(macos(10.15.4), ios(13.4));
9595
@property (nonatomic, copy, setter=_setCORSDisablingPatterns:) NSArray<NSString *> *_corsDisablingPatterns WK_API_AVAILABLE(macos(10.15.4), ios(13.4));
96-
@property (nonatomic, copy, setter=_setMaskedURLSchemes:) NSSet<NSString *> *_maskedURLSchemes WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
96+
@property (nonatomic, copy, setter=_setMaskedURLSchemes:) NSSet<NSString *> *_maskedURLSchemes WK_API_AVAILABLE(macos(13.0), ios(16.0));
9797
@property (nonatomic, setter=_setDeferrableUserScriptsShouldWaitUntilNotification:) BOOL _deferrableUserScriptsShouldWaitUntilNotification WK_API_AVAILABLE(macos(11.0), ios(14.0));
9898
@property (nonatomic, setter=_setCrossOriginAccessControlCheckEnabled:) BOOL _crossOriginAccessControlCheckEnabled WK_API_AVAILABLE(macos(11.0), ios(14.0));
9999

Source/WebKit/UIProcess/API/Cocoa/WKWebViewPrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ for this property.
193193
*/
194194
@property (nonatomic, readonly) BOOL _negotiatedLegacyTLS WK_API_AVAILABLE(macos(10.15.4), ios(13.4));
195195

196-
@property (nonatomic, readonly) BOOL _wasPrivateRelayed WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
196+
@property (nonatomic, readonly) BOOL _wasPrivateRelayed WK_API_AVAILABLE(macos(13.1), ios(16.2));
197197

198198
- (void)_frames:(void (^)(_WKFrameTreeNode *))completionHandler WK_API_AVAILABLE(macos(11.0), ios(14.0));
199199

Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferencesPrivate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ typedef NS_OPTIONS(NSUInteger, _WKWebsiteNetworkConnectionIntegrityPolicy) {
110110
@property (nonatomic, setter=_setModalContainerObservationPolicy:) _WKWebsiteModalContainerObservationPolicy _modalContainerObservationPolicy WK_API_AVAILABLE(macos(13.0), ios(16.0));
111111

112112
@property (nonatomic, setter=_setCaptivePortalModeEnabled:) BOOL _captivePortalModeEnabled WK_API_AVAILABLE(macos(13.0), ios(16.0));
113-
@property (nonatomic, setter=_setAllowPrivacyProxy:) BOOL _allowPrivacyProxy WK_API_AVAILABLE(macos(WK_MAC_TBA), ios(WK_IOS_TBA));
113+
@property (nonatomic, setter=_setAllowPrivacyProxy:) BOOL _allowPrivacyProxy WK_API_AVAILABLE(macos(13.1), ios(16.2));
114114

115115
@property (nonatomic, setter=_setColorSchemePreference:) _WKWebsiteColorSchemePreference _colorSchemePreference;
116116

Tools/Scripts/webkitpy/style/checkers/cpp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3351,8 +3351,8 @@ def check_arguments_for_wk_api_available(clean_lines, line_number, error):
33513351
"""
33523352

33533353
@memoized
3354-
def max_version_for_platform(platform_name):
3355-
return VersionNameMap.map().max_public_version(platform=platform_name)
3354+
def max_major_version_for_platform(platform_name):
3355+
return VersionNameMap.map().max_public_version(platform=platform_name).major
33563356

33573357
def check_version_string(version_string, platform_name):
33583358
mapping = {
@@ -3374,9 +3374,9 @@ def check_version_string(version_string, platform_name):
33743374
error(line_number, 'build/wk_api_available', 5, '%s(%s) is invalid; version number should have one decimal' % (platform_name, version_string))
33753375
return
33763376

3377-
max_version = max_version_for_platform(platform_name)
3378-
if version > max_version:
3379-
error(line_number, 'build/wk_api_available', 5, '%s(%s) is invalid; version number should not exceed %s' % (platform_name, version_string, max_version))
3377+
max_major_version = max_major_version_for_platform(platform_name)
3378+
if version.major > max_major_version:
3379+
error(line_number, 'build/wk_api_available', 5, '%s(%s) is invalid; major version number should not exceed %d' % (platform_name, version_string, max_major_version))
33803380
return
33813381

33823382
line = clean_lines.elided[line_number] # Get rid of comments and strings.

0 commit comments

Comments
 (0)
0