Title: [219537] trunk
Revision
219537
Author
[email protected]
Date
2017-07-14 22:41:54 -0700 (Fri, 14 Jul 2017)

Log Message

Add iOS 11 SPI
https://bugs.webkit.org/show_bug.cgi?id=174430
<rdar://problem/33269288>

Reviewed by Tim Horton.

Source/WebCore:

* WebCore.xcodeproj/project.pbxproj: Add sqlite3SPI.h header.
* platform/ios/PlatformPasteboardIOS.mm: Move UIKit SPI to UIKitSPI.h.
* platform/ios/WebItemProviderPasteboard.mm: Ditto.
* platform/network/cf/FormDataStreamCFNet.cpp: Explicitly define fnfErr and remove
MacErrors.h header for iOS.
* platform/spi/cocoa/IOSurfaceSPI.h: IOSurface is no longer SPI in iOS 11.
* platform/spi/cocoa/PassKitSPI.h: Do not re-define setRequiredShippingContactFields
and setRequiredBillingContactFields in iOS 11.
* platform/spi/cocoa/QuartzCoreSPI.h: Added QuartzCoreSPI used in iOS 11.
* platform/spi/ios/UIKitSPI.h: Add drag-and-drop SPI.
* platform/spi/ios/sqlite3SPI.h: Define required sqlite3 macros.
* platform/sql/SQLiteFileSystem.cpp: Use sqlite3SPI.h.

Source/WebKit:

* Platform/spi/ios/UIKitSPI.h: Add drag-and-drop SPI for iOS 11.
* UIProcess/ios/WKContentViewInteraction.mm: Move UIKit SPI to UIKitSPI.h.

Source/WebKitLegacy:

* Storage/StorageTracker.cpp: sqlite3_private.h no longer exists in the iOS
Simulator SDK, explicitly define the required macro.

Source/WTF:

* Configurations/WTF.xcconfig: Exclude MachExceptions.def when building iOS 11 for
the iOS simulator.

Tools:

* TestWebKitAPI/Tests/ios/DataInteractionTests.mm: Define drag-and-drop API required for testing.
* TestWebKitAPI/ios/DataInteractionSimulator.h: Ditto.
* TestWebKitAPI/ios/DataInteractionSimulator.mm: Ditto.

Modified Paths

Added Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (219536 => 219537)


--- trunk/Source/WTF/ChangeLog	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WTF/ChangeLog	2017-07-15 05:41:54 UTC (rev 219537)
@@ -1,3 +1,14 @@
+2017-07-14  Jonathan Bedard  <[email protected]>
+
+        Add iOS 11 SPI
+        https://bugs.webkit.org/show_bug.cgi?id=174430
+        <rdar://problem/33269288>
+
+        Reviewed by Tim Horton.
+
+        * Configurations/WTF.xcconfig: Exclude MachExceptions.def when building iOS 11 for
+        the iOS simulator.
+
 2017-07-14  Commit Queue  <[email protected]>
 
         Unreviewed, rolling out r219510.

Modified: trunk/Source/WTF/Configurations/WTF.xcconfig (219536 => 219537)


--- trunk/Source/WTF/Configurations/WTF.xcconfig	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WTF/Configurations/WTF.xcconfig	2017-07-15 05:41:54 UTC (rev 219537)
@@ -29,4 +29,5 @@
 STRIP_INSTALLED_PRODUCT = NO;
 
 EXCLUDED_SOURCE_FILE_NAMES_ = MachExceptions.defs
-EXCLUDED_SOURCE_FILE_NAMES[sdk=iphoneos*] = $(EXCLUDED_SOURCE_FILE_NAMES_$(USE_INTERNAL_SDK))
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphone*] = $(EXCLUDED_SOURCE_FILE_NAMES_$(USE_INTERNAL_SDK))
+EXCLUDED_SOURCE_FILE_NAMES[sdk=iphonesimulator10*] =

Modified: trunk/Source/WebCore/ChangeLog (219536 => 219537)


--- trunk/Source/WebCore/ChangeLog	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/ChangeLog	2017-07-15 05:41:54 UTC (rev 219537)
@@ -1,3 +1,24 @@
+2017-07-14  Jonathan Bedard  <[email protected]>
+
+        Add iOS 11 SPI
+        https://bugs.webkit.org/show_bug.cgi?id=174430
+        <rdar://problem/33269288>
+
+        Reviewed by Tim Horton.
+
+        * WebCore.xcodeproj/project.pbxproj: Add sqlite3SPI.h header.
+        * platform/ios/PlatformPasteboardIOS.mm: Move UIKit SPI to UIKitSPI.h.
+        * platform/ios/WebItemProviderPasteboard.mm: Ditto.
+        * platform/network/cf/FormDataStreamCFNet.cpp: Explicitly define fnfErr and remove
+        MacErrors.h header for iOS.
+        * platform/spi/cocoa/IOSurfaceSPI.h: IOSurface is no longer SPI in iOS 11.
+        * platform/spi/cocoa/PassKitSPI.h: Do not re-define setRequiredShippingContactFields
+        and setRequiredBillingContactFields in iOS 11.
+        * platform/spi/cocoa/QuartzCoreSPI.h: Added QuartzCoreSPI used in iOS 11.
+        * platform/spi/ios/UIKitSPI.h: Add drag-and-drop SPI.
+        * platform/spi/ios/sqlite3SPI.h: Define required sqlite3 macros.
+        * platform/sql/SQLiteFileSystem.cpp: Use sqlite3SPI.h.
+
 2017-07-14  Zan Dobersek  <[email protected]>
 
         [GCrypt] Implement CryptoKeyRSA PKCS#8 exports

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (219536 => 219537)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2017-07-15 05:41:54 UTC (rev 219537)
@@ -1556,6 +1556,7 @@
 		31C0FF3E0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF3A0E4CEFAC007D6FE5 /* JSWebKitAnimationEvent.h */; };
 		31C0FF3F0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31C0FF3B0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.cpp */; };
 		31C0FF400E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h in Headers */ = {isa = PBXBuildFile; fileRef = 31C0FF3C0E4CEFAC007D6FE5 /* JSWebKitTransitionEvent.h */; };
+		31CBAF6C1F19868500849F73 /* SQLite3SPI.h in Headers */ = {isa = PBXBuildFile; fileRef = 31AA003F1EF44829009DFC06 /* SQLite3SPI.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31D591B316697A6C00E6BF02 /* PlugInClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D591B116697A6C00E6BF02 /* PlugInClient.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31DCD29D1AB4FBDE0072E817 /* AnimationTrigger.h in Headers */ = {isa = PBXBuildFile; fileRef = 31DCD29C1AB4FBDE0072E817 /* AnimationTrigger.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		31DCDF431DA1C45400EA5B93 /* ExtendedColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31DCDF411DA1C45400EA5B93 /* ExtendedColor.cpp */; };
@@ -9185,6 +9186,7 @@
 		31A795C31888B72400382F90 /* ANGLEInstancedArrays.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = ANGLEInstancedArrays.idl; sourceTree = "<group>"; };
 		31A795C41888BAD100382F90 /* JSANGLEInstancedArrays.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSANGLEInstancedArrays.cpp; sourceTree = "<group>"; };
 		31A795C51888BAD100382F90 /* JSANGLEInstancedArrays.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSANGLEInstancedArrays.h; sourceTree = "<group>"; };
+		31AA003F1EF44829009DFC06 /* SQLite3SPI.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SQLite3SPI.h; sourceTree = "<group>"; };
 		31AB4FFF122878A2001A7DB0 /* GraphicsContext3DIOS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GraphicsContext3DIOS.h; sourceTree = "<group>"; };
 		31B313DA1B69871600F2AABC /* NSURLConnectionSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSURLConnectionSPI.h; sourceTree = "<group>"; };
 		31B313DE1B6988C500F2AABC /* NSButtonCellSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NSButtonCellSPI.h; sourceTree = "<group>"; };
@@ -21051,6 +21053,7 @@
 		A172182419DE182B00464D17 /* ios */ = {
 			isa = PBXGroup;
 			children = (
+				31AA003F1EF44829009DFC06 /* SQLite3SPI.h */,
 				CE1252421A16C01A00864480 /* CoreUISPI.h */,
 				2DC4CF781D2DD98900ECCC94 /* DataDetectorsUISPI.h */,
 				CEC337AE1A46086D009B8523 /* GraphicsServicesSPI.h */,
@@ -29007,6 +29010,7 @@
 				37BAAE581980D1DD005DFE71 /* ProtectionSpace.h in Headers */,
 				514C76750CE923A1007EF3CD /* ProtectionSpaceBase.h in Headers */,
 				372ADA38197F47B900FC501E /* ProtectionSpaceCocoa.h in Headers */,
+				31CBAF6C1F19868500849F73 /* SQLite3SPI.h in Headers */,
 				51A052561058874000CC9E95 /* ProtectionSpaceHash.h in Headers */,
 				1AF8E11A1256592600230FF7 /* ProxyServer.h in Headers */,
 				FF945ECC161F7F3600971BC8 /* PseudoElement.h in Headers */,
@@ -30370,8 +30374,7 @@
 		1C09D0501E31C32900725F18 /* libPAL.a */ = {
 			isa = PBXReferenceProxy;
 			fileType = archive.ar;
-			name = libPAL.a;
-			path = lib.a;
+			path = libPAL.a;
 			remoteRef = 1C09D04F1E31C32900725F18 /* PBXContainerItemProxy */;
 			sourceTree = BUILT_PRODUCTS_DIR;
 		};

Modified: trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm (219536 => 219537)


--- trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/graphics/cocoa/IOSurface.mm	2017-07-15 05:41:54 UTC (rev 219537)
@@ -365,7 +365,7 @@
 
 IOSurfaceID IOSurface::surfaceID() const
 {
-#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000
+#if PLATFORM(IOS) && (!USE(APPLE_INTERNAL_SDK) || __IPHONE_OS_VERSION_MIN_REQUIRED < 110000)
     return 0;
 #else
     return IOSurfaceGetID(m_surface.get());

Modified: trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm (219536 => 219537)


--- trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/ios/PlatformPasteboardIOS.mm	2017-07-15 05:41:54 UTC (rev 219537)
@@ -30,6 +30,7 @@
 #import "Image.h"
 #import "Pasteboard.h"
 #import "SharedBuffer.h"
+#import "UIKitSPI.h"
 #import "URL.h"
 #import "WebItemProviderPasteboard.h"
 #import <MobileCoreServices/MobileCoreServices.h>
@@ -37,13 +38,6 @@
 #import <UIKit/UIPasteboard.h>
 #import <wtf/SoftLinking.h>
 
-#if ENABLE(DATA_INTERACTION)
-#import <UIKit/NSAttributedString+UIItemProvider.h>
-#import <UIKit/NSString+UIItemProvider.h>
-#import <UIKit/NSURL+UIItemProvider.h>
-#import <UIKit/UIImage+UIItemProvider.h>
-#endif
-
 SOFT_LINK_FRAMEWORK(UIKit)
 SOFT_LINK_CLASS(UIKit, UIImage)
 SOFT_LINK_CLASS(UIKit, UIPasteboard)

Modified: trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm (219536 => 219537)


--- trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/ios/WebItemProviderPasteboard.mm	2017-07-15 05:41:54 UTC (rev 219537)
@@ -31,12 +31,8 @@
 #import "UIKitSPI.h"
 #import <Foundation/NSProgress.h>
 #import <MobileCoreServices/MobileCoreServices.h>
-#import <UIKit/NSString+UIItemProvider.h>
-#import <UIKit/NSURL+UIItemProvider.h>
 #import <UIKit/UIColor.h>
 #import <UIKit/UIImage.h>
-#import <UIKit/UIItemProviderReading.h>
-#import <UIKit/UIItemProviderWriting.h>
 #import <WebCore/FileSystemIOS.h>
 #import <WebCore/Pasteboard.h>
 #import <wtf/BlockPtr.h>

Modified: trunk/Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp (219536 => 219537)


--- trunk/Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/network/cf/FormDataStreamCFNet.cpp	2017-07-15 05:41:54 UTC (rev 219537)
@@ -43,7 +43,7 @@
 #include <wtf/Threading.h>
 
 #if PLATFORM(IOS)
-#include <MacErrors.h>
+static const int fnfErr = -43;
 #elif PLATFORM(MAC)
 #include <CoreServices/CoreServices.h>
 #endif

Modified: trunk/Source/WebCore/platform/spi/cocoa/IOSurfaceSPI.h (219536 => 219537)


--- trunk/Source/WebCore/platform/spi/cocoa/IOSurfaceSPI.h	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/spi/cocoa/IOSurfaceSPI.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -41,9 +41,11 @@
 
 typedef struct __IOSurface *IOSurfaceRef;
 
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000
 enum {
     kIOSurfaceLockReadOnly  = 0x00000001,
 };
+#endif
 
 #endif
 
@@ -88,8 +90,10 @@
 
 #else
 
-#if PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300
+#if (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000) || (PLATFORM(MAC) && __MAC_OS_X_VERSION_MAX_ALLOWED >= 101300)
+
 #import <IOSurface/IOSurfaceTypes.h>
+
 #else
 enum {
     kIOSurfacePurgeableNonVolatile = 0,

Modified: trunk/Source/WebCore/platform/spi/cocoa/PassKitSPI.h (219536 => 219537)


--- trunk/Source/WebCore/platform/spi/cocoa/PassKitSPI.h	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/spi/cocoa/PassKitSPI.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -299,7 +299,7 @@
 @property (nonatomic, strong) NSString *sourceApplicationSecondaryIdentifier;
 @property (nonatomic, strong) NSString *CTDataConnectionServiceType;
 
-#if !USE(APPLE_INTERNAL_SDK)
+#if (PLATFORM(MAC) && !USE(APPLE_INTERNAL_SDK)) || (PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 110000)
 - (void)setRequiredShippingContactFields:(nonnull NSSet *)contactInformation;
 - (void)setRequiredBillingContactFields:(nonnull NSSet *)contactInformation;
 #endif

Modified: trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h (219536 => 219537)


--- trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/spi/cocoa/QuartzCoreSPI.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -125,10 +125,16 @@
     kCATransactionPhasePreLayout,
     kCATransactionPhasePreCommit,
     kCATransactionPhasePostCommit,
+    kCATransactionPhaseNull = ~0u
 } CATransactionPhase;
 
 @interface CATransaction ()
 + (void)addCommitHandler:(void(^)(void))block forPhase:(CATransactionPhase)phase;
+
+#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
++ (CATransactionPhase)currentPhase;
+#endif
+
 @end
 
 @interface CALayerHost : CALayer

Copied: trunk/Source/WebCore/platform/spi/ios/SQLite3SPI.h (from rev 219536, trunk/Source/WebCore/platform/spi/ios/UIKitSPI.h) (0 => 219537)


--- trunk/Source/WebCore/platform/spi/ios/SQLite3SPI.h	                        (rev 0)
+++ trunk/Source/WebCore/platform/spi/ios/SQLite3SPI.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2017 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)
+
+#include <sqlite3_private.h>
+
+#else
+
+#define SQLITE_FCNTL_TRUNCATE_DATABASE 101
+#define SQLITE_TRUNCATE_DATABASE SQLITE_FCNTL_TRUNCATE_DATABASE
+
+#endif

Modified: trunk/Source/WebCore/platform/spi/ios/UIKitSPI.h (219536 => 219537)


--- trunk/Source/WebCore/platform/spi/ios/UIKitSPI.h	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/spi/ios/UIKitSPI.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -32,6 +32,10 @@
 #import <UIKit/UIViewController_Private.h>
 
 #if ENABLE(DATA_INTERACTION)
+#import <UIKit/NSAttributedString+UIItemProvider.h>
+#import <UIKit/NSString+UIItemProvider.h>
+#import <UIKit/NSURL+UIItemProvider.h>
+#import <UIKit/UIImage+UIItemProvider.h>
 #import <UIKit/UIItemProvider_Private.h>
 #endif
 
@@ -43,6 +47,8 @@
 
 #import <UIKit/UIKit.h>
 
+NS_ASSUME_NONNULL_BEGIN
+
 typedef NS_ENUM(NSInteger, UIApplicationSceneClassicMode) {
     UIApplicationSceneClassicModeOriginalPad = 4,
 };
@@ -76,4 +82,52 @@
 + (UIViewController *)viewControllerForView:(UIView *)view;
 @end
 
+NS_ASSUME_NONNULL_END
+
+#if __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
+@interface NSURL ()
+@property (nonatomic, copy, nullable, setter=_setTitle:) NSString *_title;
+@end
 #endif
+
+#if ENABLE(DATA_INTERACTION)
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface UIItemProvider : NSItemProvider
+@property (nonatomic) CGSize estimatedDisplayedSize;
+@end
+
+#define UIItemProviderRepresentationOptionsVisibilityAll NSItemProviderRepresentationVisibilityAll
+
+@protocol UIItemProviderReading <NSItemProviderReading>
+
+@required
+- (nullable instancetype)initWithItemProviderData:(NSData *)data typeIdentifier:(NSString *)typeIdentifier error:(NSError **)outError;
+
+@end
+
+@protocol UIItemProviderWriting <NSItemProviderWriting>
+
+@required
+- (NSProgress * _Nullable)loadDataWithTypeIdentifier:(NSString *)typeIdentifier forItemProviderCompletionHandler:(void (^)(NSData * _Nullable, NSError * _Nullable))completionHandler;
+
+@end
+
+@interface NSAttributedString () <UIItemProviderReading, UIItemProviderWriting>
+@end
+
+@interface NSString () <UIItemProviderReading, UIItemProviderWriting>
+@end
+
+@interface NSURL () <UIItemProviderReading, UIItemProviderWriting>
+@end
+
+@interface UIImage () <UIItemProviderReading, UIItemProviderWriting>
+@end
+
+NS_ASSUME_NONNULL_END
+
+#endif
+
+#endif

Modified: trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp (219536 => 219537)


--- trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebCore/platform/sql/SQLiteFileSystem.cpp	2017-07-15 05:41:54 UTC (rev 219537)
@@ -37,7 +37,7 @@
 #include <sqlite3.h>
 
 #if PLATFORM(IOS)
-#include <sqlite3_private.h>
+#include "SQLite3SPI.h"
 #endif
 
 namespace WebCore {

Modified: trunk/Source/WebKit/ChangeLog (219536 => 219537)


--- trunk/Source/WebKit/ChangeLog	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebKit/ChangeLog	2017-07-15 05:41:54 UTC (rev 219537)
@@ -1,3 +1,14 @@
+2017-07-14  Jonathan Bedard  <[email protected]>
+
+        Add iOS 11 SPI
+        https://bugs.webkit.org/show_bug.cgi?id=174430
+        <rdar://problem/33269288>
+
+        Reviewed by Tim Horton.
+
+        * Platform/spi/ios/UIKitSPI.h: Add drag-and-drop SPI for iOS 11.
+        * UIProcess/ios/WKContentViewInteraction.mm: Move UIKit SPI to UIKitSPI.h.
+
 2017-07-14  Jeff Miller  <[email protected]>
 
         -[WKWebProcessBundleParameters setParametersForKeyWithDictionary:] passing wrong parameters to -setParameter:forKey

Modified: trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h (219536 => 219537)


--- trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebKit/Platform/spi/ios/UIKitSPI.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -86,6 +86,19 @@
 #import <UIKit/UIItemProvider_Private.h>
 #endif
 
+#if ENABLE(DRAG_SUPPORT)
+#import <UIKit/UIDragInteraction.h>
+#import <UIKit/UIDragInteraction_Private.h>
+#import <UIKit/UIDragPreviewParameters.h>
+#import <UIKit/UIDragPreview_Private.h>
+#import <UIKit/UIDragSession.h>
+#import <UIKit/UIDragging.h>
+#import <UIKit/UIDropInteraction.h>
+#import <UIKit/UIPreviewInteraction.h>
+#import <UIKit/UIURLDragPreviewView.h>
+#import <UIKit/_UITextDragCaretView.h>
+#endif
+
 #else
 
 #if HAVE(LINK_PREVIEW)
@@ -315,7 +328,7 @@
 @end
 
 @interface UITapGestureRecognizer ()
-@property (nonatomic, getter=_allowableSeparation, setter=_setAllowableSeparation:) CGFloat allowableSeparation; 
+@property (nonatomic, getter=_allowableSeparation, setter=_setAllowableSeparation:) CGFloat allowableSeparation;
 @property (nonatomic, readonly) CGPoint location;
 @property (nonatomic) CGFloat allowableMovement;
 @property (nonatomic, readonly) CGPoint centroid;
@@ -848,6 +861,51 @@
 + (instancetype)actionWithTitle:(NSString *)title handler:(void (^)(UIViewControllerPreviewAction *action, UIViewController *previewViewController))handler;
 @end
 
+#if ENABLE(DRAG_SUPPORT)
+
+@interface UIItemProvider : NSItemProvider
+@property (nonatomic) CGSize estimatedDisplayedSize;
+@end
+
+WTF_EXTERN_C_BEGIN
+
+NSTimeInterval _UIDragInteractionDefaultLiftDelay();
+
+WTF_EXTERN_C_END
+
+typedef NS_OPTIONS(NSUInteger, UIDragOperation)
+{
+    UIDragOperationNone = 0,
+    UIDragOperationEvery = NSUIntegerMax,
+};
+
+@interface UIDragInteraction ()
+@property (nonatomic, assign, getter=_liftDelay, setter=_setLiftDelay:) NSTimeInterval liftDelay;
+@end
+
+@protocol UITextInput;
+@interface _UITextDragCaretView : UIView
+- (instancetype)initWithTextInputView:(UIView<UITextInput> *)textInputView;
+-(void)insertAtPosition:(UITextPosition *)position;
+-(void)updateToPosition:(UITextPosition *)position;
+-(void)remove;
+@end
+
+@interface UICalloutBar : UIView
++ (void)fadeSharedCalloutBar;
+@end
+
+@interface UIApplicationRotationFollowingWindow : UIWindow
+@end
+@interface UIAutoRotatingWindow : UIApplicationRotationFollowingWindow
+@end
+
+@interface UITextEffectsWindow : UIAutoRotatingWindow
++ (UITextEffectsWindow *)sharedTextEffectsWindow;
+@end
+
+#endif
+
 #endif // USE(APPLE_INTERNAL_SDK)
 
 @interface UIColor (IPI)

Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (219536 => 219537)


--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm	2017-07-15 05:41:54 UTC (rev 219537)
@@ -89,22 +89,11 @@
 #import <wtf/SoftLinking.h>
 
 #if ENABLE(DRAG_SUPPORT)
-// FIXME: Move private headers to UIKitSPI.h and add declarations as needed for building on OpenSource against the iOS 11 SDK.
-#import <UIKit/UIDragInteraction.h>
-#import <UIKit/UIDragInteraction_Private.h>
-#import <UIKit/UIDragPreviewParameters.h>
-#import <UIKit/UIDragPreview_Private.h>
-#import <UIKit/UIDragSession.h>
-#import <UIKit/UIDragging.h>
-#import <UIKit/UIDropInteraction.h>
-#import <UIKit/UIPreviewInteraction.h>
-#import <UIKit/UIURLDragPreviewView.h>
-#import <UIKit/_UITextDragCaretView.h>
 #import <WebCore/DragData.h>
 #import <WebCore/DragItem.h>
 #import <WebCore/PlatformPasteboard.h>
 #import <WebCore/WebItemProviderPasteboard.h>
-#endif // ENABLE(DRAG_SUPPORT)
+#endif
 
 @interface UIEvent(UIEventInternal)
 @property (nonatomic, assign) UIKeyboardInputFlags _inputFlags;

Modified: trunk/Source/WebKitLegacy/ChangeLog (219536 => 219537)


--- trunk/Source/WebKitLegacy/ChangeLog	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebKitLegacy/ChangeLog	2017-07-15 05:41:54 UTC (rev 219537)
@@ -1,3 +1,14 @@
+2017-07-14  Jonathan Bedard  <[email protected]>
+
+        Add iOS 11 SPI
+        https://bugs.webkit.org/show_bug.cgi?id=174430
+        <rdar://problem/33269288>
+
+        Reviewed by Tim Horton.
+
+        * Storage/StorageTracker.cpp: sqlite3_private.h no longer exists in the iOS
+        Simulator SDK, explicitly define the required macro.
+
 2017-07-13  Dan Bernstein  <[email protected]>
 
         Removed empty project directories left behind after the rename

Modified: trunk/Source/WebKitLegacy/Storage/StorageTracker.cpp (219536 => 219537)


--- trunk/Source/WebKitLegacy/Storage/StorageTracker.cpp	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Source/WebKitLegacy/Storage/StorageTracker.cpp	2017-07-15 05:41:54 UTC (rev 219537)
@@ -41,7 +41,7 @@
 #include <wtf/text/CString.h>
 
 #if PLATFORM(IOS)
-#include <sqlite3_private.h>
+#include <WebCore/SQLite3SPI.h>
 #endif
 
 using namespace WebCore;

Modified: trunk/Tools/ChangeLog (219536 => 219537)


--- trunk/Tools/ChangeLog	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Tools/ChangeLog	2017-07-15 05:41:54 UTC (rev 219537)
@@ -1,5 +1,17 @@
 2017-07-14  Jonathan Bedard  <[email protected]>
 
+        Add iOS 11 SPI
+        https://bugs.webkit.org/show_bug.cgi?id=174430
+        <rdar://problem/33269288>
+
+        Reviewed by Tim Horton.
+
+        * TestWebKitAPI/Tests/ios/DataInteractionTests.mm: Define drag-and-drop API required for testing.
+        * TestWebKitAPI/ios/DataInteractionSimulator.h: Ditto.
+        * TestWebKitAPI/ios/DataInteractionSimulator.mm: Ditto.
+
+2017-07-14  Jonathan Bedard  <[email protected]>
+
         Failing to install on iPad simulators
         https://bugs.webkit.org/show_bug.cgi?id=174532
         <rdar://problem/33328347>

Modified: trunk/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm (219536 => 219537)


--- trunk/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Tools/TestWebKitAPI/Tests/ios/DataInteractionTests.mm	2017-07-15 05:41:54 UTC (rev 219537)
@@ -32,10 +32,6 @@
 #import "TestWKWebView.h"
 #import "WKWebViewConfigurationExtras.h"
 #import <MobileCoreServices/MobileCoreServices.h>
-#import <UIKit/NSString+UIItemProvider.h>
-#import <UIKit/NSURL+UIItemProvider.h>
-#import <UIKit/UIImage+UIItemProvider.h>
-#import <UIKit/UIItemProvider_Private.h>
 #import <WebKit/WKPreferencesPrivate.h>
 #import <WebKit/WKProcessPoolPrivate.h>
 #import <WebKit/WKWebViewConfigurationPrivate.h>
@@ -44,7 +40,16 @@
 
 typedef void (^FileLoadCompletionBlock)(NSURL *, BOOL, NSError *);
 typedef void (^DataLoadCompletionBlock)(NSData *, NSError *);
+typedef void (^UIItemProviderDataLoadCompletionBlock)(NSData *, NSError *);
 
+@interface UIItemProviderRepresentationOptions : NSObject
+@end
+
+@interface UIItemProvider()
++ (UIItemProvider *)itemProviderWithURL:(NSURL *)url title:(NSString *)title;
+- (void) registerDataRepresentationForTypeIdentifier:(NSString *)typeIdentifier options:(UIItemProviderRepresentationOptions*)options loadHandler:(NSProgress * (^)(void (^UIItemProviderDataLoadCompletionBlock)(NSData *item, NSError *error))) loadHandler;
+@end
+
 static NSString *InjectedBundlePasteboardDataType = @"org.webkit.data";
 
 static UIImage *testIconImage()

Modified: trunk/Tools/TestWebKitAPI/ios/DataInteractionSimulator.h (219536 => 219537)


--- trunk/Tools/TestWebKitAPI/ios/DataInteractionSimulator.h	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Tools/TestWebKitAPI/ios/DataInteractionSimulator.h	2017-07-15 05:41:54 UTC (rev 219537)
@@ -23,10 +23,55 @@
  * THE POSSIBILITY OF SUCH DAMAGE.
  */
 
+#pragma once
+
 #if ENABLE(DATA_INTERACTION)
 
 #import "TestWKWebView.h"
+
+#if USE(APPLE_INTERNAL_SDK)
+#import <UIKit/NSString+UIItemProvider.h>
+#import <UIKit/NSURL+UIItemProvider.h>
+#import <UIKit/UIImage+UIItemProvider.h>
 #import <UIKit/UIItemProvider.h>
+#import <UIKit/UIItemProvider_Private.h>
+#else
+
+@interface NSURL ()
+@property (nonatomic, copy, setter=_setTitle:) NSString *_title;
+@end
+
+@interface UIItemProvider : NSItemProvider
+@property (nonatomic) CGSize estimatedDisplayedSize;
+@end
+
+#define UIItemProviderRepresentationOptionsVisibilityAll NSItemProviderRepresentationVisibilityAll
+
+@protocol UIItemProviderReading <NSItemProviderReading>
+
+@required
+- (instancetype)initWithItemProviderData:(NSData *)data typeIdentifier:(NSString *)typeIdentifier error:(NSError **)outError;
+
+@end
+
+@protocol UIItemProviderWriting <NSItemProviderWriting>
+
+@required
+- (NSProgress *)loadDataWithTypeIdentifier:(NSString *)typeIdentifier forItemProviderCompletionHandler:(void (^)(NSData *, NSError *))completionHandler;
+
+@end
+
+@interface NSAttributedString () <UIItemProviderReading, UIItemProviderWriting>
+@end
+@interface NSString () <UIItemProviderReading, UIItemProviderWriting>
+@end
+@interface NSURL () <UIItemProviderReading, UIItemProviderWriting>
+@end
+@interface UIImage () <UIItemProviderReading, UIItemProviderWriting>
+@end
+
+#endif
+
 #import <UIKit/UIKit.h>
 #import <WebKit/WKUIDelegatePrivate.h>
 #import <WebKit/_WKInputDelegate.h>

Modified: trunk/Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm (219536 => 219537)


--- trunk/Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm	2017-07-15 05:23:19 UTC (rev 219536)
+++ trunk/Tools/TestWebKitAPI/ios/DataInteractionSimulator.mm	2017-07-15 05:41:54 UTC (rev 219537)
@@ -30,11 +30,23 @@
 
 #import "InstanceMethodSwizzler.h"
 #import "PlatformUtilities.h"
+
 #import <UIKit/UIDragInteraction.h>
 #import <UIKit/UIDragItem.h>
+
+#if USE(APPLE_INTERNAL_SDK)
 #import <UIKit/UIDragSession.h>
 #import <UIKit/UIDragging.h>
-#import <UIKit/UIItemProvider_Private.h>
+#else
+
+@protocol UIDraggingInfo <NSObject>
+@end
+
+@interface UIDraggingSession : NSObject <UIDraggingInfo>
+@end
+
+#endif
+
 #import <WebKit/WKWebViewPrivate.h>
 #import <WebKit/_WKFocusedElementInfo.h>
 #import <WebKit/_WKFormInputSession.h>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to