Title: [250670] branches/safari-608-branch/Source/WebKit
Revision
250670
Author
[email protected]
Date
2019-10-03 12:34:36 -0700 (Thu, 03 Oct 2019)

Log Message

Cherry-pick r250619. rdar://problem/55927263

    Provide originating website URL to AR QuickLook
    https://bugs.webkit.org/show_bug.cgi?id=202451

    Reviewed by Antoine Quint.

    Declare the setAdditionalParameters method and
    call it with the originating page URL if available.

    * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:

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

Modified Paths

Diff

Modified: branches/safari-608-branch/Source/WebKit/ChangeLog (250669 => 250670)


--- branches/safari-608-branch/Source/WebKit/ChangeLog	2019-10-03 19:34:34 UTC (rev 250669)
+++ branches/safari-608-branch/Source/WebKit/ChangeLog	2019-10-03 19:34:36 UTC (rev 250670)
@@ -1,5 +1,33 @@
 2019-10-02  Alan Coon  <[email protected]>
 
+        Cherry-pick r250619. rdar://problem/55927263
+
+    Provide originating website URL to AR QuickLook
+    https://bugs.webkit.org/show_bug.cgi?id=202451
+    
+    Reviewed by Antoine Quint.
+    
+    Declare the setAdditionalParameters method and
+    call it with the originating page URL if available.
+    
+    * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
+    
+    git-svn-id: https://svn.webkit.org/repository/webkit/trunk@250619 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+    2019-10-02  Dean Jackson  <[email protected]>
+
+            Provide originating website URL to AR QuickLook
+            https://bugs.webkit.org/show_bug.cgi?id=202451
+
+            Reviewed by Antoine Quint.
+
+            Declare the setAdditionalParameters method and
+            call it with the originating page URL if available.
+
+            * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
+
+2019-10-02  Alan Coon  <[email protected]>
+
         Cherry-pick r249855. rdar://problem/55927247
 
     Provide a prototype for AR QuickLook to trigger processing in the originating page

Modified: branches/safari-608-branch/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm (250669 => 250670)


--- branches/safari-608-branch/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm	2019-10-03 19:34:34 UTC (rev 250669)
+++ branches/safari-608-branch/Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm	2019-10-03 19:34:36 UTC (rev 250670)
@@ -47,7 +47,12 @@
 SOFT_LINK_CLASS(AssetViewer, ARQuickLookWebKitItem);
 
 @protocol ARQuickLookWebKitItemDelegate;
+static NSString * const _WKARQLWebsiteURLParameterKey = @"ARQLWebsiteURLParameterKey";
 
+@interface ARQuickLookWebKitItem ()
+- (void)setAdditionalParameters:(NSDictionary *)parameters;
+@end
+
 @interface _WKPreviewControllerDataSource : NSObject <QLPreviewControllerDataSource, ARQuickLookWebKitItemDelegate> {
 #else
 @interface _WKPreviewControllerDataSource : NSObject <QLPreviewControllerDataSource> {
@@ -110,6 +115,12 @@
 
     _item = [allocARQuickLookWebKitItemInstance() initWithPreviewItemProvider:_itemProvider.get() contentType:contentType previewTitle:@"Preview" fileSize:@(0) previewItem:previewItem];
     [_item setDelegate:self];
+
+    if ([_item respondsToSelector:(@selector(setAdditionalParameters:))]) {
+        NSURL *urlParameter = _originatingPageURL;
+        [_item setAdditionalParameters:@{ _WKARQLWebsiteURLParameterKey: urlParameter }];
+    }
+
 #else
     _item = adoptNS([PAL::allocQLItemInstance() initWithPreviewItemProvider:_itemProvider.get() contentType:contentType previewTitle:@"Preview" fileSize:@(0)]);
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to