Title: [285308] branches/safari-612-branch/Source
Revision
285308
Author
[email protected]
Date
2021-11-04 14:19:07 -0700 (Thu, 04 Nov 2021)

Log Message

Cherry-pick r285241. rdar://problem/84990898

    [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:

    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285241 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Modified Paths

Diff

Modified: branches/safari-612-branch/Source/WTF/ChangeLog (285307 => 285308)


--- branches/safari-612-branch/Source/WTF/ChangeLog	2021-11-04 21:07:00 UTC (rev 285307)
+++ branches/safari-612-branch/Source/WTF/ChangeLog	2021-11-04 21:19:07 UTC (rev 285308)
@@ -1,5 +1,49 @@
 2021-11-04  Russell Epstein  <[email protected]>
 
+        Cherry-pick r285241. rdar://problem/84990898
+
+    [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:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-04  Russell Epstein  <[email protected]>
+
         Cherry-pick r282704. rdar://problem/83067708
 
     Build fix: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter

Modified: branches/safari-612-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (285307 => 285308)


--- branches/safari-612-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-11-04 21:07:00 UTC (rev 285307)
+++ branches/safari-612-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-11-04 21:19:07 UTC (rev 285308)
@@ -780,9 +780,9 @@
     WebKitLegacy:
       default: false
     WebKit:
-      default: false
+      default: WebKit::defaultMediaSessionCoordinatorEnabled()
     WebCore:
-      default: false
+      default: true
 
 ModelElementEnabled:
   type: bool

Modified: branches/safari-612-branch/Source/WebKit/ChangeLog (285307 => 285308)


--- branches/safari-612-branch/Source/WebKit/ChangeLog	2021-11-04 21:07:00 UTC (rev 285307)
+++ branches/safari-612-branch/Source/WebKit/ChangeLog	2021-11-04 21:19:07 UTC (rev 285308)
@@ -1,5 +1,56 @@
 2021-11-04  Russell Epstein  <[email protected]>
 
+        Cherry-pick r285241. rdar://problem/84990898
+
+    [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:
+    
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285241 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    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-04  Russell Epstein  <[email protected]>
+
         Cherry-pick r282849. rdar://problem/83067708
 
     Follow-up: WebKit::WebProcessPool should use a weak observer with CFNotificationCenter

Modified: branches/safari-612-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (285307 => 285308)


--- branches/safari-612-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-11-04 21:07:00 UTC (rev 285307)
+++ branches/safari-612-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-11-04 21:19:07 UTC (rev 285308)
@@ -36,6 +36,7 @@
 #endif
 
 #if ENABLE(MEDIA_SESSION_COORDINATOR)
+#import "WebProcess.h"
 #import <wtf/cocoa/Entitlements.h>
 #endif
 
@@ -323,7 +324,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