| Summary: | [iOS] Visual Look Up animates from the wrong rect when the web view is scaled | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> | ||||
| Component: | Platform | Assignee: | Wenson Hsieh <wenson_hsieh> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | akeerthi, darin, hi, megan_gardner, thorton, webkit-bug-importer | ||||
| Priority: | P2 | Keywords: | InRadar | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Wenson Hsieh
2021-08-25 14:39:14 PDT
Created attachment 436427 [details]
Patch
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 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 on attachment 436427 [details]
Patch
Thanks for the review!
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]. |