Title: [285241] trunk/Source
Revision
285241
Author
[email protected]
Date
2021-11-03 16:46:18 -0700 (Wed, 03 Nov 2021)

Log Message

[macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
https://bugs.webkit.org/show_bug.cgi?id=232687
<rdar://84990898>

Reviewed by Eric Carlson.

Source/WebKit:

The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
the correct entitlement. However, this value is not passed across the XPC boundary unless it has
been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
in the WebContent process, which is not entitled.

Have the WebContent process check its parent process's entitlement rather than its own when
determining the default value for defaultMediaSessionCoordinatorEnabled().

* Shared/WebPreferencesDefaultValues.cpp:
(WebKit::defaultMediaSessionCoordinatorEnabled):

Source/WTF:

Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.

* Scripts/Preferences/WebPreferencesExperimental.yaml:

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (285240 => 285241)


--- trunk/Source/WTF/ChangeLog	2021-11-03 23:29:26 UTC (rev 285240)
+++ trunk/Source/WTF/ChangeLog	2021-11-03 23:46:18 UTC (rev 285241)
@@ -1,3 +1,15 @@
+2021-11-03  Jer Noble  <[email protected]>
+
+        [macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
+        https://bugs.webkit.org/show_bug.cgi?id=232687
+        <rdar://84990898>
+
+        Reviewed by Eric Carlson.
+
+        Have the MediaSessionPlaylistEnabled preference use the same defaults as MediaSessionCoordinatorEnabled.
+
+        * Scripts/Preferences/WebPreferencesExperimental.yaml:
+
 2021-11-03  Chris Dumez  <[email protected]>
 
         _pasteboardWithName should be thread-safe

Modified: trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (285240 => 285241)


--- trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-11-03 23:29:26 UTC (rev 285240)
+++ trunk/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-11-03 23:46:18 UTC (rev 285241)
@@ -880,9 +880,9 @@
     WebKitLegacy:
       default: false
     WebKit:
-      default: false
+      default: WebKit::defaultMediaSessionCoordinatorEnabled()
     WebCore:
-      default: false
+      default: true
 
 MediaSourceInlinePaintingEnabled:
   type: bool

Modified: trunk/Source/WebKit/ChangeLog (285240 => 285241)


--- trunk/Source/WebKit/ChangeLog	2021-11-03 23:29:26 UTC (rev 285240)
+++ trunk/Source/WebKit/ChangeLog	2021-11-03 23:46:18 UTC (rev 285241)
@@ -1,3 +1,22 @@
+2021-11-03  Jer Noble  <[email protected]>
+
+        [macOS] MediaSession coordinator enabled in UIProcess, disabled in WebContent
+        https://bugs.webkit.org/show_bug.cgi?id=232687
+        <rdar://84990898>
+
+        Reviewed by Eric Carlson.
+
+        The default value of defaultMediaSessionCoordinatorEnabled() will be true if the UIProcess has
+        the correct entitlement. However, this value is not passed across the XPC boundary unless it has
+        been overridden, which means defaultMediaSessionCoordinatorEnabled() will control the setting
+        in the WebContent process, which is not entitled.
+
+        Have the WebContent process check its parent process's entitlement rather than its own when
+        determining the default value for defaultMediaSessionCoordinatorEnabled().
+
+        * Shared/WebPreferencesDefaultValues.cpp:
+        (WebKit::defaultMediaSessionCoordinatorEnabled):
+
 2021-11-03  Tyler Wilcock  <[email protected]>
 
         AX: WKAccessibilityWebPageObjectMac.mm should expose accessibilityChildrenInNavigationOrder and NSAccessibilityChildrenInNavigationOrderAttribute

Modified: trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (285240 => 285241)


--- trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-11-03 23:29:26 UTC (rev 285240)
+++ trunk/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-11-03 23:46:18 UTC (rev 285241)
@@ -36,6 +36,7 @@
 #endif
 
 #if ENABLE(MEDIA_SESSION_COORDINATOR)
+#import "WebProcess.h"
 #import <wtf/cocoa/Entitlements.h>
 #endif
 
@@ -334,7 +335,10 @@
     static dispatch_once_t onceToken;
     static bool enabled { false };
     dispatch_once(&onceToken, ^{
-        enabled = WTF::processHasEntitlement("com.apple.developer.group-session.urlactivity");
+        if (isInWebProcess())
+            enabled = WebProcess::singleton().parentProcessHasEntitlement("com.apple.developer.group-session.urlactivity");
+        else
+            enabled = WTF::processHasEntitlement("com.apple.developer.group-session.urlactivity");
     });
     return enabled;
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to