Title: [222620] trunk/Source/WebKit
Revision
222620
Author
[email protected]
Date
2017-09-28 11:40:41 -0700 (Thu, 28 Sep 2017)

Log Message

Request for PDF URL targets for specific pages, sections, etc.
https://bugs.webkit.org/show_bug.cgi?id=177582
<rdar://problem/5692679>

Patch by Aishwarya Nirmal <[email protected]> on 2017-09-28
Reviewed by Tim Horton.

This change sets the URL fragment for scroll anchoring in PDFs.

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

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (222619 => 222620)


--- trunk/Source/WebKit/ChangeLog	2017-09-28 18:37:22 UTC (rev 222619)
+++ trunk/Source/WebKit/ChangeLog	2017-09-28 18:40:41 UTC (rev 222620)
@@ -1,3 +1,17 @@
+2017-09-28  Aishwarya Nirmal  <[email protected]>
+
+        Request for PDF URL targets for specific pages, sections, etc.
+        https://bugs.webkit.org/show_bug.cgi?id=177582
+        <rdar://problem/5692679>
+
+        Reviewed by Tim Horton.
+        
+        This change sets the URL fragment for scroll anchoring in PDFs.
+
+        * WebProcess/Plugins/PDF/PDFLayerControllerSPI.h:
+        * WebProcess/Plugins/PDF/PDFPlugin.mm:
+        (WebKit::PDFPlugin::pdfDocumentDidLoad):
+
 2017-09-28  Ross Kirsling  <[email protected]>
 
         [PAL] Move HysteresisActivity into PAL

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h (222619 => 222620)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h	2017-09-28 18:37:22 UTC (rev 222619)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFLayerControllerSPI.h	2017-09-28 18:40:41 UTC (rev 222620)
@@ -68,6 +68,9 @@
 @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;
 

Modified: trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm (222619 => 222620)


--- trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2017-09-28 18:37:22 UTC (rev 222619)
+++ trunk/Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm	2017-09-28 18:40:41 UTC (rev 222620)
@@ -1032,8 +1032,13 @@
 
     if ([document isLocked])
         createPasswordEntryForm();
+
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101304
+    String pdfURLFragment = webFrame()->url().fragmentIdentifier();
+    [m_pdfLayerController setURLFragment:pdfURLFragment];
+#endif
 }
-
+    
 void PDFPlugin::streamDidReceiveResponse(uint64_t streamID, const URL&, uint32_t, uint32_t, const String& mimeType, const String&, const String& suggestedFilename)
 {
     ASSERT_UNUSED(streamID, streamID == pdfDocumentRequestID);
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to