Title: [281599] trunk/Source/WebKit
- Revision
- 281599
- Author
- [email protected]
- Date
- 2021-08-25 16:39:10 -0700 (Wed, 25 Aug 2021)
Log Message
[iOS] Visual Look Up animates from the wrong rect when the web view is scaled
https://bugs.webkit.org/show_bug.cgi?id=229518
rdar://82147473
Reviewed by Darin Adler.
When adopting QLPreviewControllerDelegate's animated transition methods for rdar://76020349, I mistakenly
thought that the `outContentRect` passed into `-previewController:transitionImageForPreviewItem:contentRect:`
would be in source view (WKContentView) coordinates; instead, QuickLook expects this `contentRect` to be in
window coordinates.
Fix this by first converting `_visualSearchPreviewImageBounds` to window coordinates.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]):
Modified Paths
Diff
Modified: trunk/Source/WebKit/ChangeLog (281598 => 281599)
--- trunk/Source/WebKit/ChangeLog 2021-08-25 23:15:48 UTC (rev 281598)
+++ trunk/Source/WebKit/ChangeLog 2021-08-25 23:39:10 UTC (rev 281599)
@@ -1,3 +1,21 @@
+2021-08-25 Wenson Hsieh <[email protected]>
+
+ [iOS] Visual Look Up animates from the wrong rect when the web view is scaled
+ https://bugs.webkit.org/show_bug.cgi?id=229518
+ rdar://82147473
+
+ Reviewed by Darin Adler.
+
+ When adopting QLPreviewControllerDelegate's animated transition methods for rdar://76020349, I mistakenly
+ thought that the `outContentRect` passed into `-previewController:transitionImageForPreviewItem:contentRect:`
+ would be in source view (WKContentView) coordinates; instead, QuickLook expects this `contentRect` to be in
+ window coordinates.
+
+ Fix this by first converting `_visualSearchPreviewImageBounds` to window coordinates.
+
+ * UIProcess/ios/WKContentViewInteraction.mm:
+ (-[WKContentView previewController:transitionImageForPreviewItem:contentRect:]):
+
2021-08-25 Eric Carlson <[email protected]>
[GPUP] RemoteAudioSession doesn't implement begin/endInterruption
Modified: trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (281598 => 281599)
--- trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-08-25 23:15:48 UTC (rev 281598)
+++ trunk/Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm 2021-08-25 23:39:10 UTC (rev 281599)
@@ -10050,7 +10050,7 @@
- (UIImage *)previewController:(QLPreviewController *)controller transitionImageForPreviewItem:(id <QLPreviewItem>)item contentRect:(CGRect *)outContentRect
{
- *outContentRect = CGRect { CGPointZero, _visualSearchPreviewImageBounds.size };
+ *outContentRect = { CGPointZero, [self convertRect:_visualSearchPreviewImageBounds toView:nil].size };
return _visualSearchPreviewImage.get();
}
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes