Index: Source/core/html/HTMLInputElement.cpp |
diff --git a/Source/core/html/HTMLInputElement.cpp b/Source/core/html/HTMLInputElement.cpp |
index 03bb788a82123d35f12d842f94d1dfe6c684e543..331b34cbb75a2ab2b59c197deadf093c1ff9ed16 100644 |
--- a/Source/core/html/HTMLInputElement.cpp |
+++ b/Source/core/html/HTMLInputElement.cpp |
@@ -1054,6 +1054,8 @@ double HTMLInputElement::valueAsNumber() const |
void HTMLInputElement::setValueAsNumber(double newValue, ExceptionState& exceptionState, TextFieldEventBehavior eventBehavior) |
{ |
+ // http://www.whatwg.org/specs/web-apps/current-work/multipage/common-input-element-attributes.html#dom-input-valueasnumber |
+ // On setting, if the new value is infinite, then throw a TypeError exception. |
if (std::isinf(newValue)) { |
exceptionState.throwTypeError(ExceptionMessages::notAFiniteNumber(newValue)); |
return; |