Fix build
authorandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 03:32:03 +0000 (03:32 +0000)
committerandersca@apple.com <andersca@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 3 Jun 2016 03:32:03 +0000 (03:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=158337
rdar://problem/26429419

Reviewed by Dan Bernstein.

* WebCore.xcodeproj/project.pbxproj:
Add QTKitSPI.h header.

* platform/graphics/mac/MediaPlayerPrivateQTKit.h:
* platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
* platform/graphics/mac/MediaTimeQTKit.h:
* platform/graphics/mac/MediaTimeQTKit.mm:
* platform/mac/WebVideoFullscreenController.mm:
Include QTKitSPI.h.

* platform/spi/cocoa/QuartzCoreSPI.h:
* platform/spi/mac/AVFoundationSPI.h:
Use MAX_ALLOWED instead of MIN_REQUIRED.

* platform/spi/mac/QTKitSPI.h:
Add new QTKit header.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.h
Source/WebCore/platform/graphics/mac/MediaPlayerPrivateQTKit.mm
Source/WebCore/platform/graphics/mac/MediaTimeQTKit.h
Source/WebCore/platform/graphics/mac/MediaTimeQTKit.mm
Source/WebCore/platform/mac/WebVideoFullscreenController.mm
Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h
Source/WebCore/platform/spi/mac/AVFoundationSPI.h
Source/WebCore/platform/spi/mac/QTKitSPI.h [new file with mode: 0644]

index 9a16a16..708b679 100644 (file)
@@ -1,3 +1,28 @@
+2016-06-02  Anders Carlsson  <andersca@apple.com>
+
+        Fix build
+        https://bugs.webkit.org/show_bug.cgi?id=158337
+        rdar://problem/26429419
+
+        Reviewed by Dan Bernstein.
+
+        * WebCore.xcodeproj/project.pbxproj:
+        Add QTKitSPI.h header.
+
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.h:
+        * platform/graphics/mac/MediaPlayerPrivateQTKit.mm:
+        * platform/graphics/mac/MediaTimeQTKit.h:
+        * platform/graphics/mac/MediaTimeQTKit.mm:
+        * platform/mac/WebVideoFullscreenController.mm:
+        Include QTKitSPI.h.
+
+        * platform/spi/cocoa/QuartzCoreSPI.h:
+        * platform/spi/mac/AVFoundationSPI.h:
+        Use MAX_ALLOWED instead of MIN_REQUIRED.
+
+        * platform/spi/mac/QTKitSPI.h:
+        Add new QTKit header.
+
 2016-06-02  Said Abou-Hallawa  <sabouhallawa@apple,com>
 
         [iOS] PDFDocumentImage should not create a cached image larger than 4M pixels
index b411b63..095872d 100644 (file)
                1A927FD01416A15B003A83C8 /* npruntime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = npruntime.h; sourceTree = "<group>"; };
                1A927FD11416A15B003A83C8 /* nptypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nptypes.h; sourceTree = "<group>"; };
                1A98956A0AA78F80005EF5EF /* URLCF.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = URLCF.cpp; sourceTree = "<group>"; };
+               1AA6BC4F1CF4F695003F6396 /* QTKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QTKitSPI.h; sourceTree = "<group>"; };
                1AA84F02143BA7BD0051D153 /* ScrollController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ScrollController.mm; sourceTree = "<group>"; };
                1AA84F03143BA7BD0051D153 /* ScrollController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollController.h; sourceTree = "<group>"; };
                1AA8798F11CBE846003C664F /* PluginStrategy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PluginStrategy.h; sourceTree = "<group>"; };
                                2D77AC281BF2B9860072470A /* NSTextFinderSPI.h */,
                                2D77AC2C1BF2B9A00072470A /* NSViewSPI.h */,
                                2D0CF8161BCF5DE1007A4937 /* NSWindowSPI.h */,
+                               1AA6BC4F1CF4F695003F6396 /* QTKitSPI.h */,
                                937F4CCB1A2D48C100BB39F5 /* QuickLookMacSPI.h */,
                                2D232BFF1A326EF9006BF2DB /* TUCallSPI.h */,
                        );
index 59a3da6..cfd6e2b 100644 (file)
@@ -34,7 +34,7 @@
 #include <wtf/RetainPtr.h>
 
 #ifdef __OBJC__
-#import <QTKit/QTTime.h>
+#import "QTKitSPI.h"
 #else
 class QTTime;
 #endif
index 9b6180a..5c36ba2 100644 (file)
 #import "MediaTimeQTKit.h"
 #import "PlatformLayer.h"
 #import "PlatformTimeRanges.h"
+#import "QTKitSPI.h"
 #import "SecurityOrigin.h"
 #import "SoftLinking.h"
 #import "WebCoreSystemInterface.h"
-#import <QTKit/QTKit.h>
 #import <objc/runtime.h>
 #import <wtf/BlockObjCExceptions.h>
 #import <wtf/NeverDestroyed.h>
index 527c1fb..c2a6143 100644 (file)
@@ -28,8 +28,8 @@
 
 #if PLATFORM(MAC) && USE(QTKIT)
 
-#include <QTKit/QTTime.h>
-#include <wtf/MediaTime.h>
+#import "QTKitSPI.h"
+#import <wtf/MediaTime.h>
 
 namespace WebCore {
 
index 34f01fd..de2a6b5 100644 (file)
@@ -29,7 +29,6 @@
 #if PLATFORM(MAC) && USE(QTKIT)
 
 #import "SoftLinking.h"
-#import <QTKit/QTTime.h>
 
 SOFT_LINK_FRAMEWORK(QTKit)
 SOFT_LINK_CONSTANT(QTKit, QTIndefiniteTime, QTTime)
index 04ada37..28017ab 100644 (file)
@@ -39,7 +39,7 @@
 #import <objc/runtime.h>
 
 #if USE(QTKIT)
-#import <QTKit/QTKit.h>
+#import "QTKitSPI.h"
 SOFT_LINK_FRAMEWORK(QTKit)
 SOFT_LINK_CLASS(QTKit, QTMovieLayer)
 SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
index c4704be..08082eb 100644 (file)
@@ -194,10 +194,10 @@ extern NSString * const kCAContextIgnoresHitTest;
 extern NSString * const kCAContentsFormatRGBA10XR;
 #endif
 
-#if (PLATFORM(APPLETV) && __TV_OS_VERSION_MIN_REQUIRED < 100000) \
-    || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MIN_REQUIRED < 30000) \
-    || (PLATFORM(IOS) && TARGET_OS_IOS && __IPHONE_OS_VERSION_MIN_REQUIRED < 100000) \
-    || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED < 101200)
+#if (PLATFORM(APPLETV) && __TV_OS_VERSION_MAX_ALLOWED < 100000) \
+    || (PLATFORM(WATCHOS) && __WATCH_OS_VERSION_MAX_ALLOWED < 30000) \
+    || (PLATFORM(IOS) && TARGET_OS_IOS && __IPHONE_OS_VERSION_MAX_ALLOWED < 100000) \
+    || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED < 101200)
 @protocol CALayerDelegate <NSObject>
 @end
 
index 8f3f10a..664f701 100644 (file)
@@ -58,7 +58,7 @@ NS_ASSUME_NONNULL_END
 #if USE(APPLE_INTERNAL_SDK)
 #import <AVFoundation/AVAssetCache_Private.h>
 #else
-#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 100000)
+#if (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MAX_ALLOWED >= 100000)
 #import <AVFoundation/AVAssetCache.h>
 #else
 @interface AVAssetCache : NSObject
diff --git a/Source/WebCore/platform/spi/mac/QTKitSPI.h b/Source/WebCore/platform/spi/mac/QTKitSPI.h
new file mode 100644 (file)
index 0000000..71789cd
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#if USE(APPLE_INTERNAL_SDK) || __MAC_OS_X_VERSION_MAX_ALLOWED < 101200
+#import <QTKit/QTKit.h>
+#else
+
+enum {
+    kQTTimeIsIndefinite = 1 << 0
+};
+
+typedef struct {
+    long long timeValue;
+    long timeScale;
+    long flags;
+} QTTime;
+
+typedef struct {
+    QTTime time;
+    QTTime duration;
+} QTTimeRange;
+
+typedef enum {
+    QTIncludeCommonTypes = 0,
+} QTMovieFileTypeOptions;
+
+@interface QTMedia : NSObject
+
+- (id)attributeForKey:(NSString *)attributeKey;
+
+@end
+
+@interface QTMovie : NSObject <NSCoding, NSCopying>
+
++ (NSArray *)movieFileTypes:(QTMovieFileTypeOptions)types;
+
+- (id)initWithAttributes:(NSDictionary *)attributes error:(NSError **)errorPtr;
+
+- (void)play;
+- (void)stop;
+
+- (QTTime)duration;
+
+- (QTTime)currentTime;
+- (void)setCurrentTime:(QTTime)time;
+
+- (float)rate;
+- (void)setRate:(float)rate;
+
+- (float)volume;
+- (void)setVolume:(float)volume;
+
+- (NSDictionary *)movieAttributes;
+
+- (id)attributeForKey:(NSString *)attributeKey;
+- (void)setAttribute:(id)value forKey:(NSString *)attributeKey;
+
+- (NSArray *)tracks;
+
+@end
+
+@interface QTMovieLayer : CALayer
+
+- (void)setMovie:(QTMovie *)movie;
+- (QTMovie *)movie;
+
+@end
+
+@interface NSValue (NSValueQTTimeRangeExtensions)
++ (NSValue *)valueWithQTTimeRange:(QTTimeRange)range;
+- (QTTimeRange)QTTimeRangeValue;
+@end
+
+@interface QTTrack : NSObject
+
+- (QTMedia *)media;
+
+- (BOOL)isEnabled;
+- (void)setEnabled:(BOOL)enabled;
+
+- (id)attributeForKey:(NSString *)attributeKey;
+
+@end
+
+#endif