Title: [106375] trunk/Source/WebKit2
- Revision
- 106375
- Author
- [email protected]
- Date
- 2012-01-31 11:58:07 -0800 (Tue, 31 Jan 2012)
Log Message
PluginProcess should be able to use remote open and save panels
https://bugs.webkit.org/show_bug.cgi?id=77461
<rdar://problem/10783615>
Reviewed by Mark Rowe.
* PluginProcess/mac/PluginProcess.entitlements: Added.
* PluginProcess/mac/add-entitlements.sh: Added.
* WebKit2.xcodeproj/project.pbxproj:
Add appropriate entitlement, plus ad hoc binary signing for it to work.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (106374 => 106375)
--- trunk/Source/WebKit2/ChangeLog 2012-01-31 19:50:58 UTC (rev 106374)
+++ trunk/Source/WebKit2/ChangeLog 2012-01-31 19:58:07 UTC (rev 106375)
@@ -1,3 +1,16 @@
+2012-01-31 Alexey Proskuryakov <[email protected]>
+
+ PluginProcess should be able to use remote open and save panels
+ https://bugs.webkit.org/show_bug.cgi?id=77461
+ <rdar://problem/10783615>
+
+ Reviewed by Mark Rowe.
+
+ * PluginProcess/mac/PluginProcess.entitlements: Added.
+ * PluginProcess/mac/add-entitlements.sh: Added.
+ * WebKit2.xcodeproj/project.pbxproj:
+ Add appropriate entitlement, plus ad hoc binary signing for it to work.
+
2012-01-31 Allan Sandfeld Jensen <[email protected]>
Ensure tiles are repainted when scrolling using mouse wheel.
Added: trunk/Source/WebKit2/PluginProcess/mac/PluginProcess.entitlements (0 => 106375)
--- trunk/Source/WebKit2/PluginProcess/mac/PluginProcess.entitlements (rev 0)
+++ trunk/Source/WebKit2/PluginProcess/mac/PluginProcess.entitlements 2012-01-31 19:58:07 UTC (rev 106375)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>com.apple.security.files.user-selected.read-write</key>
+ <true/>
+</dict>
+</plist>
Added: trunk/Source/WebKit2/PluginProcess/mac/add-entitlements.sh (0 => 106375)
--- trunk/Source/WebKit2/PluginProcess/mac/add-entitlements.sh (rev 0)
+++ trunk/Source/WebKit2/PluginProcess/mac/add-entitlements.sh 2012-01-31 19:58:07 UTC (rev 106375)
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# This script is needed because adding entitlements through Xcode configuration doesn't get dependencies right in some cases, <rdar://problem/10783446>.
+
+app_path="${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}"
+app_binary_path="${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}"
+entitlement_file=PluginProcess/mac/PluginProcess.entitlements
+
+if [[ ${CONFIGURATION} == "Production" ]]; then
+ exit
+fi
+
+osx_version=$(sw_vers -productVersion | cut -d. -f 2)
+if (( ${osx_version} <= 6 )); then
+ exit
+fi
+
+needs_signing=0
+
+# If the signature is invalid (e.g. due to updated resources), we need to re-sign it.
+codesign --verify "${app_path}" 2> /dev/null
+if [[ $? != 0 ]]; then
+ needs_signing=1
+else
+ # If the entitlements file is newer than the binary, we need to re-sign the app.
+ if [[ "${entitlement_file}" -nt "${app_binary_path}" ]]; then
+ needs_signing=1
+ fi
+fi
+
+if [[ $needs_signing == 0 ]]; then
+ exit
+fi
+
+codesign -f -s - --entitlements "${entitlement_file}" "${app_path}"
Property changes on: trunk/Source/WebKit2/PluginProcess/mac/add-entitlements.sh
___________________________________________________________________
Added: svn:executable
Added: svn:eol-style
Modified: trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj (106374 => 106375)
--- trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-01-31 19:50:58 UTC (rev 106374)
+++ trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj 2012-01-31 19:58:07 UTC (rev 106375)
@@ -1924,6 +1924,8 @@
E133FD891423DD7F00FC7BFB /* WebKit.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = WebKit.icns; path = WebProcess/mac/WebKit.icns; sourceTree = "<group>"; };
E134F01512EA5D11004EC58D /* WKPrintingView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKPrintingView.h; sourceTree = "<group>"; };
E134F01912EA5D99004EC58D /* WKPrintingView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WKPrintingView.mm; sourceTree = "<group>"; };
+ E14E99F814D879B4001D221F /* PluginProcess.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PluginProcess.entitlements; sourceTree = "<group>"; };
+ E14E99F914D879C9001D221F /* add-entitlements.sh */ = {isa = PBXFileReference; lastKnownFileType = text.script.sh; path = "add-entitlements.sh"; sourceTree = "<group>"; };
E179FD9B134D38060015B883 /* ArgumentCodersMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ArgumentCodersMac.h; sourceTree = "<group>"; };
E179FD9E134D38250015B883 /* ArgumentCodersMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ArgumentCodersMac.mm; sourceTree = "<group>"; };
E18C92F312DB9E7100CF2AEB /* PrintInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PrintInfo.cpp; sourceTree = "<group>"; };
@@ -2112,10 +2114,12 @@
isa = PBXGroup;
children = (
1A2D91A51281D739001EB962 /* PluginControllerProxyMac.mm */,
+ E14E99F814D879B4001D221F /* PluginProcess.entitlements */,
1AA4792212A59FD9008236C3 /* PluginProcessMac.mm */,
1A0EC802124BD41E007EF4A5 /* PluginProcessMainMac.mm */,
1AC25F8912A48E0300BD2671 /* PluginProcessShim.h */,
1AC25F8A12A48E0300BD2671 /* PluginProcessShim.mm */,
+ E14E99F914D879C9001D221F /* add-entitlements.sh */,
);
path = mac;
sourceTree = "<group>";
@@ -4219,6 +4223,7 @@
BCDE093813272496001259FB /* Resources */,
BCDE093A13272496001259FB /* Sources */,
BCDE093C13272496001259FB /* Copy Plug-in Process Shim */,
+ E14E99FA14D879DB001D221F /* Add Entitlements */,
);
buildRules = (
);
@@ -4396,6 +4401,21 @@
shellPath = /bin/sh;
shellScript = "mkdir -p \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\"\ncd \"${BUILT_PRODUCTS_DIR}/DerivedSources/WebKit2\"\n\nexport WebKit2=\"${SRCROOT}\"\n\nif [ \"${ACTION}\" = \"build\" -o \"${ACTION}\" = \"install\" -o \"${ACTION}\" = \"installhdrs\" ]; then\n make --no-builtin-rules -f \"${WebKit2}/DerivedSources.make\" -j `/usr/sbin/sysctl -n hw.availcpu`\nfi\n";
};
+ E14E99FA14D879DB001D221F /* Add Entitlements */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Add Entitlements";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "PluginProcess/mac/add-entitlements.sh";
+ showEnvVarsInLog = 0;
+ };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes