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

Unified Diff: Source/core/html/HTMLInputElement.cpp

Issue 262753004: Replace all remaining IDL finitude type checks with [TypeChecking=Unrestricted] (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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;
« no previous file with comments | « LayoutTests/media/track/text-track-cue-exceptions-expected.txt ('k') | Source/core/html/HTMLInputElement.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698