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

Bug 334676

Summary: [content model] Attribute value "number" missing from input's type attribute
Product: [WebTools] WTP Source Editing Reporter: Nick Sandonato <nsand.dev>
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.3Flags: 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: PC   
OS: Windows XP   
Whiteboard: PMC_approved
Attachments:
Description Flags
patch
none
junit none

Description Nick Sandonato CLA 2011-01-18 12:34:25 EST
The HTML 5 attribute value "number" is missing from input's type attribute. Instead what should be the "number" value is showing "1".
Comment 1 Nick Sandonato CLA 2011-01-18 12:43:40 EST
Created attachment 187024 [details]
patch

Added the new "number" string value. The previous ATTR_VALUE_NUMBER looks like it was associated with <li>, but I couldn't find references to it anywhere. I created a new constant to play it safe.
Comment 2 Nick Sandonato CLA 2011-01-18 18:36:33 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. We need to make sure we're consistent with the HTML5 spec in order to avoid confusion.

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

No.

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

Adhoc testing. Furthermore, a unit test has been added.

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

The content model will now correctly add "number" as a value for the input element's type attribute. Nitin has reviewed the fix.

* What is the risk associated with this fix?
Very low. Swapping out an incorrect attribute value that was probably never used in the first place (since it was unlikely people were understanding "1" to be a valid type).
Comment 3 Nick Sandonato CLA 2011-01-18 18:37:02 EST
Created attachment 187064 [details]
junit

Additional junit for the change.
Comment 4 Nick Sandonato CLA 2011-01-18 19:06:28 EST
Thanks for the quick review. Code released.