Upgrade stepUp()/stepDown() implementation to match spec.

The spec for stepUp()/stepDown()

  http://www.whatwg.org/specs/web-apps/current-work/#dom-input-stepdown

requires that out-of-step values snap to step, just like the UI
implementation will do. Hence, bring the required clamping/snapping
handling into scope.

Also, stepUp()/stepDown() shouldn't throw if the current value is not
a number, nor if the resulting stepped-to value is too far out of
range. Snapping to range (modulo step base) is what's supposed to
happen now.

R=yosin@chromium.org,keishi1@chromium.org,tkent@chromium.org
BUG=339194

Review URL: https://codereview.chromium.org/136783006

git-svn-id: svn://svn.chromium.org/blink/trunk@166525 bbb929c8-8fbe-4397-9dbb-9b2b20218538
21 files changed
tree: 6429813ad2efaf7499067bfcc827f3a0b31993ea
  1. third_party/