Bug 52214 - [HTML5] Revert display:none on datalist
Summary: [HTML5] Revert display:none on datalist
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Forms (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P3 Minor
Assignee: Nobody
URL: http://adactio.com/journal/4272/
Keywords:
Depends on:
Blocks: 27247 52612
  Show dependency treegraph
 
Reported: 2011-01-11 08:43 PST by Jeremy Keith
Modified: 2011-01-17 23:53 PST (History)
7 users (show)

See Also:


Attachments
Patch (987 bytes, patch)
2011-01-16 09:11 PST, Anthony Ricaud
no flags Details | Formatted Diff | Diff
Patch (3.17 KB, patch)
2011-01-17 06:26 PST, Anthony Ricaud
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremy Keith 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.
Comment 1 Anthony Ricaud 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.
Comment 2 Eric Meyer 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.
Comment 3 Jeremy Keith 2011-01-11 09:13:16 PST
html.css is here: http://svn.webkit.org/repository/webkit/trunk/Source/WebCore/css/html.css
Comment 4 Anthony Ricaud 2011-01-11 09:22:05 PST
Oh I forgot to link to the changeset introducing this rule:
https://trac.webkit.org/changeset/47420/
Comment 5 Eric Meyer 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.
Comment 6 Kent Tamura 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.
Comment 7 Anthony Ricaud 2011-01-16 09:11:28 PST
Created attachment 79099 [details]
Patch
Comment 8 Kent Tamura 2011-01-16 17:30:50 PST
Comment on attachment 79099 [details]
Patch

Thanks!
Comment 9 WebKit Commit Bot 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
Comment 10 Kent Tamura 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?
Comment 11 Anthony Ricaud 2011-01-17 06:26:37 PST
Created attachment 79162 [details]
Patch
Comment 12 Anthony Ricaud 2011-01-17 06:28:46 PST
Locally, datalist.html was also failing so I put the comment in this one.
Comment 13 Kent Tamura 2011-01-17 06:29:20 PST
Comment on attachment 79162 [details]
Patch

ok
Comment 14 WebKit Commit Bot 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.
Comment 15 WebKit Commit Bot 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>
Comment 16 WebKit Commit Bot 2011-01-17 07:00:02 PST
All reviewed patches have been landed.  Closing bug.