Bug 224287 - [iOS][FCR] Use context menus for text input datalist dropdowns
Summary: [iOS][FCR] Use context menus for text input datalist dropdowns
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: Other
Hardware: iPhone / iPad Unspecified
: P2 Normal
Assignee: Aditya Keerthi
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-04-07 09:25 PDT by Aditya Keerthi
Modified: 2021-04-09 06:25 PDT (History)
4 users (show)

See Also:


Attachments
Patch (24.17 KB, patch)
2021-04-07 09:28 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (24.20 KB, patch)
2021-04-07 09:46 PDT, Aditya Keerthi
ews-feeder: commit-queue-
Details | Formatted Diff | Diff
Patch (24.31 KB, patch)
2021-04-07 10:02 PDT, Aditya Keerthi
wenson_hsieh: review+
Details | Formatted Diff | Diff
Patch for landing (24.56 KB, patch)
2021-04-08 20:32 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 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].