Please sign in to comment.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2010-03-19 Joseph Pecoraro <firstname.lastname@example.org>
Reviewed by David Kilzer. <input type=range> does not validate correctly without a renderer and the tests are incorrect https://bugs.webkit.org/show_bug.cgi?id=36259 Setting value attribute on an <input type=range> to an out-of-range value fires oninput https://bugs.webkit.org/show_bug.cgi?id=16990 Part 2 of 2: When setting the range element's value, overflows and underflows are automatically sanitized to valid values. Moved the general case sanitization code out of the Renderer into HTMLInputElement::sanitizeValue. * html/HTMLInputElement.cpp: (WebCore::HTMLInputElement::value): when getting a default value on reset() ensure the defaultValue is provided (WebCore::HTMLInputElement::sanitizeValue): clamp the value within the max/min/step range constraints * html/StepRange.cpp: (WebCore::StepRange::StepRange): allow const element in the constructor (WebCore::StepRange::clampValue): clamp from a String value * html/StepRange.h: (WebCore::StepRange::defaultValue): easy calculation of the default value for max/min/step range constraints * rendering/RenderSlider.cpp: (WebCore::RenderSlider::updateFromElement): no longer handle the general case sanitization in the renderer 2010-03-19 Joseph Pecoraro <email@example.com> Reviewed by David Kilzer. <input type=range> does not validate correctly without a renderer and the tests are incorrect https://bugs.webkit.org/show_bug.cgi?id=36259 Setting value attribute on an <input type=range> to an out-of-range value fires oninput https://bugs.webkit.org/show_bug.cgi?id=16990 When setting the range element's value, overflows and underflows are automatically sanitized to valid values. Fixed the behavior and removed tests that were testing for improper behavior. * fast/forms/ValidityState-rangeOverflow-expected.txt: * fast/forms/ValidityState-rangeUnderflow-expected.txt: * fast/forms/input-stepup-stepdown-expected.txt: * fast/forms/script-tests/ValidityState-rangeOverflow.js: * fast/forms/script-tests/ValidityState-rangeUnderflow.js: * fast/forms/script-tests/input-stepup-stepdown.js: * fast/forms/script-tests/validationMessage.js: * fast/forms/validationMessage-expected.txt: Added test verifying that bug 16990 was fixed as well. * fast/forms/range-input-dynamic-oninput-expected.txt: Added. * fast/forms/range-input-dynamic-oninput.html Added. Improved test because handling of this case changed. * fast/forms/range-reset-expected.txt: * fast/forms/range-reset.html: Canonical link: https://commits.webkit.org/47536@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@56242 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing with 317 additions and 219 deletions.
- +33 −0 LayoutTests/ChangeLog
- +0 −15 LayoutTests/fast/forms/ValidityState-rangeOverflow-expected.txt
- +0 −15 LayoutTests/fast/forms/ValidityState-rangeUnderflow-expected.txt
- +55 −40 LayoutTests/fast/forms/input-stepup-stepdown-expected.txt
- +5 −0 LayoutTests/fast/forms/range-input-dynamic-oninput-expected.txt
- +29 −0 LayoutTests/fast/forms/range-input-dynamic-oninput.html
- +15 −1 LayoutTests/fast/forms/range-reset-expected.txt
- +24 −8 LayoutTests/fast/forms/range-reset.html
- +0 −26 LayoutTests/fast/forms/script-tests/ValidityState-rangeOverflow.js
- +0 −25 LayoutTests/fast/forms/script-tests/ValidityState-rangeUnderflow.js
- +85 −49 LayoutTests/fast/forms/script-tests/input-stepup-stepdown.js
- +0 −18 LayoutTests/fast/forms/script-tests/validationMessage.js
- +0 −2 LayoutTests/fast/forms/validationMessage-expected.txt
- +25 −0 WebCore/ChangeLog
- +26 −9 WebCore/html/HTMLInputElement.cpp
- +11 −1 WebCore/html/StepRange.cpp
- +9 −1 WebCore/html/StepRange.h
- +0 −9 WebCore/rendering/RenderSlider.cpp
There are no files selected for viewing
Oops, something went wrong.