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

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

Issue 62083004: Transfer date/time value to the chooser as a double (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@datetime3
Patch Set: Created 7 years, 1 month 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/BaseMultipleFieldsDateAndTimeInputType.cpp
diff --git a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
index 2119202bf5c6ceefacc728138e39d099a90e387c..8dce88479393e8d908688caead0aaef4cab31009 100644
--- a/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
+++ b/Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.cpp
@@ -262,6 +262,15 @@ void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(const St
edit->setOnlyYearMonthDay(date);
}
+void BaseMultipleFieldsDateAndTimeInputType::pickerIndicatorChooseValue(double value)
+{
+ ASSERT(std::isfinite(value) || std::isnan(value));
+ if (std::isnan(value))
+ element().setValue(emptyString(), DispatchInputAndChangeEvent);
+ else
+ element().setValueAsNumber(value, ASSERT_NO_EXCEPTION, DispatchInputAndChangeEvent);
+}
+
bool BaseMultipleFieldsDateAndTimeInputType::setupDateTimeChooserParameters(DateTimeChooserParameters& parameters)
{
return element().setupDateTimeChooserParameters(parameters);
« no previous file with comments | « Source/core/html/forms/BaseMultipleFieldsDateAndTimeInputType.h ('k') | Source/core/html/shadow/PickerIndicatorElement.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698