Bug 224287

Summary: [iOS][FCR] Use context menus for text input datalist dropdowns
Product: WebKit Reporter: Aditya Keerthi <akeerthi>
Component: FormsAssignee: Aditya Keerthi <akeerthi>
Status: RESOLVED FIXED    
Severity: Normal CC: cdumez, thorton, webkit-bug-importer, wenson_hsieh
Priority: P2 Keywords: InRadar
Version: Other   
Hardware: iPhone / iPad   
OS: Unspecified   
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
ews-feeder: commit-queue-
Patch
wenson_hsieh: review+
Patch for landing none

Description Aditya Keerthi 2021-04-07 09:25:37 PDT
...
Comment 1 Aditya Keerthi 2021-04-07 09:25:47 PDT
<rdar://problem/76351317>
Comment 2 Aditya Keerthi 2021-04-07 09:28:23 PDT
Created attachment 425410 [details]
Patch
Comment 3 Aditya Keerthi 2021-04-07 09:46:31 PDT
Created attachment 425412 [details]
Patch
Comment 4 Aditya Keerthi 2021-04-07 10:02:18 PDT
Created attachment 425414 [details]
Patch
Comment 5 Wenson Hsieh 2021-04-08 19:45:36 PDT
Comment on attachment 425414 [details]
Patch

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

> Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm:9817
> +    return [_dataListSuggestionsControl.getAutoreleased() isShowingSuggestions];

Nit - I think you can remove the `.getAutoreleased()` here.

> Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:48
> +@property (nonatomic, readwrite) BOOL isShowingSuggestions;

Nit - I think you don't need the `readwrite` here, since @property is readwrite by default.

> Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:479
> +        [_suggestionsContextMenuInteraction updateVisibleMenuWithBlock:[self](UIMenu *visibleMenu) -> UIMenu * {

Nit - I think you can just use & in the block capture and omit the `self->` below, since this block is run synchronously.

> Source/WebKit/UIProcess/ios/WebDataListSuggestionsDropdownIOS.mm:594
> +        if (strongSelf)

Nit - you can do `if (auto strongSelf = weakSelf.get())` here.
Comment 6 Aditya Keerthi 2021-04-08 20:32:29 PDT
Created attachment 425580 [details]
Patch for landing
Comment 7 Aditya Keerthi 2021-04-08 20:33:54 PDT
Thanks for the review! Made all the requested changes.
Comment 8 EWS 2021-04-09 06:25:40 PDT
Committed r275760 (236338@main): <https://commits.webkit.org/236338@main>

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