[iOS] Enable WKPDFView by default
authoraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2018 01:20:43 +0000 (01:20 +0000)
committeraestes@apple.com <aestes@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Apr 2018 01:20:43 +0000 (01:20 +0000)
https://bugs.webkit.org/show_bug.cgi?id=184675
<rdar://problem/27885452>

Reviewed by Darin Adler.

Source/WebKit:

* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry init]):

Source/WTF:

* wtf/FeatureDefines.h:

Tools:

* TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:

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

Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm
Tools/ChangeLog
Tools/TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm

index 6e632b8..520e4e9 100644 (file)
@@ -1,3 +1,13 @@
+2018-04-16  Andy Estes  <aestes@apple.com>
+
+        [iOS] Enable WKPDFView by default
+        https://bugs.webkit.org/show_bug.cgi?id=184675
+        <rdar://problem/27885452>
+
+        Reviewed by Darin Adler.
+
+        * wtf/FeatureDefines.h:
+
 2018-04-16  Per Arne Vollan  <pvollan@apple.com>
 
         Deactivate the WindowServer connection for the WebContent process.
index 9080350..7bca41d 100644 (file)
@@ -167,7 +167,7 @@ the public iOS SDK. See <https://webkit.org/b/179167>. */
 #endif
 
 #if !defined(ENABLE_WKLEGACYPDFVIEW)
-#if PLATFORM(IOS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !ENABLE(MINIMAL_SIMULATOR)
+#if PLATFORM(IOS) && !PLATFORM(WATCHOS) && !PLATFORM(APPLETV) && !ENABLE(MINIMAL_SIMULATOR) && __IPHONE_OS_VERSION_MIN_REQUIRED < 120000
 #define ENABLE_WKLEGACYPDFVIEW 1
 #endif
 #endif
index 8b7b999..e23431f 100644 (file)
@@ -1,3 +1,14 @@
+2018-04-16  Andy Estes  <aestes@apple.com>
+
+        [iOS] Enable WKPDFView by default
+        https://bugs.webkit.org/show_bug.cgi?id=184675
+        <rdar://problem/27885452>
+
+        Reviewed by Darin Adler.
+
+        * UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
+        (-[WKWebViewContentProviderRegistry init]):
+
 2018-04-16  Brent Fulgham  <bfulgham@apple.com>
 
         [macOS] Don't establish unneeded Dock connections
index efb4eb9..23891ff 100644 (file)
@@ -31,6 +31,7 @@
 #if PLATFORM(IOS)
 
 #import "WKLegacyPDFView.h"
+#import "WKPDFView.h"
 #import "WKSystemPreviewView.h"
 #import "WKWebViewInternal.h"
 #import "WebPageProxy.h"
@@ -56,7 +57,10 @@ using namespace WebKit;
     if (!(self = [super init]))
         return nil;
 
-#if ENABLE(WKLEGACYPDFVIEW)
+#if ENABLE(WKPDFVIEW)
+    for (auto& mimeType : WebCore::MIMETypeRegistry::getPDFMIMETypes())
+        [self registerProvider:[WKPDFView class] forMIMEType:mimeType];
+#elif ENABLE(WKLEGACYPDFVIEW)
     for (auto& mimeType : WebCore::MIMETypeRegistry::getPDFMIMETypes())
         [self registerProvider:[WKLegacyPDFView class] forMIMEType:mimeType];
 #endif
index 50a316e..b0f6cd7 100644 (file)
@@ -1,3 +1,13 @@
+2018-04-16  Andy Estes  <aestes@apple.com>
+
+        [iOS] Enable WKPDFView by default
+        https://bugs.webkit.org/show_bug.cgi?id=184675
+        <rdar://problem/27885452>
+
+        Reviewed by Darin Adler.
+
+        * TestWebKitAPI/Tests/WebKitCocoa/WKPDFView.mm:
+
 2018-04-16  Leo Balter  <leonardo.balter@gmail.com>
 
         Perl-based Test262 runner
index 13c24d6..cea68fd 100644 (file)
@@ -26,7 +26,8 @@
 #import "config.h"
 #import <WebKit/WKFoundation.h>
 
-#if WK_API_ENABLED && TARGET_OS_IPHONE
+// FIXME: Enable these tests on iOS 12 once rdar://problem/39475542 is resolved.
+#if WK_API_ENABLED && TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED < 120000
 
 #import "PlatformUtilities.h"
 #import "TestNavigationDelegate.h"