Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 334361

Summary: HTML5 attributes 'loop' and 'controls' are required to have invalid values
Product: [WebTools] WTP Source Editing Reporter: Eric Bednarz <eric.bednarz>
Component: wst.htmlAssignee: Nick Sandonato <nsand.dev>
Status: RESOLVED FIXED QA Contact: Nick Sandonato <nsand.dev>
Severity: normal    
Priority: P3 CC: david_williams, thatnitind
Version: 3.2.2Flags: david_williams: pmc_approved+
nsand.dev: pmc_approved? (raghunathan.srinivasan)
nsand.dev: pmc_approved? (naci.dai)
nsand.dev: pmc_approved? (deboer)
nsand.dev: pmc_approved? (neil.hauge)
nsand.dev: pmc_approved? (kaloyan)
thatnitind: review+
Target Milestone: 3.2.3   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard: PMC_approved
Attachments:
Description Flags
patch none

Description Eric Bednarz CLA 2011-01-14 05:12:46 EST
Build Identifier: 20100917-0705

Example:

<video autoplay loop controls></video>

'autoplay' is treated correct. 'loop' and 'controls' trigger a warning 'Undefined attribute value().' Autocompletion offers the string literals 'true' and 'false'.

From the HTML5 draft:
| The values "true" and "false" are not allowed on boolean attributes. 
http://dev.w3.org/html5/spec/Overview.html#boolean-attribute

That restriction is also consistent with previous SGML based HTML versions (likewise, the corresponding DOM properties also *do* get/set real booleans, which has proven to be mildly confusing).

Reproducible: Always
Comment 1 Nick Sandonato CLA 2011-01-14 10:55:59 EST
Created attachment 186830 [details]
patch
Comment 2 Nitin Dahyabhai CLA 2011-01-14 11:33:30 EST
Approved.  Please fill out the PMC Review details.
Comment 3 Nick Sandonato CLA 2011-01-14 11:42:37 EST
* Explain why you believe this is a stop-ship defect. Or, if it is a "hotbug" (requested by an adopter) please document it as such.

Correct markup is generating confusing error markers due to improper content model values.

* Is there a work-around? If so, why do you believe the work-around is insufficient?

No. Using true/false goes against the specification.

* How has the fix been tested? Is there a test case attached to the bugzilla record? Has a JUnit Test been added?

Existing unit tests have been run in addition to ad hoc testing.

* Give a brief technical overview. Who has reviewed this fix?

The content model has been updated to follow the spec and adhere to what a boolean attribute is. This required modifying the enumerated values for the attributes loop and controls, which were previously incorrectly set to true/false.

What is the risk associated with this fix?
Very low.
Comment 4 David Williams CLA 2011-01-14 15:41:06 EST
Well who wrote that spec?! Are they just trying to cause problems for XHTML? :) 

Just kidding. Guess they have their reasons. And this sounds like a very worth while fix. 

Thanks,
Comment 5 Nick Sandonato CLA 2011-01-18 12:18:33 EST
Resolving. Thanks!