Revise deployment target macros from r222620
authortimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 19:35:10 +0000 (19:35 +0000)
committertimothy_horton@apple.com <timothy_horton@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 28 Sep 2017 19:35:10 +0000 (19:35 +0000)
Rubber-stamped by Wenson Hsieh.

* WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::pdfDocumentDidLoad):

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

Source/WebKit/ChangeLog
Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h
Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm

index 43f1101..55e3ef7 100644 (file)
@@ -1,3 +1,13 @@
+2017-09-28  Timothy Horton  <timothy_horton@apple.com>
+
+        Revise deployment target macros from r222620
+
+        Rubber-stamped by Wenson Hsieh.
+
+        * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::pdfDocumentDidLoad):
+
 2017-09-28  Aishwarya Nirmal  <anirmal@apple.com>
 
         Request for PDF URL targets for specific pages, sections, etc.
index b200a4f..b907548 100644 (file)
@@ -68,9 +68,7 @@ typedef NS_ENUM(NSInteger, PDFLayerControllerCursorType) {
 @property (retain) CALayer *parentLayer;
 @property (retain) PDFDocument *document;
 @property (retain) id<PDFLayerControllerDelegate> delegate;
-#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101304
 @property (nonatomic, strong) NSString *URLFragment;
-#endif
 
 - (void)setFrameSize:(CGSize)size;
 
index ad20f0f..c7f9d35 100644 (file)
@@ -1033,9 +1033,11 @@ void PDFPlugin::pdfDocumentDidLoad()
     if ([document isLocked])
         createPasswordEntryForm();
 
-#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101304
-    String pdfURLFragment = webFrame()->url().fragmentIdentifier();
-    [m_pdfLayerController setURLFragment:pdfURLFragment];
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101300
+    if ([m_pdfLayerController respondsToSelector:@selector(setURLFragment:)]) {
+        String pdfURLFragment = webFrame()->url().fragmentIdentifier();
+        [m_pdfLayerController setURLFragment:pdfURLFragment];
+    }
 #endif
 }