Skip to content

Commit

Permalink
Add WebKitAdditions extension point for WKWebViewConfiguration
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=274322
rdar://126585881

Reviewed by Tim Horton and Megan Gardner.

* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
* Source/WebKit/mac/replace-webkit-additions-includes.py:

Canonical link: https://commits.webkit.org/278928@main
  • Loading branch information
pxlcoder committed May 17, 2024
1 parent 46b6141 commit 6c7e02d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.h
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ on the system setting.
*/
- (nullable id <WKURLSchemeHandler>)urlSchemeHandlerForURLScheme:(NSString *)urlScheme WK_API_AVAILABLE(macos(10.13), ios(11.0));

#if 0 // API_WEBKIT_ADDITIONS_REPLACEMENT
#import <WebKitAdditions/WKWebViewConfigurationAdditions.h>
#endif

@end

#if TARGET_OS_IPHONE
Expand Down
4 changes: 4 additions & 0 deletions Source/WebKit/UIProcess/API/Cocoa/WKWebViewConfiguration.mm
Original file line number Diff line number Diff line change
Expand Up @@ -599,6 +599,10 @@ - (void)setLimitsNavigationsToAppBoundDomains:(BOOL)limitsToAppBoundDomains
}
#endif

#if USE(APPLE_INTERNAL_SDK)
#import <WebKitAdditions/WKWebViewConfigurationAdditions.mm>
#endif

#pragma mark WKObject protocol implementation

- (API::Object&)_apiObject
Expand Down
2 changes: 1 addition & 1 deletion Source/WebKit/mac/replace-webkit-additions-includes.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@


# Enable this if `FeatureNeededForHeaderReplacement` should be taken into account.
should_restrict_header_replacement_based_on_feature = False
should_restrict_header_replacement_based_on_feature = True


def read_content_from_webkit_additions(built_products_directory, sdk_root_directory, filename):
Expand Down

0 comments on commit 6c7e02d

Please sign in to comment.