Index: Source/core/html/forms/TimeInputType.cpp |
diff --git a/Source/core/html/TimeInputType.cpp b/Source/core/html/forms/TimeInputType.cpp |
similarity index 92% |
rename from Source/core/html/TimeInputType.cpp |
rename to Source/core/html/forms/TimeInputType.cpp |
index 767c67acb3e0a74fd8921a1f5df0dec96f910fef..08ee92d234e9527fcd2eeda337d92f4e895ca3cf 100644 |
--- a/Source/core/html/TimeInputType.cpp |
+++ b/Source/core/html/forms/TimeInputType.cpp |
@@ -29,22 +29,19 @@ |
*/ |
#include "config.h" |
-#include "core/html/TimeInputType.h" |
+#include "core/html/forms/TimeInputType.h" |
#include "HTMLNames.h" |
#include "core/html/HTMLInputElement.h" |
-#include "core/html/InputTypeNames.h" |
+#include "core/html/forms/DateTimeFieldsState.h" |
+#include "core/html/forms/InputTypeNames.h" |
#include "core/platform/DateComponents.h" |
+#include "core/platform/text/PlatformLocale.h" |
#include "wtf/CurrentTime.h" |
#include "wtf/DateMath.h" |
#include "wtf/MathExtras.h" |
#include "wtf/PassOwnPtr.h" |
- |
-#if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
-#include "core/html/DateTimeFieldsState.h" |
-#include "core/platform/text/PlatformLocale.h" |
#include "wtf/text/WTFString.h" |
-#endif |
namespace WebCore { |
@@ -141,17 +138,19 @@ String TimeInputType::formatDateTimeFieldsState(const DateTimeFieldsState& dateT |
{ |
if (!dateTimeFieldsState.hasHour() || !dateTimeFieldsState.hasMinute() || !dateTimeFieldsState.hasAMPM()) |
return emptyString(); |
- if (dateTimeFieldsState.hasMillisecond() && dateTimeFieldsState.millisecond()) |
+ if (dateTimeFieldsState.hasMillisecond() && dateTimeFieldsState.millisecond()) { |
return String::format("%02u:%02u:%02u.%03u", |
- dateTimeFieldsState.hour23(), |
- dateTimeFieldsState.minute(), |
- dateTimeFieldsState.hasSecond() ? dateTimeFieldsState.second() : 0, |
- dateTimeFieldsState.millisecond()); |
- if (dateTimeFieldsState.hasSecond() && dateTimeFieldsState.second()) |
+ dateTimeFieldsState.hour23(), |
+ dateTimeFieldsState.minute(), |
+ dateTimeFieldsState.hasSecond() ? dateTimeFieldsState.second() : 0, |
+ dateTimeFieldsState.millisecond()); |
+ } |
+ if (dateTimeFieldsState.hasSecond() && dateTimeFieldsState.second()) { |
return String::format("%02u:%02u:%02u", |
- dateTimeFieldsState.hour23(), |
- dateTimeFieldsState.minute(), |
- dateTimeFieldsState.second()); |
+ dateTimeFieldsState.hour23(), |
+ dateTimeFieldsState.minute(), |
+ dateTimeFieldsState.second()); |
+ } |
return String::format("%02u:%02u", dateTimeFieldsState.hour23(), dateTimeFieldsState.minute()); |
} |