| Index: Source/core/html/forms/NumberInputType.cpp
|
| diff --git a/Source/core/html/forms/NumberInputType.cpp b/Source/core/html/forms/NumberInputType.cpp
|
| index e2d90015378aa6df3ec32ca6067ddcd64147ba9b..53cc2b58516f3b02dde4cc6c8beea79ae087dda3 100644
|
| --- a/Source/core/html/forms/NumberInputType.cpp
|
| +++ b/Source/core/html/forms/NumberInputType.cpp
|
| @@ -124,6 +124,7 @@ double NumberInputType::valueAsDouble() const
|
| void NumberInputType::setValueAsDouble(double newValue, TextFieldEventBehavior eventBehavior, ExceptionState& exceptionState) const
|
| {
|
| // FIXME: We should use numeric_limits<double>::max for number input type.
|
| + // (NOTE: the range check will not be true for NaN.)
|
| const double floatMax = numeric_limits<float>::max();
|
| if (newValue < -floatMax || newValue > floatMax) {
|
| exceptionState.throwDOMException(InvalidStateError, "The value provided (" + String::number(newValue) + ") is outside the range (" + String::number(-floatMax) + ", " + String::number(floatMax) + ").");
|
|
|