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

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

Issue 24246011: Move form-related 78 files to core/html/forms/. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 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/TimeInputType.h ('k') | Source/core/html/forms/TypeAhead.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
}
« no previous file with comments | « Source/core/html/forms/TimeInputType.h ('k') | Source/core/html/forms/TypeAhead.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698