Title: [288658] trunk/Source/WebKit
- Revision
- 288658
- Author
- [email protected]
- Date
- 2022-01-26 17:04:55 -0800 (Wed, 26 Jan 2022)
Log Message
Symbols not always properly hidden when using WebKitAdditions to introduce new API
https://bugs.webkit.org/show_bug.cgi?id=235674
<rdar://87999257>
Reviewed by Wenson Hsieh.
Surround APIs from WebKitAdditions with `#if ENABLE(API_WEBKIT_ADDITIONS)` instead of
`#if USE(APPLE_INTERNAL_SDK)` and leaving API_WEBKIT_ADDITIONS to be intentionally
undefined. This is because we never want to build the code inside this #if block.
Instead, those blocks are only meant to be replaced by the
replace-webkit-additions-includes.py with the code from WebKitAdditions.
* UIProcess/API/Cocoa/WKWebpagePreferences.h:
* mac/replace-webkit-additions-includes.py:
(main):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (288657 => 288658)
--- trunk/Source/WebKit/ChangeLog 2022-01-27 01:02:34 UTC (rev 288657)
+++ trunk/Source/WebKit/ChangeLog 2022-01-27 01:04:55 UTC (rev 288658)
@@ -1,3 +1,21 @@
+2022-01-26 Chris Dumez <[email protected]>
+
+ Symbols not always properly hidden when using WebKitAdditions to introduce new API
+ https://bugs.webkit.org/show_bug.cgi?id=235674
+ <rdar://87999257>
+
+ Reviewed by Wenson Hsieh.
+
+ Surround APIs from WebKitAdditions with `#if ENABLE(API_WEBKIT_ADDITIONS)` instead of
+ `#if USE(APPLE_INTERNAL_SDK)` and leaving API_WEBKIT_ADDITIONS to be intentionally
+ undefined. This is because we never want to build the code inside this #if block.
+ Instead, those blocks are only meant to be replaced by the
+ replace-webkit-additions-includes.py with the code from WebKitAdditions.
+
+ * UIProcess/API/Cocoa/WKWebpagePreferences.h:
+ * mac/replace-webkit-additions-includes.py:
+ (main):
+
2022-01-26 J Pascoe <[email protected]>
[WebAuthn] We should pass extensions to ASC if possible
Modified: trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h (288657 => 288658)
--- trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h 2022-01-27 01:02:34 UTC (rev 288657)
+++ trunk/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h 2022-01-27 01:04:55 UTC (rev 288658)
@@ -71,7 +71,7 @@
*/
@property (nonatomic) BOOL allowsContentJavaScript WK_API_AVAILABLE(macos(11.0), ios(14.0));
-#if USE(APPLE_INTERNAL_SDK)
+#if ENABLE(API_WEBKIT_ADDITIONS)
#import <WebKitAdditions/WKWebpagePreferencesAdditions.h>
#endif
Modified: trunk/Source/WebKit/mac/replace-webkit-additions-includes.py (288657 => 288658)
--- trunk/Source/WebKit/mac/replace-webkit-additions-includes.py 2022-01-27 01:02:34 UTC (rev 288657)
+++ trunk/Source/WebKit/mac/replace-webkit-additions-includes.py 2022-01-27 01:04:55 UTC (rev 288658)
@@ -88,7 +88,9 @@
# We currently only support WebKitAdditions in Framework headers on macOS 13+ and iOS 16+.
should_do_replacement = is_supported_os()
- additions_import_pattern = re.compile(r"\#if USE\(APPLE_INTERNAL_SDK\)\n#import <WebKitAdditions/(.*)>\n#endif")
+ # API_WEBKIT_ADDITIONS is intentionally not defined anywhere so that we never try to build this code. It is only
+ # meant to be used by this script to identify where to introduce replacement in API headers from WebKitAdditions.
+ additions_import_pattern = re.compile(r"\#if ENABLE\(API_WEBKIT_ADDITIONS\)\n#import <WebKitAdditions/(.*)>\n#endif")
try:
with open(header_path, "r") as header:
header_contents = header.read()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes