Title: [285243] branches/safari-612.3.3.1-branch/Source
Revision
285243
Author
repst...@apple.com
Date
2021-11-03 16:53:45 -0700 (Wed, 03 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.3.3.1-branch/Source/WTF/ChangeLog (285242 => 285243)


--- branches/safari-612.3.3.1-branch/Source/WTF/ChangeLog	2021-11-03 23:50:14 UTC (rev 285242)
+++ branches/safari-612.3.3.1-branch/Source/WTF/ChangeLog	2021-11-03 23:53:45 UTC (rev 285243)
@@ -1,3 +1,47 @@
+2021-11-03  Russell Epstein  <repst...@apple.com>
+
+        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  <jer.no...@apple.com>
+
+            [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-02  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r283732. rdar://problem/84944569

Modified: branches/safari-612.3.3.1-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml (285242 => 285243)


--- branches/safari-612.3.3.1-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-11-03 23:50:14 UTC (rev 285242)
+++ branches/safari-612.3.3.1-branch/Source/WTF/Scripts/Preferences/WebPreferencesExperimental.yaml	2021-11-03 23:53:45 UTC (rev 285243)
@@ -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.3.3.1-branch/Source/WebKit/ChangeLog (285242 => 285243)


--- branches/safari-612.3.3.1-branch/Source/WebKit/ChangeLog	2021-11-03 23:50:14 UTC (rev 285242)
+++ branches/safari-612.3.3.1-branch/Source/WebKit/ChangeLog	2021-11-03 23:53:45 UTC (rev 285243)
@@ -1,5 +1,56 @@
 2021-11-03  Russell Epstein  <repst...@apple.com>
 
+        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  <jer.no...@apple.com>
+
+            [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  Russell Epstein  <repst...@apple.com>
+
         Cherry-pick r285177. rdar://problem/84987165
 
     Terminate unresponsive network process by crashing it

Modified: branches/safari-612.3.3.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp (285242 => 285243)


--- branches/safari-612.3.3.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-11-03 23:50:14 UTC (rev 285242)
+++ branches/safari-612.3.3.1-branch/Source/WebKit/Shared/WebPreferencesDefaultValues.cpp	2021-11-03 23:53:45 UTC (rev 285243)
@@ -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
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to