Fix PDFKit references in TestWebKitAPI
authorkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2019 14:13:28 +0000 (14:13 +0000)
committerkrollin@apple.com <krollin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 12 Sep 2019 14:13:28 +0000 (14:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=201700
<rdar://problem/55279539>

Reviewed by Youenn Fablet.

These references fail in watchOS and tvOS, so remove them on those
platforms.

* TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm:
* TestWebKitAPI/cocoa/TestPDFDocument.h:
* TestWebKitAPI/cocoa/TestPDFDocument.mm:
* TestWebKitAPI/config.h:

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

Tools/ChangeLog
Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig
Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj
Tools/TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm
Tools/TestWebKitAPI/cocoa/TestPDFDocument.h
Tools/TestWebKitAPI/cocoa/TestPDFDocument.mm
Tools/TestWebKitAPI/config.h

index 4d7c720..5effec2 100644 (file)
@@ -1,3 +1,21 @@
+2019-09-12  Keith Rollin  <krollin@apple.com>
+
+        Fix PDFKit references in TestWebKitAPI
+        https://bugs.webkit.org/show_bug.cgi?id=201700
+        <rdar://problem/55279539>
+
+        Reviewed by Youenn Fablet.
+
+        These references fail in watchOS and tvOS, so remove them on those
+        platforms.
+
+        * TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:
+        * TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
+        * TestWebKitAPI/Tests/WebKitCocoa/PDFSnapshot.mm:
+        * TestWebKitAPI/cocoa/TestPDFDocument.h:
+        * TestWebKitAPI/cocoa/TestPDFDocument.mm:
+        * TestWebKitAPI/config.h:
+
 2019-09-11  Fujii Hironori  <Hironori.Fujii@sony.com>
 
         [Win][MiniBrowser] Select all text in the URL bar by clicking it
index a0ba298..6a6c56f 100644 (file)
@@ -45,7 +45,13 @@ WK_AUTHKIT_LDFLAGS_IOS_SINCE_13 = -framework AuthKit;
 WK_AUTHKIT_LDFLAGS_macosx = $(WK_AUTHKIT_LDFLAGS$(WK_MACOS_1015));
 WK_AUTHKIT_LDFLAGS_MACOS_SINCE_1015 = -framework AuthKit;
 
-OTHER_LDFLAGS = $(inherited) $(UNEXPORTED_SYMBOL_LDFLAGS) -lgtest -force_load $(BUILT_PRODUCTS_DIR)/libTestWebKitAPI.a -framework JavaScriptCore -framework WebKit -lWebCoreTestSupport $(WK_AUTHKIT_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM);
+WK_PDFKIT_LDFLAGS = $(WK_PDFKIT_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_PDFKIT_LDFLAGS_macosx = -framework PDFKit;
+WK_PDFKIT_LDFLAGS_maccatalyst = -framework PDFKit;
+WK_PDFKIT_LDFLAGS_iphoneos = -framework PDFKit;
+WK_PDFKIT_LDFLAGS_iphonesimulator = -framework PDFKit;
+
+OTHER_LDFLAGS = $(inherited) $(UNEXPORTED_SYMBOL_LDFLAGS) -lgtest -force_load $(BUILT_PRODUCTS_DIR)/libTestWebKitAPI.a -framework JavaScriptCore -framework WebKit -lWebCoreTestSupport $(WK_AUTHKIT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM);
 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = -framework Cocoa -framework Carbon;
 
 // FIXME: This should not be built on iOS. Instead we should create and use a TestWebKitAPI application.
index c0ae05d..1912135 100644 (file)
                515BE1711D428E4B00DD7C68 /* StoreBlobThenDelete.mm in Sources */ = {isa = PBXBuildFile; fileRef = 515BE1701D428BD100DD7C68 /* StoreBlobThenDelete.mm */; };
                516281252325C18000BB7E42 /* TestPDFDocument.mm in Sources */ = {isa = PBXBuildFile; fileRef = 516281242325C17B00BB7E42 /* TestPDFDocument.mm */; };
                516281272325C19800BB7E42 /* PDFSnapshot.mm in Sources */ = {isa = PBXBuildFile; fileRef = 516281262325C19100BB7E42 /* PDFSnapshot.mm */; };
-               516281292325C45400BB7E42 /* PDFKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 516281282325C45400BB7E42 /* PDFKit.framework */; };
                5165FE04201EE620009F7EC3 /* MessagePortProviders.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5165FE03201EE617009F7EC3 /* MessagePortProviders.mm */; };
                51714EB41CF8C78C004723C4 /* WebProcessKillIDBCleanup-1.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51714EB21CF8C761004723C4 /* WebProcessKillIDBCleanup-1.html */; };
                51714EB51CF8C78C004723C4 /* WebProcessKillIDBCleanup-2.html in Copy Resources */ = {isa = PBXBuildFile; fileRef = 51714EB31CF8C761004723C4 /* WebProcessKillIDBCleanup-2.html */; };
                                5CFACF63226F73C60056C7D0 /* libboringssl.a in Frameworks */,
                                7C83E03F1D0A61A000FEBCF3 /* libicucore.dylib in Frameworks */,
                                578CBD67204FB2C80083B9F2 /* LocalAuthentication.framework in Frameworks */,
-                               516281292325C45400BB7E42 /* PDFKit.framework in Frameworks */,
                                7A010BCD1D877C0D00EDE72A /* QuartzCore.framework in Frameworks */,
                                574F55D2204D47F0002948C6 /* Security.framework in Frameworks */,
                        );
index 8422f32..ba0779d 100644 (file)
@@ -25,6 +25,8 @@
 
 #import "config.h"
 
+#if HAVE(PDFKIT)
+
 #import "PlatformUtilities.h"
 #import "Test.h"
 #import "TestPDFDocument.h"
@@ -236,3 +238,4 @@ TEST(PDFSnapshot, InlineLinks)
 
 }
 
+#endif // HAVE(PDFKIT)
index 04c1e88..639f6a0 100644 (file)
@@ -25,6 +25,8 @@
 
 #pragma once
 
+#if HAVE(PDFKIT)
+
 #import <PDFKit/PDFKit.h>
 #import <wtf/RefCounted.h>
 #import <wtf/RetainPtr.h>
@@ -87,3 +89,4 @@ private:
 };
 
 } // namespace TestWebKitAPI
+#endif // HAVE(PDFKIT)
index 5054170..2ec6b32 100644 (file)
@@ -26,6 +26,8 @@
 #import "config.h"
 #import "TestPDFDocument.h"
 
+#if HAVE(PDFKIT)
+
 #import <WebCore/ColorMac.h>
 #import <pal/spi/cg/CoreGraphicsSPI.h>
 
@@ -174,3 +176,5 @@ TestPDFPage* TestPDFDocument::page(size_t index)
 }
 
 } // namespace TestWebKitAPI
+
+#endif // HAVE(PDFKIT)
index 003f90a..5aef73d 100644 (file)
 #if !PLATFORM(APPLETV)
 #define HAVE_SSL 1
 #endif
+
+#if PLATFORM(MAC) || PLATFORM(IOS)
+#define HAVE_PDFKIT 1
+#endif