Make WebKit for iOS Simulator build with the public iOS 9 SDK
authordbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Sep 2015 01:30:22 +0000 (01:30 +0000)
committerdbates@webkit.org <dbates@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 30 Sep 2015 01:30:22 +0000 (01:30 +0000)
https://bugs.webkit.org/show_bug.cgi?id=149652

Reviewed by Simon Fraser.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Add private header pthreadSPI.h. Also move entry for IDBTransaction.h so that it is in sorted order.
* platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Substitute AVPlayerViewControllerDelegate_WebKitOnly for AVPlayerViewControllerDelegate.
* platform/spi/cocoa/AVKitSPI.h: As of iOS 9, AVPlayerViewControllerDelegate is a public protocol. Separate out WebKit-specific SPI into protocol
AVPlayerViewControllerDelegate_WebKitOnly, which extends AVPlayerViewControllerDelegate. Also, the properties -[AVPlayerViewController allowsPictureInPicturePlayback] and -[AVPlayerViewController delegate] are public in iOS 9.
* platform/spi/cocoa/pthreadSPI.h: Added.
* platform/spi/ios/LaunchServicesSPI.h: Add more SPI.
* platform/spi/ios/MediaPlayerSPI.h: Ignore deprecation warnings for UIPopoverController and UIActionSheet.

Source/WebKit2:

* Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
* Platform/spi/ios/UIKitSPI.h: Add more SPI.
* WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.

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

Source/WebCore/ChangeLog
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/ios/WebVideoFullscreenInterfaceAVKit.mm
Source/WebCore/platform/spi/cocoa/AVKitSPI.h
Source/WebCore/platform/spi/cocoa/pthreadSPI.h [new file with mode: 0644]
Source/WebCore/platform/spi/ios/LaunchServicesSPI.h
Source/WebCore/platform/spi/ios/MediaPlayerSPI.h
Source/WebKit2/ChangeLog
Source/WebKit2/Platform/spi/ios/SafariServicesSPI.h
Source/WebKit2/Platform/spi/ios/UIKitSPI.h
Source/WebKit2/WebProcess/cocoa/WebProcessCocoa.mm

index 8df96f3..3e1e887 100644 (file)
@@ -1,3 +1,18 @@
+2015-09-29  Daniel Bates  <dabates@apple.com>
+
+        Make WebKit for iOS Simulator build with the public iOS 9 SDK
+        https://bugs.webkit.org/show_bug.cgi?id=149652
+
+        Reviewed by Simon Fraser.
+
+        * WebCore.xcodeproj/project.pbxproj: Add private header pthreadSPI.h. Also move entry for IDBTransaction.h so that it is in sorted order.
+        * platform/ios/WebVideoFullscreenInterfaceAVKit.mm: Substitute AVPlayerViewControllerDelegate_WebKitOnly for AVPlayerViewControllerDelegate.
+        * platform/spi/cocoa/AVKitSPI.h: As of iOS 9, AVPlayerViewControllerDelegate is a public protocol. Separate out WebKit-specific SPI into protocol
+        AVPlayerViewControllerDelegate_WebKitOnly, which extends AVPlayerViewControllerDelegate. Also, the properties -[AVPlayerViewController allowsPictureInPicturePlayback] and -[AVPlayerViewController delegate] are public in iOS 9.
+        * platform/spi/cocoa/pthreadSPI.h: Added.
+        * platform/spi/ios/LaunchServicesSPI.h: Add more SPI.
+        * platform/spi/ios/MediaPlayerSPI.h: Ignore deprecation warnings for UIPopoverController and UIActionSheet.
+
 2015-09-29  Brady Eidson  <beidson@apple.com>
 
         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
index 6055ccf..1750bad 100644 (file)
                CECADFCE1537791D00E37068 /* TextInsertionBaseCommand.h in Headers */ = {isa = PBXBuildFile; fileRef = CECADFCC1537791D00E37068 /* TextInsertionBaseCommand.h */; };
                CECCFC3B141973D5002A0AC1 /* DecodeEscapeSequences.h in Headers */ = {isa = PBXBuildFile; fileRef = CECCFC3A141973D5002A0AC1 /* DecodeEscapeSequences.h */; };
                CEDA12D7152CA1CB00D9E08D /* AlternativeTextClient.h in Headers */ = {isa = PBXBuildFile; fileRef = CEDA12D6152CA1CB00D9E08D /* AlternativeTextClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
+               CEE27ACB1BBB53A20072400A /* pthreadSPI.h in Headers */ = {isa = PBXBuildFile; fileRef = CEE27ACA1BBB53A20072400A /* pthreadSPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CEEFCD7919DB31F7003876D7 /* MediaResourceLoader.cpp in Sources */ = {isa = PBXBuildFile; fileRef = CEEFCD7719DB31F7003876D7 /* MediaResourceLoader.cpp */; };
                CEEFCD7A19DB31F7003876D7 /* MediaResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = CEEFCD7819DB31F7003876D7 /* MediaResourceLoader.h */; };
                CEEFCD7C19DB33DC003876D7 /* PlatformMediaResourceLoader.h in Headers */ = {isa = PBXBuildFile; fileRef = CEEFCD7B19DB33DC003876D7 /* PlatformMediaResourceLoader.h */; settings = {ATTRIBUTES = (Private, ); }; };
                CECADFCC1537791D00E37068 /* TextInsertionBaseCommand.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextInsertionBaseCommand.h; sourceTree = "<group>"; };
                CECCFC3A141973D5002A0AC1 /* DecodeEscapeSequences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DecodeEscapeSequences.h; sourceTree = "<group>"; };
                CEDA12D6152CA1CB00D9E08D /* AlternativeTextClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AlternativeTextClient.h; sourceTree = "<group>"; };
+               CEE27ACA1BBB53A20072400A /* pthreadSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pthreadSPI.h; sourceTree = "<group>"; };
                CEEC6034187DD962003E43BB /* TextTrackRepresentationIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextTrackRepresentationIOS.h; sourceTree = "<group>"; };
                CEEFCD7719DB31F7003876D7 /* MediaResourceLoader.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaResourceLoader.cpp; sourceTree = "<group>"; };
                CEEFCD7819DB31F7003876D7 /* MediaResourceLoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaResourceLoader.h; sourceTree = "<group>"; };
                                371783391AACDCF7000910E3 /* SecuritySPI.h */,
                                CEC337AC1A46071F009B8523 /* ServersSPI.h */,
                                A19D93451A9FEC7200B46C24 /* WebFilterEvaluatorSPI.h */,
+                               CEE27ACA1BBB53A20072400A /* pthreadSPI.h */,
                        );
                        path = cocoa;
                        sourceTree = "<group>";
                                516D7D721BB5F0BD00AF7C77 /* IDBConnectionToClientDelegate.h in Headers */,
                                51F41A7C1BA73B5B002E053B /* IDBPendingTransactionMonitor.h in Headers */,
                                5103105D1BA8DB56003329C0 /* IDBRequestImpl.h in Headers */,
+                               5185FCAD1BB4C4E80012898F /* IDBTransaction.h in Headers */,
                                51F41A741BA73B5B002E053B /* IDBTransactionBackend.h in Headers */,
                                51F41A761BA73B5B002E053B /* IDBTransactionBackendOperations.h in Headers */,
                                51F41A781BA73B5B002E053B /* IDBTransactionCoordinator.h in Headers */,
                                51A052561058874000CC9E95 /* ProtectionSpaceHash.h in Headers */,
                                1AF8E11A1256592600230FF7 /* ProxyServer.h in Headers */,
                                FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */,
-                               5185FCAD1BB4C4E80012898F /* IDBTransaction.h in Headers */,
                                0081FF0016B0A2D3008AAA7A /* PublicSuffix.h in Headers */,
                                10FB084B14E15C7E00A3DB98 /* PublicURLManager.h in Headers */,
+                               CEE27ACB1BBB53A20072400A /* pthreadSPI.h in Headers */,
                                550A0BCA085F6039007353D6 /* QualifiedName.h in Headers */,
                                CE12523D1A1676CD00864480 /* QuartzCoreSPI.h in Headers */,
                                442AF7A9102CDDEA008FD4D3 /* QuickLook.h in Headers */,
index 42f77cf..ef7ff02 100644 (file)
@@ -81,7 +81,7 @@ static const double DefaultWatchdogTimerInterval = 1;
 
 @class WebAVMediaSelectionOption;
 
-@interface WebAVPlayerController : NSObject <AVPlayerViewControllerDelegate> {
+@interface WebAVPlayerController : NSObject <AVPlayerViewControllerDelegate_WebKitOnly> {
     WebAVMediaSelectionOption *_currentAudioMediaSelectionOption;
     WebAVMediaSelectionOption *_currentLegibleMediaSelectionOption;
     BOOL _pictureInPictureInterrupted;
index 64b994a..71ad434 100644 (file)
@@ -74,7 +74,13 @@ typedef NS_ENUM(NSInteger, AVPlayerControllerExternalPlaybackType) {
 - (void)stopRoutingVideoToPictureInPicturePlayerLayerView;
 @end
 
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
 @protocol AVPlayerViewControllerDelegate <NSObject>
+- (void)playerViewController:(AVPlayerViewController *)playerViewController restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:(void (^)(BOOL restored))completionHandler;
+@end
+#endif
+
+@protocol AVPlayerViewControllerDelegate_WebKitOnly <AVPlayerViewControllerDelegate>
 @optional
 typedef NS_ENUM(NSInteger, AVPlayerViewControllerExitFullScreenReason) {
     AVPlayerViewControllerExitFullScreenReasonDoneButtonTapped,
@@ -84,7 +90,6 @@ typedef NS_ENUM(NSInteger, AVPlayerViewControllerExitFullScreenReason) {
     AVPlayerViewControllerExitFullScreenReasonPictureInPictureStarted
 };
 - (BOOL)playerViewController:(AVPlayerViewController *)playerViewController shouldExitFullScreenWithReason:(AVPlayerViewControllerExitFullScreenReason)reason;
-- (void)playerViewController:(AVPlayerViewController *)playerViewController restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:(void (^)(BOOL restored))completionHandler;
 @end
 
 @interface AVPlayerViewController ()
@@ -96,9 +101,11 @@ typedef NS_ENUM(NSInteger, AVPlayerViewControllerExitFullScreenReason) {
 - (void)startPictureInPicture;
 - (void)stopPictureInPicture;
 
+#if __IPHONE_OS_VERSION_MIN_REQUIRED < 90000
 @property (nonatomic) BOOL allowsPictureInPicturePlayback;
-@property (nonatomic, strong) AVPlayerController *playerController;
 @property (nonatomic, weak) id <AVPlayerViewControllerDelegate> delegate;
+#endif
+@property (nonatomic, strong) AVPlayerController *playerController;
 @end
 
 #endif // USE(APPLE_INTERNAL_SDK)
diff --git a/Source/WebCore/platform/spi/cocoa/pthreadSPI.h b/Source/WebCore/platform/spi/cocoa/pthreadSPI.h
new file mode 100644 (file)
index 0000000..6d6d392
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2015 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.
+ */
+
+#ifndef PthreadSPI_h
+#define PthreadSPI_h
+
+#include <pthread.h>
+
+WTF_EXTERN_C_BEGIN
+
+int pthread_set_fixedpriority_self(void);
+
+WTF_EXTERN_C_END
+
+#endif // PthreadSPI_h
index bcece1b..cc02466 100644 (file)
 
 #endif
 
+@class LSAppLink;
+typedef void (^LSAppLinkCompletionHandler)(LSAppLink *appLink, NSError *error);
 typedef void (^LSAppLinkOpenCompletionHandler)(BOOL success, NSError *error);
 
 #if !USE(APPLE_INTERNAL_SDK)
 
 #if __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+@interface LSResourceProxy : NSObject <NSCopying, NSSecureCoding>
+@end
+
+@interface LSBundleProxy : LSResourceProxy <NSSecureCoding>
+@end
+
+@interface LSApplicationProxy : LSBundleProxy <NSSecureCoding>
+- (NSString *)localizedNameForContext:(NSString *)context;
+@end
+
 @interface LSAppLink : NSObject <NSSecureCoding>
 @end
 
 @interface LSAppLink ()
++ (void)getAppLinkWithURL:(NSURL *)aURL completionHandler:(LSAppLinkCompletionHandler)completionHandler;
 + (void)openWithURL:(NSURL *)aURL completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
 - (void)openInWebBrowser:(BOOL)inWebBrowser setAppropriateOpenStrategyAndWebBrowserState:(NSDictionary<NSString *, id> *)state completionHandler:(LSAppLinkOpenCompletionHandler)completionHandler;
+@property (readonly, strong) LSApplicationProxy *targetApplicationProxy;
 @end
 #endif
 
index 729be07..4142501 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -60,15 +60,21 @@ typedef NSInteger MPRouteDiscoveryMode;
 @property (nonatomic, assign) MPRouteDiscoveryMode discoveryMode;
 @end
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 @interface MPAudioVideoRoutingPopoverController : UIPopoverController
 @end
+#pragma clang diagnostic pop
 
 @interface MPAudioVideoRoutingPopoverController ()
 - (id)initWithType:(MPAVItemType)avItemType;
 @end
 
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
 @interface MPAudioVideoRoutingActionSheet : UIActionSheet
 @end
+#pragma clang diagnostic pop
 
 @interface MPAudioVideoRoutingActionSheet ()
 - (id)initWithType:(MPAVItemType)avItemType;
index 1c00ebe..e3d3712 100644 (file)
@@ -1,3 +1,14 @@
+2015-09-29  Daniel Bates  <dabates@apple.com>
+
+        Make WebKit for iOS Simulator build with the public iOS 9 SDK
+        https://bugs.webkit.org/show_bug.cgi?id=149652
+
+        Reviewed by Simon Fraser.
+
+        * Platform/spi/ios/SafariServicesSPI.h: Add definition for SFSafariViewController.
+        * Platform/spi/ios/UIKitSPI.h: Add more SPI.
+        * WebProcess/cocoa/WebProcessCocoa.mm: Include header pthreadSPI.h.
+
 2015-09-29  Brady Eidson  <beidson@apple.com>
 
         Followup to "Move WebKit2 AsyncTask to WebCore CrossThreadTask."
index dc0b801..5fd788f 100644 (file)
@@ -26,6 +26,7 @@
 #if HAVE(SAFARI_SERVICES_FRAMEWORK) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
 
 #import <WebCore/SoftLinking.h>
+#import <SafariServices/SFSafariViewController.h>
 
 @class _WKActivatedElementInfo;
 @class _WKElementAction;
index e3789e5..91536ce 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2014 Apple Inc. All rights reserved.
+ * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
 
 #else
 
+#if HAVE(LINK_PREVIEW)
+typedef NS_ENUM(NSInteger, UIPreviewItemType) {
+    UIPreviewItemTypeNone,
+    UIPreviewItemTypeClientCustom,
+    UIPreviewItemTypeLink,
+    UIPreviewItemTypeImage,
+    UIPreviewItemTypeText,
+};
+
+@class UIPreviewItemController;
+
+@protocol UIPreviewItemDelegate <NSObject>
+- (NSDictionary *)_dataForPreviewItemController:(UIPreviewItemController *)controller atPosition:(CGPoint)position type:(UIPreviewItemType *)type;
+@optional
+- (BOOL)_interactionShouldBeginFromPreviewItemController:(UIPreviewItemController *)controller forPosition:(CGPoint)position;
+- (void)_interactionStartedFromPreviewItemController:(UIPreviewItemController *)controller;
+- (void)_interactionStoppedFromPreviewItemController:(UIPreviewItemController *)controller;
+- (UIViewController *)_presentedViewControllerForPreviewItemController:(UIPreviewItemController *)controller;
+- (void)_previewItemController:(UIPreviewItemController *)controller didDismissPreview:(UIViewController *)viewController committing:(BOOL)committing;
+- (void)_previewItemController:(UIPreviewItemController *)controller commitPreview:(UIViewController *)viewController;
+- (void)_previewItemControllerDidCancelPreview:(UIPreviewItemController *)controller;
+- (UIImage *)_presentationSnapshotForPreviewItemController:(UIPreviewItemController *)controller;
+- (NSArray *)_presentationRectsForPreviewItemController:(UIPreviewItemController *)controller;
+- (CGRect)_presentationRectForPreviewItemController:(UIPreviewItemController *)controller;
+@end
+
+@interface UIPreviewItemController : NSObject
+- (instancetype)initWithView:(UIView *)view;
+@property (assign, nonatomic) id<UIPreviewItemDelegate> delegate;
+@property (assign, nonatomic, readonly) UIPreviewItemType type;
+@property (strong, nonatomic, readonly) NSDictionary *previewData;
+@property (strong, nonatomic, readonly) UIGestureRecognizer *presentationGestureRecognizer;
+@property (strong, nonatomic, readonly) UIGestureRecognizer *presentationSecondaryGestureRecognizer;
+@end
+#endif
+
 @interface UIAlertController ()
 - (void)_addActionWithTitle:(NSString *)title style:(UIAlertActionStyle)style handler:(void (^)(void))handler;
 - (void)_addActionWithTitle:(NSString *)title style:(UIAlertActionStyle)style handler:(void (^)(void))handler shouldDismissHandler:(BOOL (^)(void))shouldDismissHandler;
@@ -559,6 +595,9 @@ typedef enum {
 
 @property (nonatomic, assign, getter=isNextEnabled) BOOL nextEnabled;
 @property (nonatomic, assign, getter=isPreviousEnabled) BOOL previousEnabled;
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 90000
+- (id)initWithInputAssistantItem:(UITextInputAssistantItem *)inputAssistantItem;
+#endif
 @end
 
 @protocol UIWebFormAccessoryDelegate
@@ -805,4 +844,6 @@ extern const float UIWebViewStandardViewportWidth;
 extern NSString *const UIKeyInputPageUp;
 extern NSString *const UIKeyInputPageDown;
 
+extern const NSString *UIPreviewDataLink;
+
 WTF_EXTERN_C_END
index 4f8d09a..9d972c6 100644 (file)
@@ -51,6 +51,7 @@
 #import <WebCore/MemoryCache.h>
 #import <WebCore/MemoryPressureHandler.h>
 #import <WebCore/PageCache.h>
+#import <WebCore/pthreadSPI.h>
 #import <WebCore/VNodeTracker.h>
 #import <WebCore/WebCoreNSURLExtras.h>
 #import <WebKitSystemInterface.h>