Summary: | [Datalist] imported/w3c/web-platform-tests/html/semantics/forms/the-datalist-element/datalistoptions.html fails after enabling the datalist element | ||
---|---|---|---|
Product: | WebKit | Reporter: | Wenson Hsieh <wenson_hsieh> |
Component: | Forms | Assignee: | Nobody <webkit-unassigned> |
Status: | RESOLVED CONFIGURATION CHANGED | ||
Severity: | Normal | CC: | ahmad.saleem792, annevk, cdumez, pxlcoder, wenson_hsieh |
Priority: | P2 | ||
Version: | WebKit Nightly Build | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | https://html.spec.whatwg.org/#dom-datalist-options |
Description
Wenson Hsieh
2018-10-16 10:10:49 PDT
FWIW, removing the `!option.isDisabledFormControl() && !option.value().isEmpty()` check fixes this WPT, but causes another test, fast/forms/datalist/datalist.html, to fail. fast/forms/datalist/datalist.html verifies that empty and disabled option elements are *not* included in datalist's list of options, so clearly, one of these tests needs to be updated! My interpretation of the specification is that we should returns all options (even if disabled): https://html.spec.whatwg.org/#dom-datalist-options """ The options IDL attribute must return an HTMLCollection rooted at the datalist node, whose filter matches option elements. """ That said, it would be worth testing other browsers and match what they do. (In reply to Chris Dumez from comment #2) > My interpretation of the specification is that we should returns all options > (even if disabled): > https://html.spec.whatwg.org/#dom-datalist-options > > """ > The options IDL attribute must return an HTMLCollection rooted at the > datalist node, whose filter matches option elements. > """ > > That said, it would be worth testing other browsers and match what they do. Chrome passes http://w3c-test.org/html/semantics/forms/the-datalist-element/datalistoptions.html but Firefox fails. Anyway, it seems Chrome and the spec agree so I would suggest matching Chrome / spec behavior. (In reply to Chris Dumez from comment #3) > (In reply to Chris Dumez from comment #2) > > My interpretation of the specification is that we should returns all options > > (even if disabled): > > https://html.spec.whatwg.org/#dom-datalist-options > > > > """ > > The options IDL attribute must return an HTMLCollection rooted at the > > datalist node, whose filter matches option elements. > > """ Yep, I agree with this interpretation. > > > > That said, it would be worth testing other browsers and match what they do. > > Chrome passes > http://w3c-test.org/html/semantics/forms/the-datalist-element/ > datalistoptions.html but Firefox fails. > > Anyway, it seems Chrome and the spec agree so I would suggest matching > Chrome / spec behavior. Sounds good — thanks, Chris! Safari Technology Preview 162 is passing test: https://wpt.fyi/results/html/semantics/forms/the-datalist-element/datalistoptions.html?label=master&label=experimental&aligned and even Safari 16.3 is passing the test: http://wpt.live/html/semantics/forms/the-datalist-element/datalistoptions.html Can we close this now? |