Changeset 64711 in webkit
- Timestamp:
- Aug 4, 2010 10:51:33 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r64707 r64711 1 2010-08-04 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Spin-button behavior improvement for out-of-range values 6 https://bugs.webkit.org/show_bug.cgi?id=43463 7 8 * fast/forms/input-number-outofrange-expected.txt: Added. 9 * fast/forms/input-number-outofrange.html: Added. 10 * fast/forms/script-tests/input-number-outofrange.js: Added. 11 1 12 2010-08-04 Kent Tamura <tkent@chromium.org> 2 13 -
trunk/WebCore/ChangeLog
r64705 r64711 1 2010-08-04 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Spin-button behavior improvement for out-of-range values 6 https://bugs.webkit.org/show_bug.cgi?id=43463 7 8 If the current value is smaller than the minimum value, the up 9 button should change the value to the minimum value. If the 10 current value is larger than the maximum value, the down button 11 should change the value to the maximum value. 12 13 Test: fast/forms/input-number-outofrange.html 14 15 * html/HTMLInputElement.cpp: 16 (WebCore::HTMLInputElement::stepUpFromRenderer): 17 1 18 2010-08-04 Antonio Gomes <tonikitoo@webkit.org> 2 19 -
trunk/WebCore/html/HTMLInputElement.cpp
r64616 r64711 2818 2818 void HTMLInputElement::stepUpFromRenderer(int n) 2819 2819 { 2820 // The difference from stepUp()/stepDown() is: 2821 // If the current value is invalid, the value will be 2822 // - the minimum value if n > 0 2823 // - the maximum value if n < 0 2820 // The differences from stepUp()/stepDown(): 2821 // If the current value is not a number, the value will be 2822 // - The value should be the minimum value if n > 0 2823 // - The value should be the maximum value if n < 0 2824 // If the current value is smaller than the minimum value: 2825 // - The value should be the minimum value if n > 0 2826 // - Nothing should happen if n < 0 2827 // If the current value is larger than the maximum value: 2828 // - The value should be the maximum value if n < 0 2829 // - Nothing should happen if n > 0 2824 2830 2825 2831 ASSERT(hasSpinButton()); … … 2833 2839 String currentStringValue = value(); 2834 2840 double current = parseToDouble(currentStringValue, nan); 2835 if (!isfinite(current) )2841 if (!isfinite(current) || (n > 0 && current < minimum()) || (n < 0 && current > maximum())) 2836 2842 setValue(serialize(n > 0 ? minimum() : maximum())); 2837 2843 else {
Note: See TracChangeset
for help on using the changeset viewer.