Title: [292654] branches/safari-613-branch/Source/WebKit
- Revision
- 292654
- Author
- alanc...@apple.com
- Date
- 2022-04-08 17:13:42 -0700 (Fri, 08 Apr 2022)
Log Message
Cherry-pick r291821. rdar://problem/89145552
REGRESSION(r286590): Links with URL schemes are not clickable in Mail
https://bugs.webkit.org/show_bug.cgi?id=238262
<rdar://89145552>
Reviewed by Geoffrey Garen.
This feature requires access to the Launch Services daemon in Mail and other apps on iOS.
This patch is a partial revert of r286590.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode const):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/Cocoa/WebProcessPoolCocoa.mm:
(WebKit::nonBrowserServices):
(WebKit::WebProcessPool::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Modified Paths
Diff
Modified: branches/safari-613-branch/Source/WebKit/ChangeLog (292653 => 292654)
--- branches/safari-613-branch/Source/WebKit/ChangeLog 2022-04-09 00:13:38 UTC (rev 292653)
+++ branches/safari-613-branch/Source/WebKit/ChangeLog 2022-04-09 00:13:42 UTC (rev 292654)
@@ -1,3 +1,52 @@
+2022-04-07 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r291821. rdar://problem/89145552
+
+ REGRESSION(r286590): Links with URL schemes are not clickable in Mail
+ https://bugs.webkit.org/show_bug.cgi?id=238262
+ <rdar://89145552>
+
+ Reviewed by Geoffrey Garen.
+
+ This feature requires access to the Launch Services daemon in Mail and other apps on iOS.
+ This patch is a partial revert of r286590.
+
+ * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::encode const):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::nonBrowserServices):
+ (WebKit::WebProcessPool::platformInitializeWebProcess):
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@291821 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-03-24 Per Arne Vollan <pvol...@apple.com>
+
+ REGRESSION(r286590): Links with URL schemes are not clickable in Mail
+ https://bugs.webkit.org/show_bug.cgi?id=238262
+ <rdar://89145552>
+
+ Reviewed by Geoffrey Garen.
+
+ This feature requires access to the Launch Services daemon in Mail and other apps on iOS.
+ This patch is a partial revert of r286590.
+
+ * Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in:
+ * Shared/WebProcessCreationParameters.cpp:
+ (WebKit::WebProcessCreationParameters::encode const):
+ (WebKit::WebProcessCreationParameters::decode):
+ * Shared/WebProcessCreationParameters.h:
+ * UIProcess/Cocoa/WebProcessPoolCocoa.mm:
+ (WebKit::nonBrowserServices):
+ (WebKit::WebProcessPool::platformInitializeWebProcess):
+ * WebProcess/cocoa/WebProcessCocoa.mm:
+ (WebKit::WebProcess::platformInitializeWebProcess):
+
2022-03-31 Alan Coon <alanc...@apple.com>
Apply patch. rdar://problem/90957287
Modified: branches/safari-613-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in (292653 => 292654)
--- branches/safari-613-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in 2022-04-09 00:13:38 UTC (rev 292653)
+++ branches/safari-613-branch/Source/WebKit/Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb.in 2022-04-09 00:13:42 UTC (rev 292654)
@@ -1127,6 +1127,7 @@
(extension "com.apple.webkit.extension.mach")
(global-name
"com.apple.iconservices"
+ "com.apple.lsd.open"
)
)
)
Modified: branches/safari-613-branch/Source/WebKit/Shared/WebProcessCreationParameters.cpp (292653 => 292654)
--- branches/safari-613-branch/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2022-04-09 00:13:38 UTC (rev 292653)
+++ branches/safari-613-branch/Source/WebKit/Shared/WebProcessCreationParameters.cpp 2022-04-09 00:13:42 UTC (rev 292654)
@@ -170,6 +170,7 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ encoder << dynamicMachExtensionHandles;
encoder << dynamicIOKitExtensionHandles;
#endif
@@ -478,6 +479,12 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ std::optional<Vector<SandboxExtension::Handle>> dynamicMachExtensionHandles;
+ decoder >> dynamicMachExtensionHandles;
+ if (!dynamicMachExtensionHandles)
+ return false;
+ parameters.dynamicMachExtensionHandles = WTFMove(*dynamicMachExtensionHandles);
+
std::optional<Vector<SandboxExtension::Handle>> dynamicIOKitExtensionHandles;
decoder >> dynamicIOKitExtensionHandles;
if (!dynamicIOKitExtensionHandles)
Modified: branches/safari-613-branch/Source/WebKit/Shared/WebProcessCreationParameters.h (292653 => 292654)
--- branches/safari-613-branch/Source/WebKit/Shared/WebProcessCreationParameters.h 2022-04-09 00:13:38 UTC (rev 292653)
+++ branches/safari-613-branch/Source/WebKit/Shared/WebProcessCreationParameters.h 2022-04-09 00:13:42 UTC (rev 292654)
@@ -208,6 +208,7 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ Vector<SandboxExtension::Handle> dynamicMachExtensionHandles;
Vector<SandboxExtension::Handle> dynamicIOKitExtensionHandles;
#endif
Modified: branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm (292653 => 292654)
--- branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2022-04-09 00:13:38 UTC (rev 292653)
+++ branches/safari-613-branch/Source/WebKit/UIProcess/Cocoa/WebProcessPoolCocoa.mm 2022-04-09 00:13:42 UTC (rev 292654)
@@ -290,6 +290,17 @@
#endif
}
+#if PLATFORM(IOS_FAMILY)
+static const Vector<ASCIILiteral>& nonBrowserServices()
+{
+ ASSERT(isMainRunLoop());
+ static NeverDestroyed services = Vector<ASCIILiteral> {
+ "com.apple.lsd.open"_s,
+ };
+ return services;
+}
+#endif
+
void WebProcessPool::platformInitializeWebProcess(const WebProcessProxy& process, WebProcessCreationParameters& parameters)
{
parameters.mediaMIMETypes = process.mediaMIMETypes();
@@ -405,6 +416,9 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ if (!isFullWebBrowser())
+ parameters.dynamicMachExtensionHandles = SandboxExtension::createHandlesForMachLookup(nonBrowserServices(), std::nullopt);
+
if (WebCore::deviceHasAGXCompilerService())
parameters.dynamicIOKitExtensionHandles = SandboxExtension::createHandlesForIOKitClassExtensions(WebCore::agxCompilerClasses(), std::nullopt);
#endif
Modified: branches/safari-613-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (292653 => 292654)
--- branches/safari-613-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2022-04-09 00:13:38 UTC (rev 292653)
+++ branches/safari-613-branch/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm 2022-04-09 00:13:42 UTC (rev 292654)
@@ -410,6 +410,7 @@
#endif
#if PLATFORM(IOS_FAMILY)
+ SandboxExtension::consumePermanently(parameters.dynamicMachExtensionHandles);
SandboxExtension::consumePermanently(parameters.dynamicIOKitExtensionHandles);
#endif
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes