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

RESOLVED FIXED in mozilla16

Status

()

Core
DOM: Core & HTML
RESOLVED FIXED
7 years ago
4 years ago

People

(Reporter: mounir, Assigned: mounir)

Tracking

(Blocks: 2 bugs, {doc-bug-filed, html5})

Trunk
mozilla16
doc-bug-filed, html5
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(3 attachments, 2 obsolete attachments)

(Assignee)

Description

7 years ago
"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."

Updated

7 years ago
Blocks: 559753
(Assignee)

Comment 1

7 years ago
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)

Comment 2

7 years ago
Created attachment 514959 [details] [diff] [review]
Part 1 - Add the attribute
Assignee: nobody → mounir.lamouri
Status: NEW → ASSIGNED
Attachment #514959 - Flags: review?(jonas)
(Assignee)

Comment 3

7 years ago
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.
Attachment #514960 - Flags: review?(jonas)
(Assignee)

Updated

7 years ago
Keywords: dev-doc-needed, html5
(Assignee)

Updated

7 years ago
(Assignee)

Comment 4

7 years ago
Created attachment 514962 [details] [diff] [review]
Part 2 - Constraint validation

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)
(Assignee)

Comment 5

7 years ago
(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.
(Assignee)

Updated

7 years ago
Whiteboard: [needs review]
(Assignee)

Comment 6

7 years ago
Created attachment 515637 [details] [diff] [review]
Part 2 - Constraint validation

Use double instead of float.
Attachment #514962 - Attachment is obsolete: true
Attachment #515637 - Flags: review?(jonas)
Attachment #514962 - Flags: review?(jonas)
(Assignee)

Updated

7 years ago
Depends on: 636750
(Assignee)

Updated

7 years ago
Blocks: 563637
Attachment #514959 - Flags: review?(jonas) → review+
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+
(Assignee)

Comment 8

6 years ago
Created attachment 527502 [details] [diff] [review]
Review comments

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).
(Assignee)

Updated

6 years ago
Whiteboard: [needs review] → [ready to land][waits for dependencies]
(Assignee)

Comment 9

5 years ago
https://hg.mozilla.org/mozilla-central/rev/c85133eac60b
https://hg.mozilla.org/mozilla-central/rev/e8a4a2497b71
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Whiteboard: [ready to land][waits for dependencies]
Target Milestone: --- → mozilla16
See bug 866457 for documentation.
Keywords: dev-doc-needed → doc-bug-filed
You need to log in before you can comment on or make changes to this bug.