Bug 107219 - [Track] Default attribute boolean value shouldn't be ignored
Summary: [Track] Default attribute boolean value shouldn't be ignored
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-01-17 19:54 PST by Victor Carbune
Modified: 2013-01-18 02:38 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Victor Carbune 2013-01-17 19:54:56 PST
The default attribute can also have a false boolean value (e.g., default="true", default="false") - now it is implicitly treated always as true.
Comment 1 Eric Carlson 2013-01-17 20:27:29 PST
(In reply to comment #0)
> The default attribute can also have a false boolean value (e.g., default="true", default="false") - now it is implicitly treated always as true.

This is incorrect. 'default' is a boolean attribute, which is defined in section 2.5.2 of the HTML5 spec as true if present, and false if absent:

2.5.2 Boolean attributes

A number of attributes are boolean attributes. The presence of a boolean attribute on an element represents the true value, and the absence of the attribute represents the false value.

If the attribute is present, its value must either be the empty string or a value that is an ASCII case-insensitive match for the attribute's canonical name, with no leading or trailing whitespace.

The values "true" and "false" are not allowed on boolean attributes. To represent a false value, the attribute has to be omitted altogether.


http://www.w3.org/html/wg/drafts/html/master/infrastructure.html#boolean-attributes
Comment 2 Victor Carbune 2013-01-18 02:38:53 PST
(In reply to comment #1)
> (In reply to comment #0)
> > The default attribute can also have a false boolean value (e.g., default="true", default="false") - now it is implicitly treated always as true.
> 
> This is incorrect. 'default' is a boolean attribute, which is defined in section 2.5.2 of the HTML5 spec as true if present, and false if absent:

I was thinking it is so, but then I saw a Chromium bug registered and guessed
I was wrong. Thanks for pointing out the relevant spec part.