Closed Bug 556009 Opened 14 years ago Closed 12 years ago

Implement step attribute for <input type='number'>

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla16

People

(Reporter: mounir, Assigned: mounir)

References

(Blocks 2 open bugs, )

Details

(Keywords: doc-bug-filed, html5)

Attachments

(3 files, 2 obsolete files)

"The step  attribute indicates the granularity that is expected (and required) of the value, by limiting the allowed values. The section that defines the type attribute's current state also defines the default step and the step scale factor, which are used in processing the attribute as described below."
I'm going to use this bug for <input type='number'> implementation of the step attribute.
Blocks: 344616
No longer blocks: 344614
Summary: Implement step attribute → Implement step attribute for <input type='number'>
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #514959 - Flags: review?(jonas)
Attached patch Part 2 - Constraint validation (obsolete) — Splinter Review
Some refactoring could be done by adding GetMin() and GetMax() but it's not really trivial given that we sometimes already have the string representation. I might do that in a separate bug.
Attachment #514960 - Flags: review?(jonas)
Attached patch Part 2 - Constraint validation (obsolete) — Splinter Review
Oups, I missed that 'any' comparaison had to be case-insensitive...
Attachment #514960 - Attachment is obsolete: true
Attachment #514962 - Flags: review?(jonas)
Attachment #514960 - Flags: review?(jonas)
(In reply to comment #3)
> Created attachment 514960 [details] [diff] [review]
> Part 2 - Constraint validation
> 
> Some refactoring could be done by adding GetMin() and GetMax() but it's not
> really trivial given that we sometimes already have the string representation.
> I might do that in a separate bug.

I've open bug 636634.
Whiteboard: [needs review]
Use double instead of float.
Attachment #514962 - Attachment is obsolete: true
Attachment #515637 - Flags: review?(jonas)
Attachment #514962 - Flags: review?(jonas)
Depends on: 636750
Blocks: 563637
Comment on attachment 515637 [details] [diff] [review]
Part 2 - Constraint validation

Get rid of GetDefaultStep and just use 1 for now, also get rid of GetDefaultStepScaleFactor. We can always add them later if they make sense then.
Attachment #515637 - Flags: review?(jonas) → review+
Attached patch Review commentsSplinter Review
Attaching the changes I've made to apply the review comments. Just for information. I'm not asking a review on them given (sounds useless).
Whiteboard: [needs review] → [ready to land][waits for dependencies]
https://hg.mozilla.org/mozilla-central/rev/c85133eac60b
https://hg.mozilla.org/mozilla-central/rev/e8a4a2497b71
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [ready to land][waits for dependencies]
Target Milestone: --- → mozilla16
See bug 866457 for documentation.
You need to log in before you can comment on or make changes to this bug.