Title: [290078] branches/safari-614.1.3-branch/Source
Revision
290078
Author
kocsen_ch...@apple.com
Date
2022-02-17 14:54:03 -0800 (Thu, 17 Feb 2022)

Log Message

Cherry-pick r290076. rdar://problem/89076606

    [Cocoa] Make AVFoundationSPI.h robust against changes in system headers
    https://bugs.webkit.org/show_bug.cgi?id=236787

    Reviewed by Eric Carlson.

    Source/WebCore/PAL:

    Only re-declare classes and add categories for non-Apple Internal builds, or when those
    definitions would be missing from system headers. The presence of the classes and their
    methods are already checked at runtime, so this is a build-only change.

    * pal/spi/cocoa/AVFoundationSPI.h:

    Source/WTF:

    * wtf/PlatformHave.h:

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

Modified Paths

Diff

Modified: branches/safari-614.1.3-branch/Source/WTF/ChangeLog (290077 => 290078)


--- branches/safari-614.1.3-branch/Source/WTF/ChangeLog	2022-02-17 22:53:52 UTC (rev 290077)
+++ branches/safari-614.1.3-branch/Source/WTF/ChangeLog	2022-02-17 22:54:03 UTC (rev 290078)
@@ -1,3 +1,35 @@
+2022-02-17  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r290076. rdar://problem/89076606
+
+    [Cocoa] Make AVFoundationSPI.h robust against changes in system headers
+    https://bugs.webkit.org/show_bug.cgi?id=236787
+    
+    Reviewed by Eric Carlson.
+    
+    Source/WebCore/PAL:
+    
+    Only re-declare classes and add categories for non-Apple Internal builds, or when those
+    definitions would be missing from system headers. The presence of the classes and their
+    methods are already checked at runtime, so this is a build-only change.
+    
+    * pal/spi/cocoa/AVFoundationSPI.h:
+    
+    Source/WTF:
+    
+    * wtf/PlatformHave.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-17  Jer Noble  <jer.no...@apple.com>
+
+            [Cocoa] Make AVFoundationSPI.h robust against changes in system headers
+            https://bugs.webkit.org/show_bug.cgi?id=236787
+
+            Reviewed by Eric Carlson.
+
+            * wtf/PlatformHave.h:
+
 2022-02-14  Russell Epstein  <repst...@apple.com>
 
         Cherry-pick r289592. rdar://problem/88323950

Modified: branches/safari-614.1.3-branch/Source/WTF/wtf/PlatformHave.h (290077 => 290078)


--- branches/safari-614.1.3-branch/Source/WTF/wtf/PlatformHave.h	2022-02-17 22:53:52 UTC (rev 290077)
+++ branches/safari-614.1.3-branch/Source/WTF/wtf/PlatformHave.h	2022-02-17 22:54:03 UTC (rev 290078)
@@ -388,6 +388,18 @@
 #define HAVE_AVCONTENTKEYSESSION 1
 #endif
 
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101504) \
+    || (((PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 130400) \
+    || (PLATFORM(WATCHOS) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __WATCH_OS_VERSION_MAX_ALLOWED >= 60400) \
+    || (PLATFORM(APPLETV) && !PLATFORM(IOS_FAMILY_SIMULATOR) && __TV_OS_VERSION_MAX_ALLOWED >= 130400)
+#define HAVE_AVCONTENTKEYREPORTGROUP 1
+#endif
+
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 110000) \
+    || (((PLATFORM(IOS) && !PLATFORM(IOS_FAMILY_SIMULATOR)) || PLATFORM(MACCATALYST)) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 140000)
+#define HAVE_AVCONTENTKEYSESSIONWILLOUTPUTBEOBSCURED 1
+#endif
+
 #if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(MACCATALYST)
 #define HAVE_SEC_KEY_PROXY 1
 #endif

Modified: branches/safari-614.1.3-branch/Source/WebCore/PAL/ChangeLog (290077 => 290078)


--- branches/safari-614.1.3-branch/Source/WebCore/PAL/ChangeLog	2022-02-17 22:53:52 UTC (rev 290077)
+++ branches/safari-614.1.3-branch/Source/WebCore/PAL/ChangeLog	2022-02-17 22:54:03 UTC (rev 290078)
@@ -1,3 +1,39 @@
+2022-02-17  Alan Coon  <alanc...@apple.com>
+
+        Cherry-pick r290076. rdar://problem/89076606
+
+    [Cocoa] Make AVFoundationSPI.h robust against changes in system headers
+    https://bugs.webkit.org/show_bug.cgi?id=236787
+    
+    Reviewed by Eric Carlson.
+    
+    Source/WebCore/PAL:
+    
+    Only re-declare classes and add categories for non-Apple Internal builds, or when those
+    definitions would be missing from system headers. The presence of the classes and their
+    methods are already checked at runtime, so this is a build-only change.
+    
+    * pal/spi/cocoa/AVFoundationSPI.h:
+    
+    Source/WTF:
+    
+    * wtf/PlatformHave.h:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@290076 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2022-02-17  Jer Noble  <jer.no...@apple.com>
+
+            [Cocoa] Make AVFoundationSPI.h robust against changes in system headers
+            https://bugs.webkit.org/show_bug.cgi?id=236787
+
+            Reviewed by Eric Carlson.
+
+            Only re-declare classes and add categories for non-Apple Internal builds, or when those
+            definitions would be missing from system headers. The presence of the classes and their
+            methods are already checked at runtime, so this is a build-only change.
+
+            * pal/spi/cocoa/AVFoundationSPI.h:
+
 2022-02-02  Alex Christensen  <achristen...@webkit.org>
 
         Use private relay for all subresources if the main document main resource was loaded using private relay

Modified: branches/safari-614.1.3-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h (290077 => 290078)


--- branches/safari-614.1.3-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h	2022-02-17 22:53:52 UTC (rev 290077)
+++ branches/safari-614.1.3-branch/Source/WebCore/PAL/pal/spi/cocoa/AVFoundationSPI.h	2022-02-17 22:54:03 UTC (rev 290078)
@@ -37,6 +37,7 @@
 
 #import <AVFoundation/AVAssetCache_Private.h>
 #import <AVFoundation/AVCaptureSession_Private.h>
+#import <AVFoundation/AVContentKeySession_Private.h>
 #import <AVFoundation/AVMediaSelectionGroup_Private.h>
 #import <AVFoundation/AVOutputContext_Private.h>
 #import <AVFoundation/AVOutputDevice.h>
@@ -224,6 +225,8 @@
 #import <AVFoundation/AVPlayerLayer.h>
 
 #if HAVE(AVCONTENTKEYSESSION)
+
+#if !USE(APPLE_INTERNAL_SDK) || !HAVE(AVCONTENTKEYREPORTGROUP)
 @interface AVContentKeyReportGroup : NSObject
 @property (readonly, nullable) NSData *contentProtectionSessionIdentifier;
 - (void)expire;
@@ -235,14 +238,17 @@
 @property (readonly, nullable) AVContentKeyReportGroup *defaultContentKeyGroup;
 - (nonnull AVContentKeyReportGroup *)makeContentKeyGroup;
 @end
+#endif
 
+#if !USE(APPLE_INTERNAL_SDK) || !HAVE(AVCONTENTKEYSESSIONWILLOUTPUTBEOBSCURED)
 @interface AVContentKeyRequest (OutputObscured)
 NS_ASSUME_NONNULL_BEGIN
 - (BOOL)willOutputBeObscuredDueToInsufficientExternalProtectionForDisplays:(NSArray<NSNumber *> *)displays;
 NS_ASSUME_NONNULL_END
 @end
+#endif
 
-#if HAVE(AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS)
+#if !USE(APPLE_INTERNAL_SDK) || !HAVE(AVCONTENTKEYREQUEST_PENDING_PROTECTION_STATUS)
 typedef NS_ENUM(NSInteger, AVExternalContentProtectionStatus) {
     AVExternalContentProtectionStatusPending      = 0,
     AVExternalContentProtectionStatusSufficient   = 1,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to