[Webkit-unassigned] [Bug 186151] [Datalist] Allow TextFieldInputType to show and hide suggestions

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Jun 5 09:17:39 PDT 2018


https://bugs.webkit.org/show_bug.cgi?id=186151

--- Comment #4 from Aditya Keerthi <akeerthi at apple.com> ---
(In reply to Wenson Hsieh from comment #3)
> Comment on attachment 341690 [details]
> Patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=341690&action=review
> 
> > Source/WebCore/html/TextFieldInputType.cpp:544
> > +#if ENABLE(DATALIST_ELEMENT)
> 
> Hm...I find this change a bit odd. It seems like whether we respect the list
> attribute should depend on whether we support rendering data list UI, rather
> than always returning true iff the compile-time flag is enabled.
> 
> Could we tweak the implementation of RenderTheme::supportsDataListUI()
> instead? I think it would make the code a bit easier to follow, though it
> would entail checking against a palette of input type names. But this
> doesn't seem so costly, especially since AtomicString comparisons are cheap.

I made the change this way as support for the list attribute depends on the input type (https://www.w3.org/TR/html50/forms.html#do-not-apply).

All TextFieldInputTypes support the attribute. Consequently we can always return true for this method in TextFieldInputType. The UI for these input types is also the same.

For input types that don't support the list attribute, we can return false in shouldRespectListAttribute.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20180605/4de06977/attachment.html>


More information about the webkit-unassigned mailing list