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

Issue 149413004: HTMLInputElement.valueAsNumber compliance (NaN handling.) (Closed)

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

Description

HTMLInputElement.valueAsNumber compliance (NaN handling.) Change the valueAsNumber setter to follow the spec more closely: http://www.whatwg.org/specs/web-apps/current-work/#dom-input-valueasnumber - throw TypeError instead of NotSupportedError if the new value is infinite. - if the input element type supports 'valueAsNumber', then no longer throw for NaN values, but consider this as setting the empty string. - better InvalidStateError error message when attempting to update 'valueAsNumber'. This aligns with the spec as well as Gecko. And Trident (IE11) with respect to NaN handling. R=mkwst@chromium.org BUG= Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=166112

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+203 lines, -161 lines) Patch
M LayoutTests/fast/forms/date/input-valueasdate-date.html View 1 chunk +13 lines, -13 lines 0 comments Download
M LayoutTests/fast/forms/date/input-valueasnumber-date.html View 1 chunk +11 lines, -7 lines 0 comments Download
M LayoutTests/fast/forms/date/input-valueasnumber-date-expected.txt View 1 chunk +11 lines, -7 lines 0 comments Download
M LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal.html View 1 chunk +20 lines, -16 lines 0 comments Download
M LayoutTests/fast/forms/datetimelocal/input-valueasnumber-datetimelocal-expected.txt View 1 chunk +11 lines, -7 lines 0 comments Download
M LayoutTests/fast/forms/input-valueasnumber-unsupported.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/fast/forms/input-valueasnumber-unsupported-expected.txt View 1 chunk +16 lines, -16 lines 0 comments Download
M LayoutTests/fast/forms/month/input-valueasnumber-month.html View 1 chunk +9 lines, -6 lines 0 comments Download
M LayoutTests/fast/forms/month/input-valueasnumber-month-expected.txt View 1 chunk +9 lines, -6 lines 0 comments Download
M LayoutTests/fast/forms/number/number-valueasnumber.html View 1 chunk +16 lines, -16 lines 0 comments Download
M LayoutTests/fast/forms/number/number-valueasnumber-expected.txt View 1 chunk +6 lines, -6 lines 0 comments Download
M LayoutTests/fast/forms/range/input-valueasnumber-range.html View 2 chunks +21 lines, -17 lines 0 comments Download
M LayoutTests/fast/forms/range/input-valueasnumber-range-expected.txt View 1 chunk +7 lines, -6 lines 0 comments Download
M LayoutTests/fast/forms/time/time-valueasnumber.html View 1 chunk +9 lines, -6 lines 0 comments Download
M LayoutTests/fast/forms/time/time-valueasnumber-expected.txt View 1 chunk +9 lines, -6 lines 0 comments Download
M LayoutTests/fast/forms/week/input-valueasnumber-week.html View 1 chunk +11 lines, -7 lines 0 comments Download
M LayoutTests/fast/forms/week/input-valueasnumber-week-expected.txt View 1 chunk +11 lines, -7 lines 0 comments Download
M Source/core/html/HTMLInputElement.cpp View 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/html/forms/BaseDateAndTimeInputType.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/forms/BaseDateAndTimeInputType.cpp View 1 chunk +2 lines, -2 lines 2 comments Download
M Source/core/html/forms/InputType.cpp View 1 chunk +3 lines, -3 lines 0 comments Download
M Source/core/html/forms/NumberInputType.cpp View 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/html/forms/RangeInputType.h View 1 chunk +1 line, -1 line 0 comments Download
M Source/core/html/forms/RangeInputType.cpp View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
sof
When you next have a spare moment, please take a look.
6 years, 10 months ago (2014-01-29 11:00:12 UTC) #1
Mike West
LGTM with one question. https://codereview.chromium.org/149413004/diff/1/Source/core/html/forms/BaseDateAndTimeInputType.cpp File Source/core/html/forms/BaseDateAndTimeInputType.cpp (right): https://codereview.chromium.org/149413004/diff/1/Source/core/html/forms/BaseDateAndTimeInputType.cpp#newcode67 Source/core/html/forms/BaseDateAndTimeInputType.cpp:67: void BaseDateAndTimeInputType::setValueAsDouble(double newValue, TextFieldEventBehavior eventBehavior, ...
6 years, 10 months ago (2014-01-29 19:31:36 UTC) #2
sof
Thanks for having a close look. I'll sit on this one overnight so that tkent ...
6 years, 10 months ago (2014-01-29 19:53:41 UTC) #3
tkent
lgtm
6 years, 10 months ago (2014-01-30 01:11:41 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/149413004/1
6 years, 10 months ago (2014-01-30 01:11:51 UTC) #5
commit-bot: I haz the power
CQ bit was unchecked on CL. Ignoring.
6 years, 10 months ago (2014-01-30 08:16:39 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/sigbjornf@opera.com/149413004/1
6 years, 10 months ago (2014-01-30 08:26:08 UTC) #7
commit-bot: I haz the power
Change committed as 166112
6 years, 10 months ago (2014-01-30 09:35:09 UTC) #8
commit-bot: I haz the power
6 years, 10 months ago (2014-01-30 09:36:06 UTC) #9
Message was sent while issue was closed.
CQ bit was unchecked on CL. Ignoring.

Powered by Google App Engine
This is Rietveld 408576698