Bug 233044

Summary: Add support for injecting and rendering text recognition blocks
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: PlatformAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: akeerthi, cdumez, changseok, esprehn+autocc, ews-watchlist, gyuyoung.kim, hi, kangil.han, megan_gardner, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Depends on #233010
none
Minor adjustments / rebase on trunk
akeerthi: review+
Patch for landing none

Description Wenson Hsieh 2021-11-12 08:01:01 PST
.
Comment 1 Wenson Hsieh 2021-11-12 08:49:50 PST
Created attachment 444073 [details]
Depends on #233010
Comment 2 Wenson Hsieh 2021-11-14 14:21:06 PST
Created attachment 444194 [details]
Minor adjustments / rebase on trunk
Comment 3 Aditya Keerthi 2021-11-15 16:26:23 PST
Comment on attachment 444194 [details]
Minor adjustments / rebase on trunk

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

r=me

> Source/WebCore/dom/ImageOverlay.cpp:501
> +    for (size_t index = 0; index < result.blocks.size(); ++index) {

Should we add an assertion that `result.blocks.size() == elements.blocks.size()`?

> Source/WebCore/dom/ImageOverlay.cpp:502
> +        auto blockContainer = elements.blocks[index];

Nit: I would move this declaration after the `continue`, since it's not used otherwise.
Comment 4 Wenson Hsieh 2021-11-16 08:07:52 PST
Comment on attachment 444194 [details]
Minor adjustments / rebase on trunk

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

Thanks for the review!

>> Source/WebCore/dom/ImageOverlay.cpp:501
>> +    for (size_t index = 0; index < result.blocks.size(); ++index) {
> 
> Should we add an assertion that `result.blocks.size() == elements.blocks.size()`?

Yes, added!

>> Source/WebCore/dom/ImageOverlay.cpp:502
>> +        auto blockContainer = elements.blocks[index];
> 
> Nit: I would move this declaration after the `continue`, since it's not used otherwise.

Good catch — moved to after the continue.
Comment 5 Wenson Hsieh 2021-11-16 08:09:25 PST
Created attachment 444386 [details]
Patch for landing
Comment 6 EWS 2021-11-16 08:37:12 PST
Committed r285862 (244288@main): <https://commits.webkit.org/244288@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 444386 [details].
Comment 7 Radar WebKit Bug Importer 2021-11-16 08:38:27 PST
<rdar://problem/85459672>