Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Issue 136783006: Upgrade stepUp()/stepDown() implementation to match spec. (Closed)

Created:
6 years, 10 months ago by sof
Modified:
6 years, 10 months ago
Reviewers:
tkent, keishi, yosin_UTC9
CC:
blink-reviews, dglazkov+blink, adamk+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Visibility:
Public.

Description

Upgrade stepUp()/stepDown() implementation to match spec. The spec for stepUp()/stepDown() http://www.whatwg.org/specs/web-apps/current-work/#dom-input-stepdown requires that out-of-step values snap to step, just like the UI implementation will do. Hence, bring the required clamping/snapping handling into scope. Also, stepUp()/stepDown() shouldn't throw if the current value is not a number, nor if the resulting stepped-to value is too far out of range. Snapping to range (modulo step base) is what's supposed to happen now. R=yosin@chromium.org,keishi1@chromium.org,tkent@chromium.org BUG=339194 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166525

Patch Set 1 #

Total comments: 7

Patch Set 2 : Code review improvements #

Total comments: 2

Patch Set 3 : applyStep(): add missing EventQueueScope #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -277 lines) Patch
M LayoutTests/fast/forms/date/date-stepup-stepdown.html View 2 chunks +20 lines, -20 lines 0 comments Download
M LayoutTests/fast/forms/date/date-stepup-stepdown-expected.txt View 3 chunks +8 lines, -8 lines 0 comments Download
M LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown.html View 2 chunks +19 lines, -19 lines 0 comments Download
M LayoutTests/fast/forms/datetimelocal/datetimelocal-stepup-stepdown-expected.txt View 2 chunks +7 lines, -7 lines 0 comments Download
M LayoutTests/fast/forms/month/month-stepup-stepdown.html View 2 chunks +19 lines, -19 lines 0 comments Download
M LayoutTests/fast/forms/month/month-stepup-stepdown-expected.txt View 2 chunks +7 lines, -7 lines 0 comments Download
M LayoutTests/fast/forms/number/number-stepup-stepdown.html View 3 chunks +16 lines, -17 lines 0 comments Download
M LayoutTests/fast/forms/number/number-stepup-stepdown-expected.txt View 2 chunks +15 lines, -16 lines 0 comments Download
M LayoutTests/fast/forms/range/range-stepup-stepdown.html View 1 3 chunks +14 lines, -20 lines 0 comments Download
M LayoutTests/fast/forms/range/range-stepup-stepdown-expected.txt View 2 chunks +14 lines, -17 lines 0 comments Download
M LayoutTests/fast/forms/time/time-stepup-stepdown.html View 2 chunks +21 lines, -21 lines 0 comments Download
M LayoutTests/fast/forms/time/time-stepup-stepdown-expected.txt View 2 chunks +9 lines, -9 lines 0 comments Download
M LayoutTests/fast/forms/week/week-stepup-stepdown.html View 2 chunks +19 lines, -19 lines 0 comments Download
M LayoutTests/fast/forms/week/week-stepup-stepdown-expected.txt View 2 chunks +7 lines, -7 lines 0 comments Download
M Source/core/html/forms/DateInputType.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/forms/DateTimeLocalInputType.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/forms/InputType.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/forms/InputType.cpp View 1 2 6 chunks +53 lines, -65 lines 0 comments Download
M Source/core/html/forms/StepRange.h View 1 2 chunks +1 line, -1 line 0 comments Download
M Source/core/html/forms/StepRange.cpp View 1 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/forms/TimeInputType.cpp View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 19 (0 generated)
sof
When you next have some time, please take a look. For the test changes, I ...
6 years, 10 months ago (2014-02-04 11:30:59 UTC) #1
yosin_UTC9
https://codereview.chromium.org/136783006/diff/1/LayoutTests/fast/forms/date/date-stepup-stepdown.html File LayoutTests/fast/forms/date/date-stepup-stepdown.html (right): https://codereview.chromium.org/136783006/diff/1/LayoutTests/fast/forms/date/date-stepup-stepdown.html#newcode51 LayoutTests/fast/forms/date/date-stepup-stepdown.html:51: shouldBeEqualToString('stepDown("1970-01-04", "2", null)', '1970-01-03'); I'm not sure why result ...
6 years, 10 months ago (2014-02-05 01:30:43 UTC) #2
tkent
+keishi
6 years, 10 months ago (2014-02-05 01:46:58 UTC) #3
keishi
lgtm https://codereview.chromium.org/136783006/diff/1/LayoutTests/fast/forms/date/date-stepup-stepdown.html File LayoutTests/fast/forms/date/date-stepup-stepdown.html (right): https://codereview.chromium.org/136783006/diff/1/LayoutTests/fast/forms/date/date-stepup-stepdown.html#newcode51 LayoutTests/fast/forms/date/date-stepup-stepdown.html:51: shouldBeEqualToString('stepDown("1970-01-04", "2", null)', '1970-01-03'); On 2014/02/05 01:30:43, Yoshi ...
6 years, 10 months ago (2014-02-05 02:26:35 UTC) #4
sof
Thanks for going through all these step changes in detail. (Provided the bots turns green, ...
6 years, 10 months ago (2014-02-05 07:48:53 UTC) #5
tkent
https://codereview.chromium.org/136783006/diff/120001/Source/core/html/forms/InputType.cpp File Source/core/html/forms/InputType.cpp (right): https://codereview.chromium.org/136783006/diff/120001/Source/core/html/forms/InputType.cpp#newcode833 Source/core/html/forms/InputType.cpp:833: applyStep(newValue, count - 1, AnyIsDefaultStep, DispatchChangeEvent, IGNORE_EXCEPTION); Please add ...
6 years, 10 months ago (2014-02-05 08:33:23 UTC) #6
sof
https://codereview.chromium.org/136783006/diff/120001/Source/core/html/forms/InputType.cpp File Source/core/html/forms/InputType.cpp (right): https://codereview.chromium.org/136783006/diff/120001/Source/core/html/forms/InputType.cpp#newcode833 Source/core/html/forms/InputType.cpp:833: applyStep(newValue, count - 1, AnyIsDefaultStep, DispatchChangeEvent, IGNORE_EXCEPTION); On 2014/02/05 ...
6 years, 10 months ago (2014-02-05 08:42:50 UTC) #7
tkent
lgtm
6 years, 10 months ago (2014-02-05 08:48:37 UTC) #8
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 10 months ago (2014-02-05 09:05:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/136783006/190001
6 years, 10 months ago (2014-02-05 09:05:45 UTC) #10
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-05 12:10:56 UTC) #11
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=10996
6 years, 10 months ago (2014-02-05 12:11:02 UTC) #12
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 10 months ago (2014-02-05 12:12:41 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/136783006/190001
6 years, 10 months ago (2014-02-05 12:12:55 UTC) #14
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-05 14:09:21 UTC) #15
commit-bot: I haz the power
Retried try job too often on linux_blink for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_blink&number=11038
6 years, 10 months ago (2014-02-05 14:09:21 UTC) #16
sof
The CQ bit was checked by sigbjornf@opera.com
6 years, 10 months ago (2014-02-05 17:27:19 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/136783006/190001
6 years, 10 months ago (2014-02-05 17:27:32 UTC) #18
commit-bot: I haz the power
6 years, 10 months ago (2014-02-05 18:21:15 UTC) #19
Message was sent while issue was closed.
Change committed as 166525

Powered by Google App Engine
This is Rietveld 408576698