Summary: | [iOS][FCR] Add new datalist dropdown for text inputs | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Aditya Keerthi <akeerthi> | ||||||
Component: | Forms | Assignee: | Aditya Keerthi <akeerthi> | ||||||
Status: | RESOLVED FIXED | ||||||||
Severity: | Normal | CC: | cdumez, changseok, esprehn+autocc, ews-watchlist, glenn, gyuyoung.kim, macpherson, menard, mifenton, thorton, webkit-bug-importer, wenson_hsieh | ||||||
Priority: | P2 | Keywords: | InRadar | ||||||
Version: | Safari Technology Preview | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Attachments: |
|
Description
Aditya Keerthi
2021-02-16 15:52:24 PST
Created attachment 420557 [details]
Patch
Comment on attachment 420557 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=420557&action=review > Source/WebCore/html/TextFieldInputType.h:139 > + bool shouldOnlyShowDataListDropdownButtonWhenFocusedOrEdited(); Nit - we should mark this `const` now that it's an instance method. > Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:175 > +#if ENABLE(DATALIST_ELEMENT) > + if (_page) > + _page->selectDataListOptionForTesting(optionIndex); > +#endif Hm…I think ideally, the testing-only code should simulate interactions by invoking methods on UI objects (e.g. WKDataListSuggestionsDropdown). Though, if there's no clear simple way to achieve that, this is fine too. Created attachment 420707 [details]
Patch for landing
(In reply to Wenson Hsieh from comment #3) > Comment on attachment 420557 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=420557&action=review > > > Source/WebCore/html/TextFieldInputType.h:139 > > + bool shouldOnlyShowDataListDropdownButtonWhenFocusedOrEdited(); > > Nit - we should mark this `const` now that it's an instance method. Done. > > Source/WebKit/UIProcess/API/ios/WKWebViewTestingIOS.mm:175 > > +#if ENABLE(DATALIST_ELEMENT) > > + if (_page) > > + _page->selectDataListOptionForTesting(optionIndex); > > +#endif > > Hm…I think ideally, the testing-only code should simulate interactions by > invoking methods on UI objects (e.g. WKDataListSuggestionsDropdown). Though, > if there's no clear simple way to achieve that, this is fine too. As discussed offline, I've moved the testing hook to WKContentViewInteraction. Committed r273049: <https://commits.webkit.org/r273049> All reviewed patches have been landed. Closing bug and clearing flags on attachment 420707 [details]. |