Bug 226704

Summary: [Cocoa] Find-in-page should match text inside image overlays
Product: WebKit Reporter: Wenson Hsieh <wenson_hsieh>
Component: PlatformAssignee: Wenson Hsieh <wenson_hsieh>
Status: RESOLVED FIXED    
Severity: Normal CC: aestes, bdakin, ews-watchlist, hi, megan_gardner, mifenton, thorton, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Wenson Hsieh 2021-06-06 18:20:48 PDT
.
Comment 1 Wenson Hsieh 2021-06-06 20:58:08 PDT
Created attachment 430709 [details]
Patch
Comment 2 Tim Horton 2021-06-07 00:15:32 PDT
Comment on attachment 430709 [details]
Patch

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

> Source/WebKit/WebProcess/WebPage/FindController.cpp:379
> +        textIndicatorOptions.add({ TextIndicatorOption::PaintAllContent, TextIndicatorOption::PaintBackgrounds });

I wonder (separately) if we can infer some of these options in TI and remove some complexity from the clients. Like, give it more reasonable/intelligent defaults and delete some of the TextIndicatorOption values. Would need a careful pass over all the clients, though.
Comment 3 Wenson Hsieh 2021-06-07 06:37:22 PDT
Comment on attachment 430709 [details]
Patch

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

Thanks for the review!

>> Source/WebKit/WebProcess/WebPage/FindController.cpp:379
>> +        textIndicatorOptions.add({ TextIndicatorOption::PaintAllContent, TextIndicatorOption::PaintBackgrounds });
> 
> I wonder (separately) if we can infer some of these options in TI and remove some complexity from the clients. Like, give it more reasonable/intelligent defaults and delete some of the TextIndicatorOption values. Would need a careful pass over all the clients, though.

That’s a good point. I think in the case of look up and find in image overlays, this would help to alleviate some duplicate code, but (as you mentioned) it would require some careful vetting to make this change for all textindicators.

A halfway point might be something like a helper function in TextIndicator that adjusts a given set of TI options, given a range.
Comment 4 EWS 2021-06-07 06:45:54 PDT
Committed r278560 (238558@main): <https://commits.webkit.org/238558@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 430709 [details].
Comment 5 Radar WebKit Bug Importer 2021-06-07 06:46:15 PDT
<rdar://problem/78945509>