[iOS] Upstream PLATFORM(IOS) changes to Source/WebKit/
[WebKit-https.git] / Source / WebKit / mac / WebView / WebPDFDocumentExtras.mm
index 592edf7..d46ed0a 100644 (file)
 #import "WebTypesInternal.h"
 #import <wtf/Vector.h>
 #import <wtf/RetainPtr.h>
-#import <PDFKit/PDFDocument.h>
-#import <objc/objc-runtime.h>
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED == 1050
-@interface PDFDocument (Internal)
-- (CGPDFDocumentRef)documentRef;
-@end
+#if !PLATFORM(IOS)
+#import <PDFKit/PDFDocument.h>
 #endif
 
 static void appendValuesInPDFNameSubtreeToVector(CGPDFDictionaryRef subtree, Vector<CGPDFObjectRef>& values)
@@ -111,7 +107,7 @@ NSArray *allScriptsInPDFDocument(PDFDocument *document)
         RetainPtr<CFDataRef> data;
         if (CGPDFDictionaryGetStream(javaScriptAction, "JS", &stream)) {
             CGPDFDataFormat format;
-            data.adoptCF(CGPDFStreamCopyData(stream, &format));
+            data = adoptCF(CGPDFStreamCopyData(stream, &format));
             if (!data)
                 continue;
             bytes = CFDataGetBytePtr(data.get());