RESOLVED FIXED Bug 52214
[HTML5] Revert display:none on datalist
https://bugs.webkit.org/show_bug.cgi?id=52214
Summary [HTML5] Revert display:none on datalist
Jeremy Keith
Reported 2011-01-11 08:43:59 PST
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.
Attachments
Patch (987 bytes, patch)
2011-01-16 09:11 PST, Anthony Ricaud
no flags
Patch (3.17 KB, patch)
2011-01-17 06:26 PST, Anthony Ricaud
no flags
Anthony Ricaud
Comment 1 2011-01-11 08:52:59 PST
It looks like the datalist implementation is hidden behind a flag but there is no flag in html.css for the datalist rule.
Eric Meyer
Comment 2 2011-01-11 09:10:35 PST
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.
Jeremy Keith
Comment 3 2011-01-11 09:13:16 PST
Anthony Ricaud
Comment 4 2011-01-11 09:22:05 PST
Oh I forgot to link to the changeset introducing this rule: https://trac.webkit.org/changeset/47420/
Eric Meyer
Comment 5 2011-01-11 10:17:00 PST
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.
Kent Tamura
Comment 6 2011-01-11 16:48:32 PST
(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.
Anthony Ricaud
Comment 7 2011-01-16 09:11:28 PST
Kent Tamura
Comment 8 2011-01-16 17:30:50 PST
Comment on attachment 79099 [details] Patch Thanks!
WebKit Commit Bot
Comment 9 2011-01-16 20:18:29 PST
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
Kent Tamura
Comment 10 2011-01-16 23:12:10 PST
(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?
Anthony Ricaud
Comment 11 2011-01-17 06:26:37 PST
Anthony Ricaud
Comment 12 2011-01-17 06:28:46 PST
Locally, datalist.html was also failing so I put the comment in this one.
Kent Tamura
Comment 13 2011-01-17 06:29:20 PST
Comment on attachment 79162 [details] Patch ok
WebKit Commit Bot
Comment 14 2011-01-17 06:58:46 PST
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.
WebKit Commit Bot
Comment 15 2011-01-17 06:59:55 PST
Comment on attachment 79162 [details] Patch Clearing flags on attachment: 79162 Committed r75940: <http://trac.webkit.org/changeset/75940>
WebKit Commit Bot
Comment 16 2011-01-17 07:00:02 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.