Bug 227453 - Live Text selections inside images is misaligned when "object-fit" is not "fill"
Summary: Live Text selections inside images is misaligned when "object-fit" is not "fill"
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-06-28 09:40 PDT by Wenson Hsieh
Modified: 2021-06-28 14:45 PDT (History)
10 users (show)

See Also:


Attachments
Patch (19.56 KB, patch)
2021-06-28 10:06 PDT, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Patch (20.54 KB, patch)
2021-06-28 12:35 PDT, Wenson Hsieh
thorton: review+
Details | Formatted Diff | Diff
Patch for landing (20.54 KB, patch)
2021-06-28 14:02 PDT, Wenson Hsieh
no flags 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-06-28 09:40:55 PDT
On a Mac that supports live text:

1. Go to https://whsieh.github.io/examples/live-text
2. Try to select text in the images after the first
Comment 1 Wenson Hsieh 2021-06-28 10:06:53 PDT Comment hidden (obsolete)
Comment 2 Wenson Hsieh 2021-06-28 12:35:10 PDT
Created attachment 432414 [details]
Patch
Comment 3 Tim Horton 2021-06-28 13:10:25 PDT
Comment on attachment 432414 [details]
Patch

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

> Source/WebCore/html/HTMLElement.cpp:1466
> +    document().updateLayoutIfDimensionsOutOfDate(*this);

I don't think this is the right kind of layout? I think you want the normal update-if-needed-recursively
Comment 4 Wenson Hsieh 2021-06-28 13:22:39 PDT
Comment on attachment 432414 [details]
Patch

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

>> Source/WebCore/html/HTMLElement.cpp:1466
>> +    document().updateLayoutIfDimensionsOutOfDate(*this);
> 
> I don't think this is the right kind of layout? I think you want the normal update-if-needed-recursively

Good point — will change this to just be a standard `document().updateLayoutIgnorePendingStylesheets();`.
Comment 5 Wenson Hsieh 2021-06-28 14:02:41 PDT
Created attachment 432419 [details]
Patch for landing
Comment 6 EWS 2021-06-28 14:44:59 PDT
Committed r279349 (239217@main): <https://commits.webkit.org/239217@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 432419 [details].
Comment 7 Radar WebKit Bug Importer 2021-06-28 14:45:17 PDT
<rdar://problem/79882889>