| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "config.h" | 31 #include "config.h" |
| 32 #include "core/html/DateInputType.h" | 32 #include "core/html/DateInputType.h" |
| 33 | 33 |
| 34 #include "HTMLNames.h" | 34 #include "HTMLNames.h" |
| 35 #include "core/html/DateTimeFieldsState.h" | 35 #include "core/html/DateTimeFieldsState.h" |
| 36 #include "core/html/HTMLInputElement.h" | 36 #include "core/html/HTMLInputElement.h" |
| 37 #include "core/html/InputTypeNames.h" | 37 #include "core/html/InputTypeNames.h" |
| 38 #include "core/platform/DateComponents.h" | 38 #include "core/platform/DateComponents.h" |
| 39 #include "core/platform/LocalizedStrings.h" | 39 #include "core/platform/LocalizedStrings.h" |
| 40 #include "core/platform/text/PlatformLocale.h" | 40 #include "core/platform/text/PlatformLocale.h" |
| 41 #include <wtf/PassOwnPtr.h> | 41 #include "wtf/PassOwnPtr.h" |
| 42 | 42 |
| 43 namespace WebCore { | 43 namespace WebCore { |
| 44 | 44 |
| 45 using namespace HTMLNames; | 45 using namespace HTMLNames; |
| 46 | 46 |
| 47 static const int dateDefaultStep = 1; | 47 static const int dateDefaultStep = 1; |
| 48 static const int dateDefaultStepBase = 0; | 48 static const int dateDefaultStepBase = 0; |
| 49 static const int dateStepScaleFactor = 86400000; | 49 static const int dateStepScaleFactor = 86400000; |
| 50 | 50 |
| 51 inline DateInputType::DateInputType(HTMLInputElement* element) | 51 inline DateInputType::DateInputType(HTMLInputElement* element) |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 layoutParameters.placeholderForYear = placeholderForYearField(); | 124 layoutParameters.placeholderForYear = placeholderForYearField(); |
| 125 } | 125 } |
| 126 | 126 |
| 127 bool DateInputType::isValidFormat(bool hasYear, bool hasMonth, bool hasWeek, boo
l hasDay, bool hasAMPM, bool hasHour, bool hasMinute, bool hasSecond) const | 127 bool DateInputType::isValidFormat(bool hasYear, bool hasMonth, bool hasWeek, boo
l hasDay, bool hasAMPM, bool hasHour, bool hasMinute, bool hasSecond) const |
| 128 { | 128 { |
| 129 return hasYear && hasMonth && hasDay; | 129 return hasYear && hasMonth && hasDay; |
| 130 } | 130 } |
| 131 #endif | 131 #endif |
| 132 | 132 |
| 133 } // namespace WebCore | 133 } // namespace WebCore |
| OLD | NEW |