Enable WebKit iOS 12 build
authorjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2018 18:02:56 +0000 (18:02 +0000)
committerjbedard@apple.com <jbedard@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 27 Jun 2018 18:02:56 +0000 (18:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=187024
<rdar://problem/39759057>

Reviewed by David Kilzer.

Source/WebCore/PAL:

* pal/cf/CoreMediaSoftLink.cpp: Condition some CoreMedia functions on version.
* pal/cf/CoreMediaSoftLink.h: Ditto.
* pal/spi/cocoa/NSXPCConnectionSPI.h: Use XPCSPI.h instead of xpc.h.
* pal/spi/ios/QuickLookSPI.h: QLItem adopts QLPreviewItem.
* pal/spi/ios/SystemPreviewSPI.h: Fix compiler errors.

Source/WebKit:

* Platform/spi/ios/PDFKitSPI.h: Added PDFKit SPI.
* Platform/spi/ios/UIKitSPI.h: Add new UIKit SPI and UICompositingMode enumeration.
* UIProcess/ios/WKPDFView.mm: Use PDFKitSPI header.
* UIProcess/ios/WKSystemPreviewView.mm: Use CoreGraphicsSPI.h.
* UIProcess/ios/fullscreen/WKFullscreenStackView.mm: Use QuartzCoreSPI.h.

Source/WTF:

* wtf/spi/darwin/XPCSPI.h: Add endpoint and connection declarations.

Tools:

* Scripts/configure-xcode-for-ios-development:
(copyMissingHeadersFromSDKToSDKIfNeeded): Copy launch.h into embedded SDKs.

WebKitLibraries:

* WebKitPrivateFrameworkStubs/iOS/12: Added.

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

27 files changed:
Source/WTF/ChangeLog
Source/WTF/wtf/spi/darwin/XPCSPI.h
Source/WebCore/PAL/ChangeLog
Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.cpp
Source/WebCore/PAL/pal/cf/CoreMediaSoftLink.h
Source/WebCore/PAL/pal/spi/cocoa/NSXPCConnectionSPI.h
Source/WebCore/PAL/pal/spi/ios/QuickLookSPI.h
Source/WebCore/PAL/pal/spi/ios/SystemPreviewSPI.h
Source/WebKit/ChangeLog
Source/WebKit/Platform/spi/ios/PDFKitSPI.h [new file with mode: 0644]
Source/WebKit/Platform/spi/ios/UIKitSPI.h
Source/WebKit/UIProcess/ios/WKPDFView.mm
Source/WebKit/UIProcess/ios/WKSystemPreviewView.mm
Source/WebKit/UIProcess/ios/fullscreen/WKFullscreenStackView.mm
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Tools/ChangeLog
Tools/Scripts/configure-xcode-for-ios-development
WebKitLibraries/ChangeLog
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/AppSupport.framework/AppSupport.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/AssertionServices.framework/AssertionServices.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/CorePDF.framework/CorePDF.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/CorePrediction.framework/CorePrediction.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/DeviceIdentity.framework/DeviceIdentity.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/GraphicsServices.framework/GraphicsServices.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd [new file with mode: 0644]
WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/URLFormatting.framework/URLFormatting.tbd [new file with mode: 0644]

index b4a742c..326ba6f 100644 (file)
@@ -1,3 +1,13 @@
+2018-06-27  Jonathan Bedard  <jbedard@apple.com>
+
+        Enable WebKit iOS 12 build
+        https://bugs.webkit.org/show_bug.cgi?id=187024
+        <rdar://problem/39759057>
+
+        Reviewed by David Kilzer.
+
+        * wtf/spi/darwin/XPCSPI.h: Add endpoint and connection declarations.
+
 2018-06-25  David Fenton  <david_fenton@apple.com>
 
         Unreviewed, rolling out r233120.
index 1a33e2e..214df11 100644 (file)
@@ -35,6 +35,7 @@
 #if OS_OBJECT_USE_OBJC
 OS_OBJECT_DECL(xpc_object);
 typedef xpc_object_t xpc_connection_t;
+typedef xpc_object_t xpc_endpoint_t;
 
 static ALWAYS_INLINE void _xpc_object_validate(xpc_object_t object)
 {
@@ -74,6 +75,7 @@ typedef void (*xpc_connection_handler_t)(xpc_connection_t connection);
 #define XPC_TYPE_BOOL (&_xpc_type_bool)
 #define XPC_TYPE_CONNECTION (&_xpc_type_connection)
 #define XPC_TYPE_DICTIONARY (&_xpc_type_dictionary)
+#define XPC_TYPE_ENDPOINT (&_xpc_type_endpoint)
 #define XPC_TYPE_ERROR (&_xpc_type_error)
 #define XPC_TYPE_STRING (&_xpc_type_string)
 
@@ -98,7 +100,9 @@ extern const struct _xpc_dictionary_s _xpc_error_termination_imminent;
 
 extern const struct _xpc_type_s _xpc_type_array;
 extern const struct _xpc_type_s _xpc_type_bool;
+extern const struct _xpc_type_s _xpc_type_connection;
 extern const struct _xpc_type_s _xpc_type_dictionary;
+extern const struct _xpc_type_s _xpc_type_endpoint;
 extern const struct _xpc_type_s _xpc_type_error;
 extern const struct _xpc_type_s _xpc_type_string;
 
@@ -132,7 +136,7 @@ void xpc_dictionary_set_bool(xpc_object_t, const char* key, bool value);
 void xpc_dictionary_set_fd(xpc_object_t, const char* key, int fd);
 void xpc_dictionary_set_string(xpc_object_t, const char* key, const char* string);
 void xpc_dictionary_set_uint64(xpc_object_t, const char* key, uint64_t value);
-void xpc_dictionary_set_value(xpc_object_t, const char*key, xpc_object_t value);
+void xpc_dictionary_set_value(xpc_object_t, const char* key, xpc_object_t value);
 xpc_type_t xpc_get_type(xpc_object_t);
 void xpc_main(xpc_connection_handler_t);
 const char* xpc_string_get_string_ptr(xpc_object_t);
@@ -152,6 +156,14 @@ void xpc_connection_set_bootstrap(xpc_connection_t, xpc_object_t bootstrap);
 xpc_object_t xpc_copy_bootstrap(void);
 void xpc_connection_set_oneshot_instance(xpc_connection_t, uuid_t instance);
 
+void xpc_array_append_value(xpc_object_t xarray, xpc_object_t value);
+xpc_object_t xpc_array_get_value(xpc_object_t xarray, size_t index);
+xpc_object_t xpc_data_create(const void* bytes, size_t length);
+const void * xpc_data_get_bytes_ptr(xpc_object_t xdata);
+size_t xpc_data_get_length(xpc_object_t xdata);
+xpc_object_t xpc_dictionary_get_array(xpc_object_t xdict, const char* key);
+
+
 #if OS_OBJECT_USE_OBJC_RETAIN_RELEASE
 #if !defined(xpc_retain)
 #define xpc_retain(object) ({ xpc_object_t _o = (object); _xpc_object_validate(_o); [_o retain]; })
index 7788337..ec0e633 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-27  Jonathan Bedard  <jbedard@apple.com>
+
+        Enable WebKit iOS 12 build
+        https://bugs.webkit.org/show_bug.cgi?id=187024
+        <rdar://problem/39759057>
+
+        Reviewed by David Kilzer.
+
+        * pal/cf/CoreMediaSoftLink.cpp: Condition some CoreMedia functions on version.
+        * pal/cf/CoreMediaSoftLink.h: Ditto.
+        * pal/spi/cocoa/NSXPCConnectionSPI.h: Use XPCSPI.h instead of xpc.h.
+        * pal/spi/ios/QuickLookSPI.h: QLItem adopts QLPreviewItem.
+        * pal/spi/ios/SystemPreviewSPI.h: Fix compiler errors.
+
 2018-06-26  Wenson Hsieh  <wenson_hsieh@apple.com>
 
         [iPad apps on macOS] Unable to interact with video elements that have started playing
index e38f043..d3300b9 100644 (file)
@@ -93,7 +93,6 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMFormatDescriptionGetMediaType, C
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMNotificationCenterGetDefaultLocalCenter, CMNotificationCenterRef, (void), ())
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMNotificationCenterAddListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object, UInt32 flags), (center, listener, callback, notification, object, flags))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMNotificationCenterRemoveListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object), (center, listener, callback, notification, object))
-SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (* CMSAMPLEBUFFERCALL_NOESCAPE callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCreate, OSStatus, (CFAllocatorRef allocator, CMBlockBufferRef dataBuffer, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, CMItemCount numSamples, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMItemCount numSampleSizeEntries, const size_t *sampleSizeArray, CMSampleBufferRef *sBufOut), (allocator, dataBuffer, dataReady, makeDataReadyCallback, makeDataReadyRefcon, formatDescription, numSamples, numSampleTimingEntries, sampleTimingArray, numSampleSizeEntries, sampleSizeArray, sBufOut))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCreateCopy, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CMSampleBufferRef *sbufCopyOut), (allocator, sbuf, sbufCopyOut))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCreateCopyWithNewTiming, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef originalSBuf, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMSampleBufferRef *sBufCopyOut), (allocator, originalSBuf, numSampleTimingEntries, sampleTimingArray, sBufCopyOut))
@@ -150,7 +149,6 @@ SOFT_LINK_CONSTANT_FOR_SOURCE(PAL, CoreMedia, kCMTimebaseNotification_TimeJumped
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMAudioFormatDescriptionGetStreamBasicDescription, const AudioStreamBasicDescription *, (CMAudioFormatDescriptionRef desc), (desc))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer, OSStatus, (CMSampleBufferRef sbuf, size_t *bufferListSizeNeededOut, AudioBufferList *bufferListOut, size_t bufferListSize, CFAllocatorRef bbufStructAllocator, CFAllocatorRef bbufMemoryAllocator, uint32_t flags, CMBlockBufferRef *blockBufferOut), (sbuf, bufferListSizeNeededOut, bufferListOut, bufferListSize, bbufStructAllocator, bbufMemoryAllocator, flags, blockBufferOut))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferGetNumSamples, CMItemCount, (CMSampleBufferRef sbuf), (sbuf))
-SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCallBlockForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (^ CMSAMPLEBUFFERCALL_NOESCAPE handler)(CMSampleBufferRef, CMItemCount)), (sbuf, handler))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCopySampleBufferForRange, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CFRange sampleRange, CMSampleBufferRef* sBufOut), (allocator, sbuf, sampleRange, sBufOut))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferGetSampleSizeArray, OSStatus, (CMSampleBufferRef sbuf, CMItemCount sizeArrayEntries, size_t* sizeArrayOut, CMItemCount* sizeArrayEntriesNeededOut), (sbuf, sizeArrayEntries, sizeArrayOut, sizeArrayEntriesNeededOut))
 
@@ -160,6 +158,12 @@ SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferSetDataReady, OSStat
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMAudioFormatDescriptionCreate, OSStatus, (CFAllocatorRef allocator, const AudioStreamBasicDescription* asbd, size_t layoutSize, const AudioChannelLayout* layout, size_t magicCookieSize, const void* magicCookie, CFDictionaryRef extensions, CMAudioFormatDescriptionRef* outDesc), (allocator, asbd, layoutSize, layout, magicCookieSize, magicCookie, extensions, outDesc))
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMClockGetHostTimeClock, CMClockRef, (void), ())
 SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMClockGetTime, CMTime, (CMClockRef clock), (clock))
+
+#if !PLATFORM(IOS) || __IPHONE_OS_VERSION_MAX_ALLOWED < 120000
+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (* CMSAMPLEBUFFERCALL_NOESCAPE callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
+SOFT_LINK_FUNCTION_FOR_SOURCE(PAL, CoreMedia, CMSampleBufferCallBlockForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (^ CMSAMPLEBUFFERCALL_NOESCAPE handler)(CMSampleBufferRef, CMItemCount)), (sbuf, handler))
+#endif
+
 #endif // PLATFORM(COCOA)
 
 #if PLATFORM(IOS)
index 9c53ab5..7895c90 100644 (file)
@@ -143,8 +143,6 @@ SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMNotificationCenterAddListener, O
 #define CMNotificationCenterAddListener softLink_CoreMedia_CMNotificationCenterAddListener
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMNotificationCenterRemoveListener, OSStatus, (CMNotificationCenterRef center, const void* listener, CMNotificationCallback callback, CFStringRef notification, const void* object), (center, listener, callback, notification, object))
 #define CMNotificationCenterRemoveListener softLink_CoreMedia_CMNotificationCenterRemoveListener
-SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (* CMSAMPLEBUFFERCALL_NOESCAPE callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
-#define CMSampleBufferCallForEachSample softLink_CoreMedia_CMSampleBufferCallForEachSample
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCreate, OSStatus, (CFAllocatorRef allocator, CMBlockBufferRef dataBuffer, Boolean dataReady, CMSampleBufferMakeDataReadyCallback makeDataReadyCallback, void *makeDataReadyRefcon, CMFormatDescriptionRef formatDescription, CMItemCount numSamples, CMItemCount numSampleTimingEntries, const CMSampleTimingInfo *sampleTimingArray, CMItemCount numSampleSizeEntries, const size_t *sampleSizeArray, CMSampleBufferRef *sBufOut), (allocator, dataBuffer, dataReady, makeDataReadyCallback, makeDataReadyRefcon, formatDescription, numSamples, numSampleTimingEntries, sampleTimingArray, numSampleSizeEntries, sampleSizeArray, sBufOut))
 #define CMSampleBufferCreate softLink_CoreMedia_CMSampleBufferCreate
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCreateCopy, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CMSampleBufferRef *sbufCopyOut), (allocator, sbuf, sbufCopyOut))
@@ -252,8 +250,6 @@ SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferGetAudioBufferListWi
 #define CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer softLink_CoreMedia_CMSampleBufferGetAudioBufferListWithRetainedBlockBuffer
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferGetNumSamples, CMItemCount, (CMSampleBufferRef sbuf), (sbuf))
 #define CMSampleBufferGetNumSamples softLink_CoreMedia_CMSampleBufferGetNumSamples
-SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCallBlockForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (^ CMSAMPLEBUFFERCALL_NOESCAPE handler)(CMSampleBufferRef, CMItemCount)), (sbuf, handler))
-#define CMSampleBufferCallBlockForEachSample softLink_CoreMedia_CMSampleBufferCallBlockForEachSample
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCopySampleBufferForRange, OSStatus, (CFAllocatorRef allocator, CMSampleBufferRef sbuf, CFRange sampleRange, CMSampleBufferRef* sBufOut), (allocator, sbuf, sampleRange, sBufOut))
 #define CMSampleBufferCopySampleBufferForRange softLink_CoreMedia_CMSampleBufferCopySampleBufferForRange
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferGetSampleSizeArray, OSStatus, (CMSampleBufferRef sbuf, CMItemCount sizeArrayEntries, size_t* sizeArrayOut, CMItemCount* sizeArrayEntriesNeededOut), (sbuf, sizeArrayEntries, sizeArrayOut, sizeArrayEntriesNeededOut))
@@ -271,6 +267,16 @@ SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMClockGetHostTimeClock, CMClockRe
 #define CMClockGetHostTimeClock  softLink_CoreMedia_CMClockGetHostTimeClock
 SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMClockGetTime, CMTime, (CMClockRef clock), (clock))
 #define CMClockGetTime  softLink_CoreMedia_CMClockGetTime
+
+#if !PLATFORM(IOS) || __IPHONE_OS_VERSION_MAX_ALLOWED < 120000
+
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCallForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (* CMSAMPLEBUFFERCALL_NOESCAPE callback)( CMSampleBufferRef sampleBuffer, CMItemCount index, void *refcon), void *refcon), (sbuf, callback, refcon))
+#define CMSampleBufferCallForEachSample softLink_CoreMedia_CMSampleBufferCallForEachSample
+SOFT_LINK_FUNCTION_FOR_HEADER(PAL, CoreMedia, CMSampleBufferCallBlockForEachSample, OSStatus, (CMSampleBufferRef sbuf, OSStatus (^ CMSAMPLEBUFFERCALL_NOESCAPE handler)(CMSampleBufferRef, CMItemCount)), (sbuf, handler))
+#define CMSampleBufferCallBlockForEachSample softLink_CoreMedia_CMSampleBufferCallBlockForEachSample
+
+#endif
+
 #endif // PLATFORM(COCOA)
 
 #if PLATFORM(IOS)
index 0b62a36..86dcd91 100644 (file)
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#include <wtf/spi/darwin/XPCSPI.h>
+
 #if USE(APPLE_INTERNAL_SDK)
 
 #import <Foundation/NSXPCConnection_Private.h>
@@ -32,7 +34,6 @@
 #else
 
 #import <Foundation/NSXPCConnection.h>
-#import <xpc/xpc.h>
 
 NS_ASSUME_NONNULL_BEGIN
 
index 85e902e..32a609f 100644 (file)
@@ -24,6 +24,7 @@
  */
 
 #import <Foundation/Foundation.h>
+#import <QuickLook/QuickLook.h>
 
 #if USE(APPLE_INTERNAL_SDK)
 
 - (NSData *)provideDataForItem:(QLItem *)item;
 @end
 
-@interface QLItem : NSObject
+@interface QLItem : NSObject<QLPreviewItem>
 - (instancetype)initWithDataProvider:(id<QLPreviewItemDataProvider>)data contentType:(NSString *)contentType previewTitle:(NSString *)previewTitle;
+- (instancetype)initWithPreviewItemProvider:(NSItemProvider *)itemProvider contentType:(NSString *)contentType previewTitle:(NSString *)previewTitle fileSize:(NSNumber *)fileSize;
+- (void)setPreviewItemProviderProgress:(NSNumber*)progress;
+- (void)setUseLoadingTimeout:(BOOL) timeout;
 @end
 
 #define kQLReturnPasswordProtected 1 << 2
index 888451a..39e7518 100644 (file)
 @class QLPreviewController;
 
 @protocol ASVThumbnailViewDelegate <NSObject>
-- (void)thumbnailView:(ASVThumbnailView *)thumbnailView wantsToPresentPreviewController:(QLPreviewController *)previewController forItem:(QLItem *)item
+- (void)thumbnailView:(ASVThumbnailView *)thumbnailView wantsToPresentPreviewController:(QLPreviewController *)previewController forItem:(QLItem *)item;
 @end
 
 @interface ASVThumbnailView : UIView
 @property (nonatomic, weak) id<ASVThumbnailViewDelegate> delegate;
-@property (nonatomic) QLItem *thumbnailItem;
+@property (nonatomic, assign) QLItem *thumbnailItem;
 @property (nonatomic) CGSize maxThumbnailSize;
 @end
 
index 57f116b..3b30044 100644 (file)
@@ -1,3 +1,17 @@
+2018-06-27  Jonathan Bedard  <jbedard@apple.com>
+
+        Enable WebKit iOS 12 build
+        https://bugs.webkit.org/show_bug.cgi?id=187024
+        <rdar://problem/39759057>
+
+        Reviewed by David Kilzer.
+
+        * Platform/spi/ios/PDFKitSPI.h: Added PDFKit SPI.
+        * Platform/spi/ios/UIKitSPI.h: Add new UIKit SPI and UICompositingMode enumeration.
+        * UIProcess/ios/WKPDFView.mm: Use PDFKitSPI header.
+        * UIProcess/ios/WKSystemPreviewView.mm: Use CoreGraphicsSPI.h.
+        * UIProcess/ios/fullscreen/WKFullscreenStackView.mm: Use QuartzCoreSPI.h.
+
 2018-06-27  Timothy Horton  <timothy_horton@apple.com>
 
         CSS Animation Triggers is not an experimental feature, should be globally off by default
diff --git a/Source/WebKit/Platform/spi/ios/PDFKitSPI.h b/Source/WebKit/Platform/spi/ios/PDFKitSPI.h
new file mode 100644 (file)
index 0000000..5837333
--- /dev/null
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 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
+ * 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.
+ */
+
+#if USE(APPLE_INTERNAL_SDK)
+
+#import <PDFKit/PDFHostViewController.h>
+
+#else
+
+#import "UIKitSPI.h"
+
+@interface _UIRemoteViewController : UIViewController
+@end
+
+@protocol PDFHostViewControllerDelegate<NSObject>
+@end
+
+@interface PDFHostViewController : _UIRemoteViewController<UIGestureRecognizerDelegate, UIDocumentPasswordViewDelegate>
+
++ (void) createHostView:(void(^)(PDFHostViewController* hostViewController)) callback forExtensionIdentifier:(NSString*) extensionIdentifier;
+- (void) setDelegate:(id<PDFHostViewControllerDelegate>) delegate;
+- (void) setDocumentData:(NSData*) data withScrollView:(UIScrollView*) scrollView;
+
+- (void) findString:(NSString*) string withOptions:(NSStringCompareOptions) options;
+- (void) cancelFindString;
+- (void) focusOnSearchResultAtIndex:(NSUInteger) searchIndex;
+
+- (NSInteger) currentPageIndex;
+- (NSInteger) pageCount;
+- (UIView*) pageNumberIndicator;
+- (void) goToPageIndex:(NSInteger) pageIndex;
+- (void) updatePDFViewLayout;
+
+- (void) beginPDFViewRotation;
+- (void) endPDFViewRotation;
+
+@end
+
+#endif
index 0ee5879..d20454c 100644 (file)
@@ -474,6 +474,8 @@ typedef NS_ENUM (NSInteger, _UIBackdropMaskViewFlags) {
 - (void)safeAreaInsetsDidChange;
 #endif
 @property (nonatomic, setter=_setContinuousCornerRadius:) CGFloat _continuousCornerRadius;
+- (void)insertSubview:(UIView *)view above:(UIView *)sibling;
+- (void)viewWillMoveToSuperview:(UIView *)newSuperview;
 @end
 
 @interface UIWebSelectionView : UIView
@@ -935,14 +937,22 @@ typedef NS_OPTIONS(NSUInteger, UIDragOperation)
 - (void)configureLayerView:(UIView *)view;
 @end
 
+@interface _UIVisualEffectTintLayerConfig : _UIVisualEffectLayerConfig
++ (instancetype)layerWithTintColor:(UIColor *)tintColor;
++ (instancetype)layerWithTintColor:(UIColor *)tintColor filterType:(NSString *)filterType NS_AVAILABLE_IOS(9_0);
+@end
+
 @interface _UIVisualEffectConfig : NSObject
 @property (nonatomic, readonly) _UIVisualEffectLayerConfig *contentConfig;
 + (_UIVisualEffectConfig *)configWithContentConfig:(_UIVisualEffectLayerConfig *)contentConfig;
 @end
 
+typedef NSInteger UICompositingMode;
+
 @interface UIVisualEffect ()
 + (UIVisualEffect *)emptyEffect;
 + (UIVisualEffect *)effectCombiningEffects:(NSArray<UIVisualEffect *> *)effects;
++ (UIVisualEffect *)effectCompositingColor:(UIColor *)color withMode:(UICompositingMode)compositingMode alpha:(CGFloat)alpha;
 @end
 
 @interface UIColorEffect : UIVisualEffect
index 5b77f51..129232b 100644 (file)
 
 #import "APIUIClient.h"
 #import "FindClient.h"
+#import "PDFKitSPI.h"
 #import "WKActionSheetAssistant.h"
 #import "WKWebViewInternal.h"
 #import "WebPageProxy.h"
 #import "_WKWebViewPrintFormatterInternal.h"
-#import <PDFKit/PDFHostViewController.h>
+#import <MobileCoreServices/MobileCoreServices.h>
 #import <WebCore/WebCoreNSURLExtras.h>
 #import <wtf/BlockPtr.h>
 #import <wtf/MainThread.h>
index 2e8efda..88a7782 100644 (file)
@@ -35,6 +35,7 @@
 #import <MobileCoreServices/MobileCoreServices.h>
 #import <WebCore/FloatRect.h>
 #import <WebCore/LocalizedStrings.h>
+#import <pal/spi/cg/CoreGraphicsSPI.h>
 #import <pal/spi/ios/SystemPreviewSPI.h>
 #import <wtf/RetainPtr.h>
 #import <wtf/SoftLinking.h>
index 7d4ab5d..61151b8 100644 (file)
@@ -29,9 +29,9 @@
 #include "WKFullscreenStackView.h"
 
 #import "UIKitSPI.h"
-#import <QuartzCore/CAFilter.h>
 #import <UIKit/UIVisualEffectView.h>
 #import <pal/cf/CoreMediaSoftLink.h>
+#import <pal/spi/cocoa/QuartzCoreSPI.h>
 #import <wtf/NeverDestroyed.h>
 #import <wtf/RetainPtr.h>
 
index 8db9e4f..b9cf28e 100644 (file)
                31607F3819627002009B87DA /* LegacySessionStateCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacySessionStateCoding.h; sourceTree = "<group>"; };
                316B8B612054B55800BD4A62 /* WKSystemPreviewView.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; name = WKSystemPreviewView.mm; path = ios/WKSystemPreviewView.mm; sourceTree = "<group>"; };
                316B8B622054B55800BD4A62 /* WKSystemPreviewView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WKSystemPreviewView.h; path = ios/WKSystemPreviewView.h; sourceTree = "<group>"; };
+               3178AF9720E2A7F80074DE94 /* PDFKitSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PDFKitSPI.h; sourceTree = "<group>"; };
                317FE7C11C487A6600A0CA89 /* APIExperimentalFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIExperimentalFeature.cpp; sourceTree = "<group>"; };
                317FE7C21C487A6600A0CA89 /* APIExperimentalFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = APIExperimentalFeature.h; sourceTree = "<group>"; };
                317FE7C71C487D9D00A0CA89 /* _WKExperimentalFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = _WKExperimentalFeature.h; sourceTree = "<group>"; };
                                2D4AF0882044C3C4006C8817 /* FrontBoardServicesSPI.h */,
                                CE1A0BCF1A48E6C60054EF74 /* ManagedConfigurationSPI.h */,
                                A13B3DA1207F39DE0090C58D /* MobileWiFiSPI.h */,
+                               3178AF9720E2A7F80074DE94 /* PDFKitSPI.h */,
                                CE1A0BD01A48E6C60054EF74 /* TCCSPI.h */,
                                CE1A0BD11A48E6C60054EF74 /* TextInputSPI.h */,
                                CEE4AE2A1A5DCF430002F49B /* UIKitSPI.h */,
index 6a1e287..5c4088c 100644 (file)
@@ -1,3 +1,14 @@
+2018-06-27  Jonathan Bedard  <jbedard@apple.com>
+
+        Enable WebKit iOS 12 build
+        https://bugs.webkit.org/show_bug.cgi?id=187024
+        <rdar://problem/39759057>
+
+        Reviewed by David Kilzer.
+
+        * Scripts/configure-xcode-for-ios-development:
+        (copyMissingHeadersFromSDKToSDKIfNeeded): Copy launch.h into embedded SDKs.
+
 2018-06-27  Robin Morisset  <rmorisset@apple.com>
 
         [WSL] Add a control-flow stack to the execution rules in WSL.ott
index 14acdaa..0346cf0 100755 (executable)
@@ -75,6 +75,7 @@ sub copyMissingHeadersFromSDKToSDKIfNeeded($$)
 {
     my @missingHeaders = qw(
         /usr/include/crt_externs.h
+        /usr/include/launch.h
         /usr/include/MacErrors.h
         /usr/include/mach/mach_types.defs
         /usr/include/mach/machine/machine_types.defs
index fbd7d76..0db108f 100644 (file)
@@ -1,3 +1,13 @@
+2018-06-27  Jonathan Bedard  <jbedard@apple.com>
+
+        Enable WebKit iOS 12 build
+        https://bugs.webkit.org/show_bug.cgi?id=187024
+        <rdar://problem/39759057>
+
+        Reviewed by David Kilzer.
+
+        * WebKitPrivateFrameworkStubs/iOS/12: Added.
+
 2018-05-24  Joseph Pecoraro  <pecoraro@apple.com>
 
         [iOS] Hard link AppSupport instead of soft linking
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/AppSupport.framework/AppSupport.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/AppSupport.framework/AppSupport.tbd
new file mode 100644 (file)
index 0000000..48e5a5f
--- /dev/null
@@ -0,0 +1,20 @@
+--- !tapi-tbd-v2
+archs:
+  - arm64
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    symbols:
+      - _CPCopyBundleIdentifierFromAuditToken
+    objc-classes:
+      - _CPNetworkObserver
+install-name: /System/Library/PrivateFrameworks/AppSupport.framework/AppSupport
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/AssertionServices.framework/AssertionServices.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/AssertionServices.framework/AssertionServices.tbd
new file mode 100644 (file)
index 0000000..ed2903f
--- /dev/null
@@ -0,0 +1,22 @@
+--- !tapi-tbd-v2
+archs:
+  - arm64
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    objc-classes:
+      - _BKSApplicationStateMonitor
+      - _BKSProcessAssertion
+    symbols:
+      - _BKSApplicationStateMostElevatedStateForProcessIDKey
+      - _BKSApplicationStateProcessIDKey
+install-name: /System/Library/PrivateFrameworks/AssertionServices.framework/AssertionServices
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/CorePDF.framework/CorePDF.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/CorePDF.framework/CorePDF.tbd
new file mode 100644 (file)
index 0000000..103e089
--- /dev/null
@@ -0,0 +1,21 @@
+--- !tapi-tbd-v2
+archs:
+  - arm64
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    objc-classes:
+      - _UIPDFDocument
+      - _UIPDFLinkAnnotation
+      - _UIPDFPageView
+      - _UIPDFSelection
+install-name: /System/Library/PrivateFrameworks/CorePDF.framework/CorePDF
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/CorePrediction.framework/CorePrediction.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/CorePrediction.framework/CorePrediction.tbd
new file mode 100644 (file)
index 0000000..e2995fe
--- /dev/null
@@ -0,0 +1,19 @@
+--- !tapi-tbd-v2
+archs:
+  - arm64
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    symbols:
+      - _svm_load_model
+      - _svm_predict_values
+install-name: /System/Library/PrivateFrameworks/CorePrediction.framework/CorePrediction
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/DeviceIdentity.framework/DeviceIdentity.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/DeviceIdentity.framework/DeviceIdentity.tbd
new file mode 100644 (file)
index 0000000..3cf4464
--- /dev/null
@@ -0,0 +1,30 @@
+--- !tapi-tbd-v2
+archs:
+  - armv7
+  - armv7s
+  - arm64
+  - i386
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    symbols:
+      - _DeviceIdentityIssueClientCertificateWithCompletion
+      - _kMAOptionsBAAAccessControls
+      - _kMAOptionsBAAIgnoreExistingKeychainItems
+      - _kMAOptionsBAAKeychainAccessGroup
+      - _kMAOptionsBAAKeychainLabel
+      - _kMAOptionsBAANonce
+      - _kMAOptionsBAAOIDNonce
+      - _kMAOptionsBAAOIDSToInclude
+      - _kMAOptionsBAASCRTAttestation
+      - _kMAOptionsBAAValidity
+install-name: /System/Library/PrivateFrameworks/DeviceIdentity.framework/DeviceIdentity
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/GraphicsServices.framework/GraphicsServices.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/GraphicsServices.framework/GraphicsServices.tbd
new file mode 100644 (file)
index 0000000..ab1c406
--- /dev/null
@@ -0,0 +1,25 @@
+--- !tapi-tbd-v2
+archs:
+  - armv7
+  - armv7s
+  - arm64
+  - i386
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    symbols:
+      - _GSCurrentEventTimestamp
+      - _GSFontInitialize
+      - _GSFontPurgeFontCache
+      - _GSInitialize
+      - _GSSystemRootDirectory
+install-name: /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/IOSurfaceAccelerator.framework/IOSurfaceAccelerator.tbd
new file mode 100644 (file)
index 0000000..23d3bce
--- /dev/null
@@ -0,0 +1,24 @@
+--- !tapi-tbd-v2
+archs:
+  - armv7
+  - armv7s
+  - arm64
+  - i386
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    symbols:
+      - _IOSurfaceAcceleratorCreate
+      - _IOSurfaceAcceleratorGetRunLoopSource
+      - _IOSurfaceAcceleratorTransformSurface
+      - _kIOSurfaceAcceleratorUnwireSurfaceKey
+install-name: /System/Library/PrivateFrameworks/IOSurfaceAccelerator.framework/IOSurfaceAccelerator
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/SafariSafeBrowsing.framework/SafariSafeBrowsing.tbd
new file mode 100644 (file)
index 0000000..c195839
--- /dev/null
@@ -0,0 +1,29 @@
+--- !tapi-tbd-v2
+archs:
+  - armv7
+  - armv7s
+  - arm64
+  - i386
+  - x86_64
+exports:
+  -
+    archs:
+      - armv7
+      - armv7s
+      - arm64
+      - i386
+      - x86_64
+    symbols:
+      - _SSBProviderGoogle
+      - _SSBProviderTencent
+      - __ZN12SafeBrowsing7Service4mainEv
+    objc-classes:
+      - _SSBLookupContext
+      - _SSBLookupResult
+      - _SSBServiceLookupResult
+install-name: /System/Library/PrivateFrameworks/SafariSafeBrowsing.framework/SafariSafeBrowsing
+current-version: 0
+compatibility-version: 0
+objc-constraint: none
+platform: ios
+...
diff --git a/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/URLFormatting.framework/URLFormatting.tbd b/WebKitLibraries/WebKitPrivateFrameworkStubs/iOS/12/URLFormatting.framework/URLFormatting.tbd
new file mode 100644 (file)
index 0000000..33663df
--- /dev/null
@@ -0,0 +1,9 @@
+--- !tapi-tbd-v2
+archs:
+  - arm64
+  - x86_64
+install-name: /System/Library/PrivateFrameworks/URLFormatting.framework/URLFormatting
+current-version: 59.88
+objc-constraint: none
+platform: ios
+...