WebKit Bugzilla
Attachment 350047 Details for
Bug 188601
: Add script to generate WebContent service resource files and change XPC service main SPI to have it's own header
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
patch (text/plain), 8.73 KB, created by
Alex Christensen
on 2018-09-18 13:52:23 PDT
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2018-09-18 13:52:23 PDT
Size:
8.73 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 236150) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,18 @@ >++2018-08-17 Ben Richards <benton_richards@apple.com> >+ >+ Add script to generate WebContent service resource files and change XPC service main SPI to have it's own header >+ https://bugs.webkit.org/show_bug.cgi?id=188601 >+ >+ Reviewed by Dan Bernstein. >+ >+ Added a script to the process entitlements build phase of the WebContent service that copies resource >+ files to WebKit.framework/PrivateHeaders/CustomWebContentResources. These resource files are to >+ be used by clients who would like to make a custom WebContent service. >+ >+ * Scripts/copy-webcontent-resources-to-private-headers.sh: Added. >+ * WebKit.xcodeproj/project.pbxproj: >+ * WebProcess/API/Cocoa/WKWebProcess.h: Drive-by fix to make this header compileable alone. >+ > 2018-09-18 Ryan Haddad <ryanhaddad@apple.com> > > Unreviewed, rolling out r236138. >Index: Source/WebKit/Scripts/copy-webcontent-resources-to-private-headers.sh >=================================================================== >--- Source/WebKit/Scripts/copy-webcontent-resources-to-private-headers.sh (nonexistent) >+++ Source/WebKit/Scripts/copy-webcontent-resources-to-private-headers.sh (working copy) >@@ -0,0 +1,59 @@ >+#!/bin/sh >+# >+# Copyright (C) 2018 Apple Inc. All rights reserved. >+# >+# Redistribution and use in source and binary forms, with or without >+# modification, are permitted provided that the following conditions >+# are met: >+# 1. Redistributions of source code must retain the above copyright >+# notice, this list of conditions and the following disclaimer. >+# 2. Redistributions in binary form must reproduce the above copyright >+# notice, this list of conditions and the following disclaimer in the >+# documentation and/or other materials provided with the distribution. >+# >+# THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS'' >+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, >+# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >+# PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS >+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF >+# THE POSSIBILITY OF SUCH DAMAGE. >+ >+set -e >+ >+WEB_CONTENT_RESOURCES_PATH="${BUILT_PRODUCTS_DIR}/WebKit.framework/PrivateHeaders/CustomWebContentResources" >+mkdir -p "${WEB_CONTENT_RESOURCES_PATH}" >+ >+if [[ ${WK_PLATFORM_NAME} == "macosx" ]]; then >+ ENTITLEMENTS_FILE="${TEMP_FILE_DIR}/${FULL_PRODUCT_NAME}.xcent" >+else >+ ENTITLEMENTS_FILE="${SRCROOT}/Configurations/WebContent-iOS.entitlements" >+fi >+echo "Copying WebContent entitlements from ${ENTITLEMENTS_FILE} to ${WEB_CONTENT_RESOURCES_PATH}/WebContent.entitlements" >+ditto "${ENTITLEMENTS_FILE}" "${WEB_CONTENT_RESOURCES_PATH}/WebContent.entitlements" >+ >+WEBCONTENT_XIB="${SRCROOT}/Resources/WebContentProcess.xib" >+echo "Copying WebContentProcess.xib from ${WEBCONTENT_XIB} to ${WEB_CONTENT_RESOURCES_PATH}/WebContentProcess.xib" >+ditto "${WEBCONTENT_XIB}" "${WEB_CONTENT_RESOURCES_PATH}/WebContentProcess.xib" >+ >+PROCESSED_INFOPLIST="${BUILT_PRODUCTS_DIR}/${INFOPLIST_PATH}" >+UNPROCESSED_INFOPLIST="${INFOPLIST_FILE}" >+COPIED_INFOPLIST="${WEB_CONTENT_RESOURCES_PATH}/Info-WebContent.plist" >+echo "Copying Info.plist from ${UNPROCESSED_INFOPLIST} to ${COPIED_INFOPLIST}" >+ditto "${UNPROCESSED_INFOPLIST}" "${COPIED_INFOPLIST}" >+ >+echo "Setting fixed entry values for ${COPIED_INFOPLIST}" >+if [[ ${WK_PLATFORM_NAME} == "macosx" ]]; then >+ FIXED_ENTRIES=( ":XPCService:RunLoopType" ) >+else >+ FIXED_ENTRIES=() >+fi >+ >+for ((i = 0; i < ${#FIXED_ENTRIES[@]}; ++i)); do >+ ENTRY_VALUE=$(/usr/libexec/PlistBuddy -c "Print ${FIXED_ENTRIES[$i]}" "${PROCESSED_INFOPLIST}") >+ /usr/libexec/PlistBuddy -c "Set ${FIXED_ENTRIES[$i]} ${ENTRY_VALUE}" "${COPIED_INFOPLIST}" >+done > >Property changes on: Source/WebKit/Scripts/copy-webcontent-resources-to-private-headers.sh >___________________________________________________________________ >Added: svn:executable >## -0,0 +1 ## >+* >\ No newline at end of property >Index: Source/WebKit/WebKit.xcodeproj/project.pbxproj >=================================================================== >--- Source/WebKit/WebKit.xcodeproj/project.pbxproj (revision 236150) >+++ Source/WebKit/WebKit.xcodeproj/project.pbxproj (working copy) >@@ -3024,6 +3024,7 @@ > 414DEDD51F9EDDDF0047C40D /* ServiceWorkerProcessProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ServiceWorkerProcessProxy.h; sourceTree = "<group>"; }; > 414DEDD61F9EDDE00047C40D /* ServiceWorkerProcessProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ServiceWorkerProcessProxy.cpp; sourceTree = "<group>"; }; > 4151E5C31FBB90A900E47E2D /* FormDataReference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormDataReference.h; sourceTree = "<group>"; }; >+ 4157853021276B6F00DD3800 /* copy-webcontent-resources-to-private-headers.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "copy-webcontent-resources-to-private-headers.sh"; sourceTree = "<group>"; }; > 4157E4AF20E2EC9800A6C0D7 /* com.google.o1dbrowserplugin.sb */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = com.google.o1dbrowserplugin.sb; sourceTree = "<group>"; }; > 4188C154211377700012ABCD /* process-network-sandbox-entitlements.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = "process-network-sandbox-entitlements.sh"; sourceTree = "<group>"; }; > 4188C156211377E80012ABCD /* process-webcontent-sandbox-entitlements.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "process-webcontent-sandbox-entitlements.sh"; sourceTree = "<group>"; }; >@@ -8496,6 +8497,7 @@ > children = ( > 7CDE73A21F9DA59700390312 /* PreferencesTemplates */, > 0FC0856E187CE0A900780D86 /* __init__.py */, >+ 4157853021276B6F00DD3800 /* copy-webcontent-resources-to-private-headers.sh */, > C0CE73361247F70E00BC0EC4 /* generate-message-receiver.py */, > C0CE73371247F70E00BC0EC4 /* generate-messages-header.py */, > 7CDE73A11F9DA41400390312 /* GeneratePreferences.rb */, >@@ -9987,6 +9989,7 @@ > BCDC308D15FDB99A006B6695 /* Frameworks */, > BC3DE46415A91763008D26FC /* Resources */, > 7AFCBD5420B8911D00F55C9C /* Process WebContent entitlements */, >+ 4157853721279CC600DD3800 /* Copy Custom WebContent Resources to Framework Private Headers */, > ); > buildRules = ( > ); >@@ -10355,6 +10358,20 @@ > shellPath = /bin/sh; > shellScript = "if [[ \"${WK_MANUAL_SANDBOXING_ENABLED}\" != \"YES\" || \"${WK_PLATFORM_NAME}\" == \"macosx\" || \"${WK_PLATFORM_NAME}\" == \"iosmac\" ]]; then\n exit\nfi\n\nif [[ \"${ACTION}\" == \"build\" || \"${ACTION}\" == \"install\" ]]; then\n for ((i = 0; i < ${SCRIPT_INPUT_FILE_COUNT}; ++i)); do\n eval SANDBOX_PROFILE=\\${SCRIPT_INPUT_FILE_${i}}\n ditto \"${SANDBOX_PROFILE}\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/${SANDBOX_PROFILE##*/}\"\n done\nfi\n"; > }; >+ 4157853721279CC600DD3800 /* Copy Custom WebContent Resources to Framework Private Headers */ = { >+ isa = PBXShellScriptBuildPhase; >+ buildActionMask = 2147483647; >+ inputPaths = ( >+ "$(TEMP_FILE_DIR)/$(FULL_PRODUCT_NAME).xcent", >+ "$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)", >+ "${SRCROOT}/Configurations/WebContent-iOS.entitlements", >+ "$(SRCROOT)/Resources/WebContentProcess.xib", >+ ); >+ name = "Copy Custom WebContent Resources to Framework Private Headers"; >+ runOnlyForDeploymentPostprocessing = 0; >+ shellPath = /bin/sh; >+ shellScript = "Scripts/copy-webcontent-resources-to-private-headers.sh\n"; >+ }; > 41D0FC7F20E43B0B00076AE8 /* Remove stale entitlements file */ = { > isa = PBXShellScriptBuildPhase; > buildActionMask = 2147483647; >Index: Source/WebKit/WebProcess/API/Cocoa/WKWebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/API/Cocoa/WKWebProcess.h (revision 236150) >+++ Source/WebKit/WebProcess/API/Cocoa/WKWebProcess.h (working copy) >@@ -25,6 +25,7 @@ > > #pragma once > >+#include <WebKit/WKBase.h> > #include <WebKit/WKFoundation.h> > > #ifdef __cplusplus
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 188601
:
347162
|
347166
|
347178
|
347228
|
347285
|
347297
|
347371
|
347405
|
347418
|
349958
|
350038
| 350047