Bug 227453

Summary: Live Text selections inside images is misaligned when "object-fit" is not "fill"
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: PlatformAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: bdakin, cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, hi, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch
thorton: review+
Patch for landing none

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>