Title: [244866] trunk/Source/WebKit
Revision
244866
Author
[email protected]
Date
2019-05-01 21:20:38 -0700 (Wed, 01 May 2019)

Log Message

Add the ability to import WebKitAdditions snippets in WebKit.apinotes
https://bugs.webkit.org/show_bug.cgi?id=197487
<rdar://problem/50389085>

Reviewed by Tim Horton.

* Shared/API/Cocoa/WebKit.apinotes: Import a new WebKitAdditions file.

* WebKit.xcodeproj/project.pbxproj: Check all files in Headers/ and PrivateHeaders/ that need replacement, not
simply anything ending with ".h".

* mac/replace-webkit-additions-includes.py:
(main): Teach the replacement script to handle files in Headers/ or PrivateHeaders/ that don't end in ".h".

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (244865 => 244866)


--- trunk/Source/WebKit/ChangeLog	2019-05-02 03:10:43 UTC (rev 244865)
+++ trunk/Source/WebKit/ChangeLog	2019-05-02 04:20:38 UTC (rev 244866)
@@ -1,3 +1,19 @@
+2019-05-01  Wenson Hsieh  <[email protected]>
+
+        Add the ability to import WebKitAdditions snippets in WebKit.apinotes
+        https://bugs.webkit.org/show_bug.cgi?id=197487
+        <rdar://problem/50389085>
+
+        Reviewed by Tim Horton.
+
+        * Shared/API/Cocoa/WebKit.apinotes: Import a new WebKitAdditions file.
+
+        * WebKit.xcodeproj/project.pbxproj: Check all files in Headers/ and PrivateHeaders/ that need replacement, not
+        simply anything ending with ".h".
+
+        * mac/replace-webkit-additions-includes.py:
+        (main): Teach the replacement script to handle files in Headers/ or PrivateHeaders/ that don't end in ".h".
+
 2019-05-01  Alex Christensen  <[email protected]>
 
         Protect against null crash in fetchDiskCacheEntries

Modified: trunk/Source/WebKit/Shared/API/Cocoa/WebKit.apinotes (244865 => 244866)


--- trunk/Source/WebKit/Shared/API/Cocoa/WebKit.apinotes	2019-05-02 03:10:43 UTC (rev 244865)
+++ trunk/Source/WebKit/Shared/API/Cocoa/WebKit.apinotes	2019-05-02 04:20:38 UTC (rev 244866)
@@ -200,3 +200,6 @@
 Tags:
 - Name: WKErrorCode
   NSErrorDomain: WKErrorDomain
+#if USE(APPLE_INTERNAL_SDK)
+#import <WebKitAdditions/WebKitAdditions.apinotes>
+#endif

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (244865 => 244866)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-05-02 03:10:43 UTC (rev 244865)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2019-05-02 04:20:38 UTC (rev 244866)
@@ -10908,7 +10908,7 @@
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "if [ \"${XCODE_VERSION_MAJOR}\" -ge \"1100\" -a \"${USE_NEW_BUILD_SYSTEM}\" = \"YES\" ]; then\n    # In this configuration, post-processing is performed at the same time as copying in the postprocess-header-rule script, so there's no need for this separate step.\n    exit 0\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    for HEADERS_DIRECTORY in \"${PUBLIC_HEADERS_FOLDER_PATH}\" \"${PRIVATE_HEADERS_FOLDER_PATH}\"; do\n        for HEADER_PATH in \"${TARGET_BUILD_DIR}/${HEADERS_DIRECTORY}/\"*.h; do\n            if [[ ! -z `grep '#import <WebKitAdditions/.*\\.h>' \"${HEADER_PATH}\"` ]]; then\n                python \"${SRCROOT}/mac/replace-webkit-additions-includes.py\" \"
 ${HEADER_PATH}\" \"${BUILT_PRODUCTS_DIR}\" \"${SDKROOT}\" || exit $?\n            fi\n        done\n    done\nfi\n";
+			shellScript = "if [ \"${XCODE_VERSION_MAJOR}\" -ge \"1100\" -a \"${USE_NEW_BUILD_SYSTEM}\" = \"YES\" ]; then\n    # In this configuration, post-processing is performed at the same time as copying in the postprocess-header-rule script, so there's no need for this separate step.\n    exit 0\nfi\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" -o \"${ACTION}\" = \"installapi\" ]; then\n    for HEADERS_DIRECTORY in \"${PUBLIC_HEADERS_FOLDER_PATH}\" \"${PRIVATE_HEADERS_FOLDER_PATH}\"; do\n        for HEADER_PATH in \"${TARGET_BUILD_DIR}/${HEADERS_DIRECTORY}/\"*.*; do\n            if [[ ! -z `grep '#import <WebKitAdditions/.*>' \"${HEADER_PATH}\"` ]]; then\n                python \"${SRCROOT}/mac/replace-webkit-additions-includes.py\" \"${HEA
 DER_PATH}\" \"${BUILT_PRODUCTS_DIR}\" \"${SDKROOT}\" || exit $?\n            fi\n        done\n    done\nfi\n\n\n";
 		};
 /* End PBXShellScriptBuildPhase section */
 

Modified: trunk/Source/WebKit/mac/replace-webkit-additions-includes.py (244865 => 244866)


--- trunk/Source/WebKit/mac/replace-webkit-additions-includes.py	2019-05-02 03:10:43 UTC (rev 244865)
+++ trunk/Source/WebKit/mac/replace-webkit-additions-includes.py	2019-05-02 04:20:38 UTC (rev 244866)
@@ -65,7 +65,7 @@
         print("(%s): SDK root directory unspecified" % argv[0])
         return 1
 
-    additions_import_pattern = re.compile(r"\#if USE\(APPLE_INTERNAL_SDK\)\n#import <WebKitAdditions/(.*\.h)>\n#endif")
+    additions_import_pattern = re.compile(r"\#if USE\(APPLE_INTERNAL_SDK\)\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

Reply via email to