Until the datalist element is supported, the element should be ignored (like any other unknown element). Instead the CSS currently applies display:none to datalist elements (line 539 of html.css). The datalist element can contain content other than option elements; this is by design so that authors can rely on non-supporting browsers to display the non-option content as a fallback. Applying display:none to datalist negates this ability. In effect, the spec is relying on non-supporting browsers to treat the datalist element the same way they would treat foo, bar, or any other element they don't recognise. Here's a test case: http://adactio.s3.amazonaws.com/misc/datalist.html Source: https://gist.github.com/771830/ Without the author CSS that sets datalist to display: inline-block, the fallback content (a select element a text node) is hidden. The expected behaviour is that the fallback content is displayed. I've tested this in the latest nightly build r75294 on Mac OS X 10.6.6. Because this issue can be resolved in a user or author stylesheet, I'm marking this bug as minor rather than normal.
It looks like the datalist implementation is hidden behind a flag but there is no flag in html.css for the datalist rule.
I not only strongly support fixing this, I would upgrade the status to normal or even higher. Browsers should NOT hide elements they don't understand. If there's anything else that's similarly hidden (modulo 'head' and its descendants, of course) it should also be un-hidden. Can someone please direct me to the location of the UA CSS, assuming it's a browsable file? I'd like to see if any other elements are similarly afflicted.
html.css is here: http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/css/html.css
Oh I forgot to link to the changeset introducing this rule: https://trac.webkit.org/changeset/47420/
Thanks! I found this bit: ruby > rp { display: none; } /* other elements */ noframes { display: none } I'm trying to imagine the justification for either. Have to ponder.
(In reply to comment #1) > It looks like the datalist implementation is hidden behind a flag but there is no flag in html.css for the datalist rule. Yes, the root problem is that our UA CSS processor doesn't support feature flags such as ENABLE_DATALIST. Anyway, I think it's ok to remove the datalist definition from html.css for now. The datalist implementation is still incomplete and I don't have a plan to restart it soon.
Created attachment 79099 [details] Patch
Comment on attachment 79099 [details] Patch Thanks!
Comment on attachment 79099 [details] Patch Rejecting attachment 79099 [details] from commit-queue. Failed to run "['./Tools/Scripts/webkit-patch', '--status-host=queues.webkit.org', '--bot-id=cr-jail-4', 'build-..." exit_code: 2 Last 500 characters of output: ........ fast/events/scoped . fast/eventsource .. fast/fast-mobile-scrolling .. fast/files ....... fast/flexbox ................................... fast/forms ........................................................................................................ fast/forms/datalist-nonoption-child.html -> failed Exiting early after 1 failures. 8171 tests run. 169.95s total testing time 8170 test cases (99%) succeeded 1 test case (<1%) had incorrect layout 5 test cases (<1%) had stderr output Full output: http://queues.webkit.org/results/7529125
(In reply to comment #9) > fast/forms/datalist-nonoption-child.html -> failed It's an actual failure. Would you update datalist-nonoption-child-expected.txt and add a comment that we need to add display:none again later to datalist-nonoption-child.html please?
Created attachment 79162 [details] Patch
Locally, datalist.html was also failing so I put the comment in this one.
Comment on attachment 79162 [details] Patch ok
The commit-queue encountered the following flaky tests while processing attachment 79162 [details]: inspector/debugger-pause-on-breakpoint.html bug 51320 (author: podivilov@chromium.org) The commit-queue is continuing to process your patch.
Comment on attachment 79162 [details] Patch Clearing flags on attachment: 79162 Committed r75940: <http://trac.webkit.org/changeset/75940>
All reviewed patches have been landed. Closing bug.