Bug 233957

Summary: [iOS] Add support for _UITextSearchOptions when finding a string
Product: WebKit Reporter: Aditya Keerthi <akeerthi>
Component: WebKit APIAssignee: Aditya Keerthi <akeerthi>
Status: RESOLVED FIXED    
Severity: Normal CC: hi, megan_gardner, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 233915    
Bug Blocks:    
Attachments:
Description Flags
Patch
wenson_hsieh: review+
Patch for landing none

Description Aditya Keerthi 2021-12-07 16:17:59 PST
...
Comment 1 Aditya Keerthi 2021-12-07 16:18:23 PST
rdar://86140673
Comment 2 Aditya Keerthi 2021-12-07 16:20:31 PST
Created attachment 446250 [details]
Patch
Comment 3 Aditya Keerthi 2021-12-07 16:20:56 PST
Patch will not apply until https://bugs.webkit.org/show_bug.cgi?id=233915 is landed, but this is ready for review.
Comment 4 Wenson Hsieh 2021-12-07 16:25:45 PST
Comment on attachment 446250 [details]
Patch

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

r=me! (assuming EWS is happy with this, after #233915 lands)

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9970
> +        findOptions.add(WebKit::FindOptions::AtWordStarts);
> +        findOptions.add(WebKit::FindOptions::AtWordEnds);

Nit - I think you can just do `.add({ WebKit::FindOptions::AtWordStarts, WebKit::FindOptions::AtWordEnds });` here.
Comment 5 Aditya Keerthi 2021-12-07 16:27:44 PST
(In reply to Wenson Hsieh from comment #4)
> Comment on attachment 446250 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=446250&action=review
> 
> r=me! (assuming EWS is happy with this, after #233915 lands)
> 
> > Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9970
> > +        findOptions.add(WebKit::FindOptions::AtWordStarts);
> > +        findOptions.add(WebKit::FindOptions::AtWordEnds);
> 
> Nit - I think you can just do `.add({ WebKit::FindOptions::AtWordStarts,
> WebKit::FindOptions::AtWordEnds });` here.

Thanks for the review! Will make this change after #233915 lands.
Comment 6 Aditya Keerthi 2021-12-07 21:39:00 PST
Created attachment 446289 [details]
Patch for landing
Comment 7 EWS 2021-12-08 09:52:01 PST
Committed r286660 (244973@main): <https://commits.webkit.org/244973@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 446289 [details].