Align stepUp() and stepDown() implementation to HTML spec




6 years ago
9 months ago


(Reporter: mounir, Unassigned)




Firefox Tracking Flags

(Not tracked)





6 years ago
For the moment, the difference I see with the specs are:
- (we leave if we have no value instead of using value=0);
- we tend to clamp very often (value < min or value > man), I think the speak is less aggressive than us regarding clamping.

I'm fine with fixing the first part to follow the specs. I believe our behaviour regarding clamping is better though.

Comment 1

6 years ago
Looking a bit more, I see three things that I would like to change in the specs:
- point 6: I think we should use the lower value if we go up and the higher if we go down. The idea is that value=3, min=0 step=2, stepUp() should go to 4 and stepDown() to 2;
- point 7: we should not leave but do value = minimum;
- point 8: we should not leave but do value = maximum.

Comment 2

6 years ago
Actually, the issue in point 6 is that it doesn't take into account stepUp(n) and stepDown(n) with n>1. In that case, it will do a stepUp(1) and stepDown(1) (with th expected behaviour). To fix that, we should simply round the opposite way (not like the spec say, but as my previous comment say) and then run the steps that are in "Otherwise".


9 months ago
Priority: -- → P5
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.