Title: [288691] branches/safari-614.1.1-branch/Source/WebKit
Revision
288691
Author
repst...@apple.com
Date
2022-01-27 11:59:02 -0800 (Thu, 27 Jan 2022)

Log Message

Cherry-pick r288658. rdar://problem/87999257

    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):

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288658 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-614.1.1-branch/Source/WebKit/ChangeLog (288690 => 288691)


--- branches/safari-614.1.1-branch/Source/WebKit/ChangeLog	2022-01-27 19:55:22 UTC (rev 288690)
+++ branches/safari-614.1.1-branch/Source/WebKit/ChangeLog	2022-01-27 19:59:02 UTC (rev 288691)
@@ -1,3 +1,44 @@
+2022-01-27  Russell Epstein  <repst...@apple.com>
+
+        Cherry-pick r288658. rdar://problem/87999257
+
+    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):
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@288658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-01-26  Chris Dumez  <cdu...@apple.com>
+
+            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-24  Said Abou-Hallawa  <s...@apple.com>
 
         [GPU Process] [Filters] Move FEImage to the 'platform' directory

Modified: branches/safari-614.1.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h (288690 => 288691)


--- branches/safari-614.1.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h	2022-01-27 19:55:22 UTC (rev 288690)
+++ branches/safari-614.1.1-branch/Source/WebKit/UIProcess/API/Cocoa/WKWebpagePreferences.h	2022-01-27 19:59:02 UTC (rev 288691)
@@ -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: branches/safari-614.1.1-branch/Source/WebKit/mac/replace-webkit-additions-includes.py (288690 => 288691)


--- branches/safari-614.1.1-branch/Source/WebKit/mac/replace-webkit-additions-includes.py	2022-01-27 19:55:22 UTC (rev 288690)
+++ branches/safari-614.1.1-branch/Source/WebKit/mac/replace-webkit-additions-includes.py	2022-01-27 19:59:02 UTC (rev 288691)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to