Title: [232643] trunk/Source/WebCore
Revision
232643
Author
[email protected]
Date
2018-06-08 15:29:26 -0700 (Fri, 08 Jun 2018)

Log Message

[Cocoa] Make more of our soft linking ARC-compatible
https://bugs.webkit.org/show_bug.cgi?id=186437

Reviewed by Daniel Bates.

Source/WebCore:

* editing/cocoa/DataDetection.mm:
(WebCore::removeResultLinksFromAnchor): Fix comment referring to unused constant DDURLScheme.

* platform/cocoa/DataDetectorsCoreSoftLink.h: Removed unused DDURLScheme.
* platform/cocoa/DataDetectorsCoreSoftLink.mm: Ditto.

* platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
Use SOFT_LINK_CONSTANT_MAY_FAIL for NSString constants instead of using
SOFT_LINK_POINTER_OPTIONAL. Required moving iOS-specific items inside the
#if PLATFORM(IOS) section.
(WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use the
canLoad functions instead of checking for null to handle possibly-missing string constants.
(WebCore::metadataType): Ditto.

* platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Removed unused
AVMediaTypeVideo, AVMediaTypeAudio, and AVMediaTypeText soft linking.

* platform/ios/QuickLook.mm:
(WebCore::isQuickLookPreviewURL): Removed unneeded assertion.

* platform/ios/QuickLookSoftLink.h: Removed unneeded QLPreviousScheme, which was used only
for an assertion, one we can do without.
* platform/ios/QuickLookSoftLink.mm: Ditto.

* platform/mediastream/mac/AVVideoCaptureSource.mm: Removed unused soft linking of
AVCaptureVideoPreviewLayer class and AVCaptureSessionPresetLow string constant. Use
SOFT_LINK_CONSTANT_MAY_FAIL for NSString constants instead of using
SOFT_LINK_POINTER_OPTIONAL.
(WebCore::AVVideoCaptureSource::initializeCapabilities): Use the canLoad functions
instead of checking for null to handle possibly-missing string constants.
(WebCore::sizeForPreset): Ditto.
(WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions const): Ditto.

Source/WebCore/PAL:

* pal/spi/cocoa/DataDetectorsCoreSPI.h: Removed unused DDURLScheme.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (232642 => 232643)


--- trunk/Source/WebCore/ChangeLog	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/ChangeLog	2018-06-08 22:29:26 UTC (rev 232643)
@@ -1,3 +1,43 @@
+2018-06-08  Darin Adler  <[email protected]>
+
+        [Cocoa] Make more of our soft linking ARC-compatible
+        https://bugs.webkit.org/show_bug.cgi?id=186437
+
+        Reviewed by Daniel Bates.
+
+        * editing/cocoa/DataDetection.mm:
+        (WebCore::removeResultLinksFromAnchor): Fix comment referring to unused constant DDURLScheme.
+
+        * platform/cocoa/DataDetectorsCoreSoftLink.h: Removed unused DDURLScheme.
+        * platform/cocoa/DataDetectorsCoreSoftLink.mm: Ditto.
+
+        * platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm:
+        Use SOFT_LINK_CONSTANT_MAY_FAIL for NSString constants instead of using
+        SOFT_LINK_POINTER_OPTIONAL. Required moving iOS-specific items inside the
+        #if PLATFORM(IOS) section.
+        (WebCore::MediaPlayerPrivateAVFoundationObjC::createAVAssetForURL): Use the
+        canLoad functions instead of checking for null to handle possibly-missing string constants.
+        (WebCore::metadataType): Ditto.
+
+        * platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm: Removed unused
+        AVMediaTypeVideo, AVMediaTypeAudio, and AVMediaTypeText soft linking.
+
+        * platform/ios/QuickLook.mm:
+        (WebCore::isQuickLookPreviewURL): Removed unneeded assertion.
+
+        * platform/ios/QuickLookSoftLink.h: Removed unneeded QLPreviousScheme, which was used only
+        for an assertion, one we can do without.
+        * platform/ios/QuickLookSoftLink.mm: Ditto.
+
+        * platform/mediastream/mac/AVVideoCaptureSource.mm: Removed unused soft linking of
+        AVCaptureVideoPreviewLayer class and AVCaptureSessionPresetLow string constant. Use
+        SOFT_LINK_CONSTANT_MAY_FAIL for NSString constants instead of using
+        SOFT_LINK_POINTER_OPTIONAL.
+        (WebCore::AVVideoCaptureSource::initializeCapabilities): Use the canLoad functions
+        instead of checking for null to handle possibly-missing string constants.
+        (WebCore::sizeForPreset): Ditto.
+        (WebCore::AVVideoCaptureSource::bestSessionPresetForVideoDimensions const): Ditto.
+
 2018-06-08  Aditya Keerthi  <[email protected]>
 
         [Datalist] Allow TextFieldInputType to show and hide suggestions

Modified: trunk/Source/WebCore/PAL/ChangeLog (232642 => 232643)


--- trunk/Source/WebCore/PAL/ChangeLog	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/PAL/ChangeLog	2018-06-08 22:29:26 UTC (rev 232643)
@@ -1,3 +1,12 @@
+2018-06-08  Darin Adler  <[email protected]>
+
+        [Cocoa] Make more of our soft linking ARC-compatible
+        https://bugs.webkit.org/show_bug.cgi?id=186437
+
+        Reviewed by Daniel Bates.
+
+        * pal/spi/cocoa/DataDetectorsCoreSPI.h: Removed unused DDURLScheme.
+
 2018-06-08  Jonathan Bedard  <[email protected]>
 
         [Mojave] Enable build

Modified: trunk/Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h (232642 => 232643)


--- trunk/Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/PAL/pal/spi/cocoa/DataDetectorsCoreSPI.h	2018-06-08 22:29:26 UTC (rev 232643)
@@ -95,7 +95,6 @@
 extern CFStringRef const DDBinderFlightInformationKey;
 extern CFStringRef const DDBinderParsecSourceKey;
 extern CFStringRef const DDBinderSignatureBlockKey;
-extern NSString * const DDURLScheme;
 
 @interface DDScannerResult : NSObject <NSCoding, NSSecureCoding>
 + (NSArray *)resultsFromCoreResults:(CFArrayRef)coreResults;

Modified: trunk/Source/WebCore/editing/cocoa/DataDetection.mm (232642 => 232643)


--- trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/editing/cocoa/DataDetection.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -249,7 +249,7 @@
 
 static void removeResultLinksFromAnchor(Element& element)
 {
-    // Perform a depth-first search for anchor nodes, which have the DDURLScheme attribute set to true,
+    // Perform a depth-first search for anchor nodes, which have the data detectors attribute set to true,
     // take their children and insert them before the anchor, and then remove the anchor.
 
     // Note that this is not using ElementChildIterator because we potentially prepend children as we iterate over them.

Modified: trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h (232642 => 232643)


--- trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.h	2018-06-08 22:29:26 UTC (rev 232643)
@@ -62,7 +62,6 @@
 SOFT_LINK_POINTER_FOR_HEADER(WebCore, DataDetectorsCore, DDBinderTrackingNumberKey, CFStringRef)
 SOFT_LINK_POINTER_FOR_HEADER(WebCore, DataDetectorsCore, DDBinderFlightInformationKey, CFStringRef)
 SOFT_LINK_POINTER_FOR_HEADER(WebCore, DataDetectorsCore, DDBinderSignatureBlockKey, CFStringRef)
-SOFT_LINK_POINTER_FOR_HEADER(WebCore, DataDetectorsCore, DDURLScheme, NSString *)
 SOFT_LINK_CONSTANT_FOR_HEADER(WebCore, DataDetectorsCore, DDScannerCopyResultsOptionsForPassiveUse, DDScannerCopyResultsOptions)
 
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, DataDetectorsCore, DDScannerEnableOptionalSource, void, (DDScannerRef scanner, DDScannerSource source, Boolean enable), (scanner, source, enable))

Modified: trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm (232642 => 232643)


--- trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/cocoa/DataDetectorsCoreSoftLink.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -60,7 +60,6 @@
 SOFT_LINK_POINTER_FOR_SOURCE(WebCore, DataDetectorsCore, DDBinderTrackingNumberKey, CFStringRef)
 SOFT_LINK_POINTER_FOR_SOURCE(WebCore, DataDetectorsCore, DDBinderFlightInformationKey, CFStringRef)
 SOFT_LINK_POINTER_FOR_SOURCE(WebCore, DataDetectorsCore, DDBinderSignatureBlockKey, CFStringRef)
-SOFT_LINK_POINTER_FOR_SOURCE(WebCore, DataDetectorsCore, DDURLScheme, NSString *)
 SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, DataDetectorsCore, DDScannerCopyResultsOptionsForPassiveUse, DDScannerCopyResultsOptions)
 
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, DataDetectorsCore, DDScannerEnableOptionalSource, void, (DDScannerRef scanner, DDScannerSource source, Boolean enable), (scanner, source, enable))

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm (232642 => 232643)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/MediaPlayerPrivateAVFoundationObjC.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2011-2017 Apple Inc. All rights reserved.
+ * Copyright (C) 2011-2018 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -182,10 +182,8 @@
 SOFT_LINK_CONSTANT(AVFoundation, AVLayerVideoGravityResize, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVStreamingKeyDeliveryContentKeyType, NSString *)
 
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVURLAssetClientBundleIdentifierKey, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVURLAssetRequiresCustomURLLoadingKey, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVURLAssetOutOfBandMIMETypeKey, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVURLAssetUseClientURLLoadingExclusively, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVURLAssetOutOfBandMIMETypeKey, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVURLAssetUseClientURLLoadingExclusively, NSString *)
 
 #define AVPlayer initAVPlayer()
 #define AVPlayerItem initAVPlayerItem()
@@ -206,8 +204,6 @@
 #define AVMediaTypeMetadata getAVMediaTypeMetadata()
 #define AVPlayerItemDidPlayToEndTimeNotification getAVPlayerItemDidPlayToEndTimeNotification()
 #define AVURLAssetInheritURIQueryComponentFromReferencingURIKey getAVURLAssetInheritURIQueryComponentFromReferencingURIKey()
-#define AVURLAssetClientBundleIdentifierKey getAVURLAssetClientBundleIdentifierKey()
-#define AVURLAssetRequiresCustomURLLoadingKey getAVURLAssetRequiresCustomURLLoadingKey()
 #define AVURLAssetOutOfBandMIMETypeKey getAVURLAssetOutOfBandMIMETypeKey()
 #define AVURLAssetUseClientURLLoadingExclusively getAVURLAssetUseClientURLLoadingExclusively()
 #define AVAssetImageGeneratorApertureModeCleanAperture getAVAssetImageGeneratorApertureModeCleanAperture()
@@ -218,6 +214,7 @@
 #define AVStreamingKeyDeliveryContentKeyType getAVStreamingKeyDeliveryContentKeyType()
 
 #if HAVE(AVFOUNDATION_MEDIA_SELECTION_GROUP)
+
 typedef AVMediaSelectionGroup AVMediaSelectionGroupType;
 typedef AVMediaSelectionOption AVMediaSelectionOptionType;
 
@@ -238,9 +235,11 @@
 #define AVMediaTypeSubtitle getAVMediaTypeSubtitle()
 #define AVMediaCharacteristicContainsOnlyForcedSubtitles getAVMediaCharacteristicContainsOnlyForcedSubtitles()
 #define AVPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly getAVPlayerItemLegibleOutputTextStylingResolutionSourceAndRulesOnly()
+
 #endif
 
 #if ENABLE(AVF_CAPTIONS)
+
 SOFT_LINK_CONSTANT(AVFoundation, AVURLAssetCacheKey, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVURLAssetOutOfBandAlternateTracksKey, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVURLAssetUsesNoPersistentCacheKey, NSString *)
@@ -253,9 +252,7 @@
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicDescribesMusicAndSoundForAccessibility, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicTranscribesSpokenDialogForAccessibility, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicIsAuxiliaryContent, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVURLAssetHTTPCookiesKey, NSString*)
 
-#define AVURLAssetHTTPCookiesKey getAVURLAssetHTTPCookiesKey()
 #define AVURLAssetOutOfBandAlternateTracksKey getAVURLAssetOutOfBandAlternateTracksKey()
 #define AVURLAssetCacheKey getAVURLAssetCacheKey()
 #define AVURLAssetUsesNoPersistentCacheKey getAVURLAssetUsesNoPersistentCacheKey()
@@ -268,11 +265,13 @@
 #define AVMediaCharacteristicDescribesMusicAndSoundForAccessibility getAVMediaCharacteristicDescribesMusicAndSoundForAccessibility()
 #define AVMediaCharacteristicTranscribesSpokenDialogForAccessibility getAVMediaCharacteristicTranscribesSpokenDialogForAccessibility()
 #define AVMediaCharacteristicIsAuxiliaryContent getAVMediaCharacteristicIsAuxiliaryContent()
+
 #endif
 
 #if ENABLE(DATACUE_VALUE)
+
 SOFT_LINK_CONSTANT(AVFoundation, AVMetadataKeySpaceQuickTimeUserData, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVMetadataKeySpaceISOUserData, NSString*)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVMetadataKeySpaceISOUserData, NSString*)
 SOFT_LINK_CONSTANT(AVFoundation, AVMetadataKeySpaceQuickTimeMetadata, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVMetadataKeySpaceiTunes, NSString *)
 SOFT_LINK_CONSTANT(AVFoundation, AVMetadataKeySpaceID3, NSString *)
@@ -282,11 +281,21 @@
 #define AVMetadataKeySpaceQuickTimeMetadata getAVMetadataKeySpaceQuickTimeMetadata()
 #define AVMetadataKeySpaceiTunes getAVMetadataKeySpaceiTunes()
 #define AVMetadataKeySpaceID3 getAVMetadataKeySpaceID3()
+
 #endif
 
 #if PLATFORM(IOS)
+
 SOFT_LINK_CONSTANT(AVFoundation, AVURLAssetBoundNetworkInterfaceName, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVURLAssetClientBundleIdentifierKey, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVURLAssetHTTPCookiesKey, NSString*)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVURLAssetRequiresCustomURLLoadingKey, NSString *)
+
 #define AVURLAssetBoundNetworkInterfaceName getAVURLAssetBoundNetworkInterfaceName()
+#define AVURLAssetClientBundleIdentifierKey getAVURLAssetClientBundleIdentifierKey()
+#define AVURLAssetHTTPCookiesKey getAVURLAssetHTTPCookiesKey()
+#define AVURLAssetRequiresCustomURLLoadingKey getAVURLAssetRequiresCustomURLLoadingKey()
+
 #endif
 
 SOFT_LINK_FRAMEWORK(MediaToolbox)
@@ -293,7 +302,9 @@
 SOFT_LINK_OPTIONAL(MediaToolbox, MTEnableCaption2015Behavior, Boolean, (), ())
 
 #if PLATFORM(IOS)
+
 #if HAVE(CELESTIAL)
+
 SOFT_LINK_PRIVATE_FRAMEWORK(Celestial)
 SOFT_LINK_CONSTANT(Celestial, AVController_RouteDescriptionKey_RouteCurrentlyPicked, NSString *)
 SOFT_LINK_CONSTANT(Celestial, AVController_RouteDescriptionKey_RouteName, NSString *)
@@ -301,11 +312,13 @@
 #define AVController_RouteDescriptionKey_RouteCurrentlyPicked getAVController_RouteDescriptionKey_RouteCurrentlyPicked()
 #define AVController_RouteDescriptionKey_RouteName getAVController_RouteDescriptionKey_RouteName()
 #define AVController_RouteDescriptionKey_AVAudioRouteName getAVController_RouteDescriptionKey_AVAudioRouteName()
+
 #endif // HAVE(CELESTIAL)
 
 SOFT_LINK_FRAMEWORK(UIKit)
 SOFT_LINK_CLASS(UIKit, UIDevice)
 #define UIDevice getUIDeviceClass()
+
 #endif // PLATFORM(IOS)
 
 using namespace WebCore;
@@ -881,19 +894,19 @@
     if (player()->doesHaveAttribute("x-itunes-inherit-uri-query-component"))
         [options.get() setObject:@YES forKey: AVURLAssetInheritURIQueryComponentFromReferencingURIKey];
 
-    if (AVURLAssetUseClientURLLoadingExclusively)
+    if (canLoadAVURLAssetUseClientURLLoadingExclusively())
         [options setObject:@YES forKey:AVURLAssetUseClientURLLoadingExclusively];
 #if PLATFORM(IOS)
-    else if (AVURLAssetRequiresCustomURLLoadingKey)
+    else if (canLoadAVURLAssetRequiresCustomURLLoadingKey())
         [options setObject:@YES forKey:AVURLAssetRequiresCustomURLLoadingKey];
     // FIXME: rdar://problem/20354688
     String identifier = player()->sourceApplicationIdentifier();
-    if (!identifier.isEmpty() && AVURLAssetClientBundleIdentifierKey)
+    if (!identifier.isEmpty() && canLoadAVURLAssetClientBundleIdentifierKey())
         [options setObject:identifier forKey:AVURLAssetClientBundleIdentifierKey];
 #endif
 
     auto type = player()->contentMIMEType();
-    if (AVURLAssetOutOfBandMIMETypeKey && !type.isEmpty() && !player()->contentMIMETypeWasInferredFromExtension()) {
+    if (canLoadAVURLAssetOutOfBandMIMETypeKey() && !type.isEmpty() && !player()->contentMIMETypeWasInferredFromExtension()) {
         auto codecs = player()->contentTypeCodecs();
         if (!codecs.isEmpty()) {
             NSString *typeString = [NSString stringWithFormat:@"%@; codecs=\"%@\"", (NSString *)type, (NSString *)codecs];
@@ -938,7 +951,7 @@
         for (auto& cookie : cookies)
             [nsCookies addObject:toNSHTTPCookie(cookie)];
 
-        if (AVURLAssetHTTPCookiesKey)
+        if (canLoadAVURLAssetHTTPCookiesKey())
             [options setObject:nsCookies.get() forKey:AVURLAssetHTTPCookiesKey];
     }
 #endif
@@ -3072,7 +3085,7 @@
 
     if ([avMetadataKeySpace isEqualToString:AVMetadataKeySpaceQuickTimeUserData])
         return quickTimeUserData;
-    if (AVMetadataKeySpaceISOUserData && [avMetadataKeySpace isEqualToString:AVMetadataKeySpaceISOUserData])
+    if (canLoadAVMetadataKeySpaceISOUserData() && [avMetadataKeySpace isEqualToString:AVMetadataKeySpaceISOUserData])
         return isoUserData;
     if ([avMetadataKeySpace isEqualToString:AVMetadataKeySpaceQuickTimeMetadata])
         return quickTimeMetadata;

Modified: trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm (232642 => 232643)


--- trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -76,10 +76,6 @@
 SOFT_LINK_CLASS(AVFoundation, AVSampleBufferDisplayLayer)
 SOFT_LINK_CLASS(AVFoundation, AVStreamSession)
 
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVMediaTypeVideo, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVMediaTypeAudio, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVMediaTypeText, NSString *)
-
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicVisual, NSString*)
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicAudible, NSString*)
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaCharacteristicLegible, NSString*)
@@ -86,9 +82,6 @@
 SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotification, NSString*)
 SOFT_LINK_CONSTANT(AVFoundation, AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey, NSString*)
 
-#define AVMediaTypeVideo getAVMediaTypeVideo()
-#define AVMediaTypeAudio getAVMediaTypeAudio()
-#define AVMediaTypeText getAVMediaTypeText()
 #define AVSampleBufferDisplayLayerFailedToDecodeNotification getAVSampleBufferDisplayLayerFailedToDecodeNotification()
 #define AVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey getAVSampleBufferDisplayLayerFailedToDecodeNotificationErrorKey()
 

Modified: trunk/Source/WebCore/platform/ios/QuickLook.mm (232642 => 232643)


--- trunk/Source/WebCore/platform/ios/QuickLook.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/ios/QuickLook.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -100,7 +100,6 @@
 
 bool isQuickLookPreviewURL(const URL& url)
 {
-    ASSERT([QLPreviewScheme isEqualToString:@(QLPreviewProtocol)]);
     return url.protocolIs(QLPreviewProtocol);
 }
 

Modified: trunk/Source/WebCore/platform/ios/QuickLookSoftLink.h (232642 => 232643)


--- trunk/Source/WebCore/platform/ios/QuickLookSoftLink.h	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/ios/QuickLookSoftLink.h	2018-06-08 22:29:26 UTC (rev 232643)
@@ -38,7 +38,4 @@
 SOFT_LINK_FUNCTION_FOR_HEADER(WebCore, QuickLook, QLTypeCopyUTIForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType))
 #define QLTypeCopyUTIForURLAndMimeType softLink_QuickLook_QLTypeCopyUTIForURLAndMimeType
 
-SOFT_LINK_POINTER_FOR_HEADER(WebCore, QuickLook, QLPreviewScheme, NSString *)
-#define QLPreviewScheme get_QuickLook_QLPreviewScheme()
-
 #endif // USE(QUICK_LOOK)

Modified: trunk/Source/WebCore/platform/ios/QuickLookSoftLink.mm (232642 => 232643)


--- trunk/Source/WebCore/platform/ios/QuickLookSoftLink.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/ios/QuickLookSoftLink.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -36,6 +36,6 @@
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, QuickLook, QLTypeCopyBestMimeTypeForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType))
 SOFT_LINK_FUNCTION_FOR_SOURCE(WebCore, QuickLook, QLTypeCopyUTIForURLAndMimeType, NSString *, (NSURL *url, NSString *mimeType), (url, mimeType))
 
-SOFT_LINK_POINTER_FOR_SOURCE(WebCore, QuickLook, QLPreviewScheme, NSString *)
+SOFT_LINK_CONSTANT_FOR_SOURCE(WebCore, QuickLook, QLPreviewScheme, NSString *)
 
 #endif // USE(QUICK_LOOK)

Modified: trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm (232642 => 232643)


--- trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2018-06-08 22:11:32 UTC (rev 232642)
+++ trunk/Source/WebCore/platform/mediastream/mac/AVVideoCaptureSource.mm	2018-06-08 22:29:26 UTC (rev 232643)
@@ -45,7 +45,6 @@
 #import <AVFoundation/AVCaptureInput.h>
 #import <AVFoundation/AVCaptureOutput.h>
 #import <AVFoundation/AVCaptureSession.h>
-#import <AVFoundation/AVCaptureVideoPreviewLayer.h>
 #import <objc/runtime.h>
 
 #if PLATFORM(IOS)
@@ -63,7 +62,6 @@
 typedef AVCaptureOutput AVCaptureOutputType;
 typedef AVCaptureVideoDataOutput AVCaptureVideoDataOutputType;
 typedef AVFrameRateRange AVFrameRateRangeType;
-typedef AVCaptureVideoPreviewLayer AVCaptureVideoPreviewLayerType;
 
 SOFT_LINK_FRAMEWORK_OPTIONAL(AVFoundation)
 
@@ -73,7 +71,6 @@
 SOFT_LINK_CLASS(AVFoundation, AVCaptureDeviceInput)
 SOFT_LINK_CLASS(AVFoundation, AVCaptureOutput)
 SOFT_LINK_CLASS(AVFoundation, AVCaptureVideoDataOutput)
-SOFT_LINK_CLASS(AVFoundation, AVCaptureVideoPreviewLayer)
 SOFT_LINK_CLASS(AVFoundation, AVFrameRateRange)
 
 #define AVCaptureConnection getAVCaptureConnectionClass()
@@ -82,16 +79,14 @@
 #define AVCaptureDeviceInput getAVCaptureDeviceInputClass()
 #define AVCaptureOutput getAVCaptureOutputClass()
 #define AVCaptureVideoDataOutput getAVCaptureVideoDataOutputClass()
-#define AVCaptureVideoPreviewLayer getAVCaptureVideoPreviewLayerClass()
 #define AVFrameRateRange getAVFrameRateRangeClass()
 
 SOFT_LINK_CONSTANT(AVFoundation, AVMediaTypeVideo, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVCaptureSessionPreset1280x720, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVCaptureSessionPreset960x540, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVCaptureSessionPreset640x480, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVCaptureSessionPreset352x288, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVCaptureSessionPreset320x240, NSString *)
-SOFT_LINK_POINTER_OPTIONAL(AVFoundation, AVCaptureSessionPresetLow, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVCaptureSessionPreset1280x720, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVCaptureSessionPreset960x540, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVCaptureSessionPreset640x480, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVCaptureSessionPreset352x288, NSString *)
+SOFT_LINK_CONSTANT_MAY_FAIL(AVFoundation, AVCaptureSessionPreset320x240, NSString *)
 
 #define AVCaptureSessionPreset1280x720 getAVCaptureSessionPreset1280x720()
 #define AVCaptureSessionPreset960x540 getAVCaptureSessionPreset960x540()
@@ -98,7 +93,6 @@
 #define AVCaptureSessionPreset640x480 getAVCaptureSessionPreset640x480()
 #define AVCaptureSessionPreset352x288 getAVCaptureSessionPreset352x288()
 #define AVCaptureSessionPreset320x240 getAVCaptureSessionPreset320x240()
-#define AVCaptureSessionPresetLow getAVCaptureSessionPresetLow()
 
 using namespace WebCore;
 
@@ -175,27 +169,27 @@
             highestFrameRateRange = std::max<Float64>(highestFrameRateRange, range.maxFrameRate);
         }
 
-        if (AVCaptureSessionPreset1280x720 && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset1280x720]) {
+        if (canLoadAVCaptureSessionPreset1280x720() && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset1280x720]) {
             updateSizeMinMax(minimumWidth, maximumWidth, 1280);
             updateSizeMinMax(minimumHeight, maximumHeight, 720);
             updateAspectRatioMinMax(minimumAspectRatio, maximumAspectRatio, 1280.0 / 720);
         }
-        if (AVCaptureSessionPreset960x540 && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset960x540]) {
+        if (canLoadAVCaptureSessionPreset960x540() && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset960x540]) {
             updateSizeMinMax(minimumWidth, maximumWidth, 960);
             updateSizeMinMax(minimumHeight, maximumHeight, 540);
             updateAspectRatioMinMax(minimumAspectRatio, maximumAspectRatio, 960 / 540);
         }
-        if (AVCaptureSessionPreset640x480 && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset640x480]) {
+        if (canLoadAVCaptureSessionPreset640x480() && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset640x480]) {
             updateSizeMinMax(minimumWidth, maximumWidth, 640);
             updateSizeMinMax(minimumHeight, maximumHeight, 480);
             updateAspectRatioMinMax(minimumAspectRatio, maximumAspectRatio, 640 / 480);
         }
-        if (AVCaptureSessionPreset352x288 && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset352x288]) {
+        if (canLoadAVCaptureSessionPreset352x288() && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset352x288]) {
             updateSizeMinMax(minimumWidth, maximumWidth, 352);
             updateSizeMinMax(minimumHeight, maximumHeight, 288);
             updateAspectRatioMinMax(minimumAspectRatio, maximumAspectRatio, 352 / 288);
         }
-        if (AVCaptureSessionPreset320x240 && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset320x240]) {
+        if (canLoadAVCaptureSessionPreset320x240() && [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset320x240]) {
             updateSizeMinMax(minimumWidth, maximumWidth, 320);
             updateSizeMinMax(minimumHeight, maximumHeight, 240);
             updateAspectRatioMinMax(minimumAspectRatio, maximumAspectRatio, 320 / 240);
@@ -252,19 +246,19 @@
     if (!preset)
         return { };
 
-    if (AVCaptureSessionPreset1280x720 && [preset isEqualToString:AVCaptureSessionPreset1280x720])
+    if (canLoadAVCaptureSessionPreset1280x720() && [preset isEqualToString:AVCaptureSessionPreset1280x720])
         return { 1280, 720 };
 
-    if (AVCaptureSessionPreset960x540 && [preset isEqualToString:AVCaptureSessionPreset960x540])
+    if (canLoadAVCaptureSessionPreset960x540() && [preset isEqualToString:AVCaptureSessionPreset960x540])
         return { 960, 540 };
 
-    if (AVCaptureSessionPreset640x480 && [preset isEqualToString:AVCaptureSessionPreset640x480])
+    if (canLoadAVCaptureSessionPreset640x480() && [preset isEqualToString:AVCaptureSessionPreset640x480])
         return { 640, 480 };
 
-    if (AVCaptureSessionPreset352x288 && [preset isEqualToString:AVCaptureSessionPreset352x288])
+    if (canLoadAVCaptureSessionPreset352x288() && [preset isEqualToString:AVCaptureSessionPreset352x288])
         return { 352, 288 };
 
-    if (AVCaptureSessionPreset320x240 && [preset isEqualToString:AVCaptureSessionPreset320x240])
+    if (canLoadAVCaptureSessionPreset320x240() && [preset isEqualToString:AVCaptureSessionPreset320x240])
         return { 320, 240 };
     
     return { };
@@ -518,19 +512,19 @@
         return nil;
 
     AVCaptureDeviceTypedef *videoDevice = device();
-    if ((!width || width.value() == 1280) && (!height || height.value() == 720) && AVCaptureSessionPreset1280x720)
+    if ((!width || width.value() == 1280) && (!height || height.value() == 720) && canLoadAVCaptureSessionPreset1280x720())
         return [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset1280x720] ? AVCaptureSessionPreset1280x720 : nil;
 
-    if ((!width || width.value() == 960) && (!height || height.value() == 540) && AVCaptureSessionPreset960x540)
+    if ((!width || width.value() == 960) && (!height || height.value() == 540) && canLoadAVCaptureSessionPreset960x540())
         return [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset960x540] ? AVCaptureSessionPreset960x540 : nil;
 
-    if ((!width || width.value() == 640) && (!height || height.value() == 480 ) && AVCaptureSessionPreset640x480)
+    if ((!width || width.value() == 640) && (!height || height.value() == 480 ) && canLoadAVCaptureSessionPreset640x480())
         return [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset640x480] ? AVCaptureSessionPreset640x480 : nil;
 
-    if ((!width || width.value() == 352) && (!height || height.value() == 288 ) && AVCaptureSessionPreset352x288)
+    if ((!width || width.value() == 352) && (!height || height.value() == 288 ) && canLoadAVCaptureSessionPreset352x288())
         return [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset352x288] ? AVCaptureSessionPreset352x288 : nil;
 
-    if ((!width || width.value() == 320) && (!height || height.value() == 240 ) && AVCaptureSessionPreset320x240)
+    if ((!width || width.value() == 320) && (!height || height.value() == 240 ) && canLoadAVCaptureSessionPreset320x240())
         return [videoDevice supportsAVCaptureSessionPreset:AVCaptureSessionPreset320x240] ? AVCaptureSessionPreset320x240 : nil;
 
     return nil;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to