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

Unified Diff: Source/core/html/forms/RangeInputType.cpp

Issue 149413004: HTMLInputElement.valueAsNumber compliance (NaN handling.) (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 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/forms/RangeInputType.cpp
diff --git a/Source/core/html/forms/RangeInputType.cpp b/Source/core/html/forms/RangeInputType.cpp
index c2358d33763651eea7ebeaab0e2ed06f05d1a545..55066fcc48871707f8d234f19cac199c48c9d8ab 100644
--- a/Source/core/html/forms/RangeInputType.cpp
+++ b/Source/core/html/forms/RangeInputType.cpp
@@ -105,9 +105,9 @@ double RangeInputType::valueAsDouble() const
return parseToDoubleForNumberType(element().value());
}
-void RangeInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState&) const
+void RangeInputType::setValueAsDouble(double newValue, TextFieldEventBehavior eventBehavior, ExceptionState& exceptionState) const
{
- element().setValue(serialize(newValue), eventBehavior);
+ setValueAsDecimal(Decimal::fromDouble(newValue), eventBehavior, exceptionState);
}
bool RangeInputType::typeMismatchFor(const String& value) const

Powered by Google App Engine
This is Rietveld 408576698