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 15 matching lines...) Expand all Loading... |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 */ | 29 */ |
30 | 30 |
31 #ifndef BaseDateAndTimeInputType_h | 31 #ifndef BaseDateAndTimeInputType_h |
32 #define BaseDateAndTimeInputType_h | 32 #define BaseDateAndTimeInputType_h |
33 | 33 |
34 #include "core/html/InputType.h" | 34 #include "core/html/InputType.h" |
35 #include "core/platform/DateComponents.h" | 35 #include "core/platform/DateComponents.h" |
36 #include <wtf/unicode/Unicode.h> | |
37 | 36 |
38 namespace WebCore { | 37 namespace WebCore { |
39 | 38 |
40 // A super class of date, datetime, datetime-local, month, time, and week types. | 39 // A super class of date, datetime, datetime-local, month, time, and week types. |
41 class BaseDateAndTimeInputType : public InputType { | 40 class BaseDateAndTimeInputType : public InputType { |
42 protected: | 41 protected: |
43 BaseDateAndTimeInputType(HTMLInputElement* element) : InputType(element) { } | 42 BaseDateAndTimeInputType(HTMLInputElement* element) : InputType(element) { } |
44 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE; | 43 virtual Decimal parseToNumber(const String&, const Decimal&) const OVERRIDE; |
45 virtual bool parseToDateComponents(const String&, DateComponents*) const OVE
RRIDE; | 44 virtual bool parseToDateComponents(const String&, DateComponents*) const OVE
RRIDE; |
46 virtual String sanitizeValue(const String&) const OVERRIDE; | 45 virtual String sanitizeValue(const String&) const OVERRIDE; |
(...skipping 15 matching lines...) Expand all Loading... |
62 virtual Decimal defaultValueForStepUp() const OVERRIDE; | 61 virtual Decimal defaultValueForStepUp() const OVERRIDE; |
63 virtual bool isSteppable() const OVERRIDE; | 62 virtual bool isSteppable() const OVERRIDE; |
64 virtual String serializeWithMilliseconds(double) const; | 63 virtual String serializeWithMilliseconds(double) const; |
65 virtual String localizeValue(const String&) const OVERRIDE; | 64 virtual String localizeValue(const String&) const OVERRIDE; |
66 virtual bool supportsReadOnly() const OVERRIDE; | 65 virtual bool supportsReadOnly() const OVERRIDE; |
67 virtual bool shouldRespectListAttribute() OVERRIDE; | 66 virtual bool shouldRespectListAttribute() OVERRIDE; |
68 }; | 67 }; |
69 | 68 |
70 } // namespace WebCore | 69 } // namespace WebCore |
71 #endif // BaseDateAndTimeInputType_h | 70 #endif // BaseDateAndTimeInputType_h |
OLD | NEW |