DescriptionMerge 122552 - REGRESSION(r119948): [Forms] Spin button Up/Down actions make value to zero for input type "number" when step mismatched
https://bugs.webkit.org/show_bug.cgi?id=91197
Reviewed by Kent Tamura.
Source/WebCore:
This patch fixes implementation of Decimal::ceiling() and floor().
They return wrong value for small fractional numbers.
The bug is occurred when:
- Step-able input type, e.g. number, date, datetime, and so on.
- Current value is step mismatched
- Current value is smaller than step
- Step up/down by spin button
because spin button up/down actions are implemented in InputType::setpUpFromRenderer
which calls Decimal::ceiling() and floor() for step mismatched case.
Tests: fast/forms/number/number-stepup-stepdown-from-renderer.html: Added test cases
WebKit/chromium/tests/DecimalTest.cpp: Added test cases
* platform/Decimal.cpp:
(WebCore::Decimal::ceiling): Changed to return 1 for positive small fractional number.
(WebCore::Decimal::floor): Changed to return -1 for negative small fractional number.
Source/WebKit/chromium:
This patch adds test cases for Decimal::ceiling() and floor() of
positive/negative small fractional numbers.
* tests/DecimalTest.cpp:
(TEST_F):
LayoutTests:
This patch adds new test cases.
* fast/forms/number/number-stepup-stepdown-from-renderer-expected.txt: Updated for new test cases.
* fast/forms/number/number-stepup-stepdown-from-renderer.html: Added new test cases.
TBR=yosin@chromium.org
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=122853
Patch Set 1 #
Messages
Total messages: 1 (0 generated)
|