-
tkent@chromium.org authored
Reviewed by Darin Adler. Add tests for HTMLInputElement::stepUp() and stepDown(). https://bugs.webkit.org/show_bug.cgi?id=27451 * fast/forms/input-step-number-expected.txt: Added. * fast/forms/input-step-number.html: Added. * fast/forms/input-step-range-expected.txt: Added. * fast/forms/input-step-range.html: Added. * fast/forms/input-step-unsupported-expected.txt: Added. * fast/forms/input-step-unsupported.html: Added. * fast/forms/script-tests/input-step-number.js: Added. * fast/forms/script-tests/input-step-range.js: Added. * fast/forms/script-tests/input-step-unsupported.js: Added. 2009-12-07 Kent Tamura <tkent@chromium.org> Reviewed by Darin Adler. Add support for HTMLInputElement::stepUp() and stepDown() for type=number and type=range. https://bugs.webkit.org/show_bug.cgi?id=27451 Our implementation of stepUp() and stepDown() rounds the resultant value to conform to the step value. Change the number-string conversion method for RenderSlider to be consistent with type=number. Tests: fast/forms/input-step-number.html fast/forms/input-step-range.html fast/forms/input-step-unsupported.html * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::rangeUnderflow): Unify the code for NUMBER and RANGE. (WebCore::HTMLInputElement::rangeOverflow): Unify the code for NUMBER and RANGE. (WebCore::HTMLInputElement::minimum): Renamed from rangeMinimum(), and support for NUMBER. (WebCore::HTMLInputElement::maximum): Renamed from rangeMaximum(), and support for NUMBER. (WebCore::HTMLInputElement::stepBase): (WebCore::HTMLInputElement::stepMismatch): Use stepBase(). (WebCore::HTMLInputElement::applyStepForNumberOrRange): (WebCore::HTMLInputElement::stepUp): (WebCore::HTMLInputElement::stepDown): (WebCore::HTMLInputElement::formStringFromDouble): * html/HTMLInputElement.h: (WebCore::HTMLInputElement::stepUp): (WebCore::HTMLInputElement::stepDown): * html/HTMLInputElement.idl: Add stepUp() and stepDown(). * rendering/RenderSlider.cpp: (WebCore::SliderRange::SliderRange): Sync with rangeMinimum()/rangeMaximum() renaming. (WebCore::RenderSlider::updateFromElement): Use formStringFromDouble(). (WebCore::RenderSlider::setValueForPosition): Use formStringFromDouble(). git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51822 268f45cc-cd09-0410-ab3c-d52691b4dbfc
a65e5433