DescriptionAvoid stack overflow in InputType::applyStep().
applyStep(current, count, ...) calls applyStep(aligned-current, count-1, ...) if
the current value doesn't match to the |step| value, and we assumed the second
call of applyStep didn't call another applyStep().
However, if an adjusted value is greater than the maximum value or is
smaller than the minimum value, we clamped the value. So, the second
call of applyStep could be step-mismatched value, and called applyStep
continuously.
This CL does:
- Remove the clamping code.
The specification doesn't define such clamping.
- Remove recursive calls.
It was tail recursions.
Some tests fail intentionally because of the clamping removal. A follow-up
CL will fix them.
BUG=529610
Committed: https://crrev.com/ebc1f01b3fdba6c8b1b2b1075e029cd317c685ee
git-svn-id: svn://svn.chromium.org/blink/trunk@202214 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Patch Set 1 : #
Total comments: 3
Messages
Total messages: 36 (17 generated)
|