Bug 233044 - Add support for injecting and rendering text recognition blocks
Summary: Add support for injecting and rendering text recognition blocks
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-11-12 08:01 PST by Wenson Hsieh
Modified: 2021-11-16 08:38 PST (History)
11 users (show)

See Also:


Attachments
Depends on #233010 (13.66 KB, patch)
2021-11-12 08:49 PST, Wenson Hsieh
no flags Details | Formatted Diff | Diff
Minor adjustments / rebase on trunk (13.60 KB, patch)
2021-11-14 14:21 PST, Wenson Hsieh
akeerthi: review+
Details | Formatted Diff | Diff
Patch for landing (13.68 KB, patch)
2021-11-16 08:09 PST, 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-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>