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

Unified Diff: Source/core/html/forms/BaseDateAndTimeInputType.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
« no previous file with comments | « Source/core/html/forms/BaseDateAndTimeInputType.h ('k') | Source/core/html/forms/InputType.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/forms/BaseDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseDateAndTimeInputType.cpp b/Source/core/html/forms/BaseDateAndTimeInputType.cpp
index bf87e948cc0f52c30c0bc49b9912411dd1313c28..6868f8a56a415585809f3d5f1134a54a26256a55 100644
--- a/Source/core/html/forms/BaseDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseDateAndTimeInputType.cpp
@@ -64,9 +64,9 @@ double BaseDateAndTimeInputType::valueAsDouble() const
return value.isFinite() ? value.toDouble() : DateComponents::invalidMilliseconds();
}
-void BaseDateAndTimeInputType::setValueAsDecimal(const Decimal& newValue, TextFieldEventBehavior eventBehavior, ExceptionState&) const
+void BaseDateAndTimeInputType::setValueAsDouble(double newValue, TextFieldEventBehavior eventBehavior, ExceptionState& exceptionState) const
Mike West 2014/01/29 19:31:37 Why did this change from `Decimal` to `double`?
sof 2014/01/29 19:53:41 Good question, not sure I have a succinct answer,
{
- element().setValue(serialize(newValue), eventBehavior);
+ setValueAsDecimal(Decimal::fromDouble(newValue), eventBehavior, exceptionState);
}
bool BaseDateAndTimeInputType::typeMismatchFor(const String& value) const
« no previous file with comments | « Source/core/html/forms/BaseDateAndTimeInputType.h ('k') | Source/core/html/forms/InputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698