Bug 239320 - [iOS] Add support for find-and-replace keyboard shortcut
Summary: [iOS] Add support for find-and-replace keyboard shortcut
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-13 21:16 PDT by Aditya Keerthi
Modified: 2022-04-14 12:00 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.34 KB, patch)
2022-04-13 21:18 PDT, Aditya Keerthi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aditya Keerthi 2022-04-13 21:16:05 PDT
...
Comment 1 Aditya Keerthi 2022-04-13 21:16:25 PDT
rdar://91537724
Comment 2 Aditya Keerthi 2022-04-13 21:18:59 PDT
Created attachment 457592 [details]
Patch
Comment 3 Aditya Keerthi 2022-04-14 10:34:51 PDT
Comment on attachment 457592 [details]
Patch

Thanks for the review!
Comment 4 EWS 2022-04-14 11:01:55 PDT
Committed r292880 (249650@main): <https://commits.webkit.org/249650@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 457592 [details].
Comment 5 Darin Adler 2022-04-14 11:07:03 PDT
Comment on attachment 457592 [details]
Patch

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

> Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:136
>  - (void)find:(id)sender;
>  - (void)findNext:(id)sender;
>  - (void)findPrevious:(id)sender;
> +- (void)findAndReplace:(id)sender;

Should these be public API with availability annotations? I don’t understand why they are still internal.
Comment 6 Aditya Keerthi 2022-04-14 12:00:54 PDT
(In reply to Darin Adler from comment #5)
> Comment on attachment 457592 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=457592&action=review
> 
> > Source/WebKit/UIProcess/API/ios/WKWebViewIOS.h:136
> >  - (void)find:(id)sender;
> >  - (void)findNext:(id)sender;
> >  - (void)findPrevious:(id)sender;
> > +- (void)findAndReplace:(id)sender;
> 
> Should these be public API with availability annotations? I don’t understand
> why they are still internal.

Good question!

These methods are specifically for editing shortcuts / menu items through the UIKit protocol  `UIResponderStandardEditActions`. They are currently in a private UIKit header, and are declared here for use in WebKit. Once they are moved to a public header, we will no longer declare them here.

Note that `WKWebView` does not publicly conform to `UIResponderStandardEditActions` at this time. This is a historical artifact, and there's not a good reason for keeping it that away. I've filed https://bugs.webkit.org/show_bug.cgi?id=239349 to make conformance to UIKit's protocol public.

The actual functionality of these methods (being able to find/replace) will be API through `findInteraction`. This is independent of public conformance to `UIResponderStandardEditActions`, which is specifically for editing shortcuts / menu items.