Bug 229518 - [iOS] Visual Look Up animates from the wrong rect when the web view is scaled
Summary: [iOS] Visual Look Up animates from the wrong rect when the web view is scaled
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Wenson Hsieh
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-08-25 14:39 PDT by Wenson Hsieh
Modified: 2021-08-25 18:22 PDT (History)
6 users (show)

See Also:


Attachments
Patch (2.09 KB, patch)
2021-08-25 14:41 PDT, Wenson Hsieh
ews-feeder: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wenson Hsieh 2021-08-25 14:39:14 PDT
rdar://82147473
Comment 1 Wenson Hsieh 2021-08-25 14:41:02 PDT
Created attachment 436427 [details]
Patch
Comment 2 Darin Adler 2021-08-25 14:47:29 PDT
Comment on attachment 436427 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=436427&action=review

> Source/WebKit/ChangeLog:14
> +        Fix this by first converting `_visualSearchPreviewImageBounds` to window coordinates.

And dropping the origin, using only the size? Is that correct.
Comment 3 Wenson Hsieh 2021-08-25 14:52:41 PDT
Comment on attachment 436427 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=436427&action=review

>> Source/WebKit/ChangeLog:14
>> +        Fix this by first converting `_visualSearchPreviewImageBounds` to window coordinates.
> 
> And dropping the origin, using only the size? Is that correct.

Yes, I believe this is correct.

The `origin` of `outContentRect` is used to additionally offset the previewed item frame (in window coordinates), while the `size` replaces the size of the previewed item frame. In this case, `_visualSearchPreviewImageBounds` already provided the correct frame for the previewed item in the coordinate space of `sourceView` (WKContentView), so no additional offset is needed.
Comment 4 Wenson Hsieh 2021-08-25 16:11:52 PDT
Comment on attachment 436427 [details]
Patch

Thanks for the review!
Comment 5 EWS 2021-08-25 16:39:19 PDT
Committed r281599 (240960@main): <https://commits.webkit.org/240960@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 436427 [details].