Provide UIView and UIImage for zoom transition
authordino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2018 20:38:01 +0000 (20:38 +0000)
committerdino@apple.com <dino@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 15 May 2018 20:38:01 +0000 (20:38 +0000)
https://bugs.webkit.org/show_bug.cgi?id=185655
<rdar://problem/40267224>

Reviewed by Antoine Quint.

Provide a UIView* for the frameForPreviewItem to use as a source view.
Also implement the transitionImageForPreviewItem delegate, even though
we're returning nil.

* UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
(-[_WKPreviewControllerDelegate previewController:frameForPreviewItem:inSourceView:]):
(-[_WKPreviewControllerDelegate previewController:transitionImageForPreviewItem:contentRect:]):

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

Source/WebKit/ChangeLog
Source/WebKit/UIProcess/Cocoa/SystemPreviewControllerCocoa.mm

index 019db90..776f0c9 100644 (file)
@@ -1,3 +1,19 @@
+2018-05-15  Dean Jackson  <dino@apple.com>
+
+        Provide UIView and UIImage for zoom transition
+        https://bugs.webkit.org/show_bug.cgi?id=185655
+        <rdar://problem/40267224>
+
+        Reviewed by Antoine Quint.
+
+        Provide a UIView* for the frameForPreviewItem to use as a source view.
+        Also implement the transitionImageForPreviewItem delegate, even though
+        we're returning nil.
+
+        * UIProcess/Cocoa/SystemPreviewControllerCocoa.mm:
+        (-[_WKPreviewControllerDelegate previewController:frameForPreviewItem:inSourceView:]):
+        (-[_WKPreviewControllerDelegate previewController:transitionImageForPreviewItem:contentRect:]):
+
 2018-05-15  Daniel Bates  <dabates@apple.com>
 
         Fix the Apple Internal build
index d5e7d18..14b92d8 100644 (file)
@@ -137,6 +137,7 @@ SOFT_LINK_CLASS(QuickLook, QLItem);
     if (!presentingViewController)
         return CGRectZero;
 
+    *view = presentingViewController.view;
     CGRect frame = presentingViewController.view.frame;
     // Create a smaller rectangle centered in the frame.
     CGFloat halfWidth = frame.size.width / 2;
@@ -145,6 +146,11 @@ SOFT_LINK_CLASS(QuickLook, QLItem);
     return frame;
 }
 
+- (UIImage *)previewController:(QLPreviewController *)controller transitionImageForPreviewItem:(id <QLPreviewItem>)item contentRect:(CGRect *)contentRect
+{
+    return nil;
+}
+
 @end
 
 namespace WebKit {