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 27 matching lines...) Expand all Loading... |
38 class ExceptionState; | 38 class ExceptionState; |
39 | 39 |
40 class DateTimeLocalInputType final : public BaseTemporalInputType { | 40 class DateTimeLocalInputType final : public BaseTemporalInputType { |
41 public: | 41 public: |
42 static InputType* create(HTMLInputElement&); | 42 static InputType* create(HTMLInputElement&); |
43 | 43 |
44 private: | 44 private: |
45 explicit DateTimeLocalInputType(HTMLInputElement& element) | 45 explicit DateTimeLocalInputType(HTMLInputElement& element) |
46 : BaseTemporalInputType(element) {} | 46 : BaseTemporalInputType(element) {} |
47 | 47 |
| 48 String sanitizeValue(const String&) const override; |
48 void countUsage() override; | 49 void countUsage() override; |
49 const AtomicString& formControlType() const override; | 50 const AtomicString& formControlType() const override; |
50 double valueAsDate() const override; | 51 double valueAsDate() const override; |
51 void setValueAsDate(double, ExceptionState&) const override; | 52 void setValueAsDate(double, ExceptionState&) const override; |
52 StepRange createStepRange(AnyStepHandling) const override; | 53 StepRange createStepRange(AnyStepHandling) const override; |
53 bool parseToDateComponentsInternal(const String&, | 54 bool parseToDateComponentsInternal(const String&, |
54 DateComponents*) const override; | 55 DateComponents*) const override; |
55 bool setMillisecondToDateComponents(double, DateComponents*) const override; | 56 bool setMillisecondToDateComponents(double, DateComponents*) const override; |
56 String localizeValue(const String&) const override; | 57 String localizeValue(const String&) const override; |
57 void warnIfValueIsInvalid(const String&) const override; | 58 void warnIfValueIsInvalid(const String&) const override; |
58 | 59 |
59 // BaseTemporalInputType functions | 60 // BaseTemporalInputType functions |
60 String formatDateTimeFieldsState(const DateTimeFieldsState&) const final; | 61 String formatDateTimeFieldsState(const DateTimeFieldsState&) const final; |
61 void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, | 62 void setupLayoutParameters(DateTimeEditElement::LayoutParameters&, |
62 const DateComponents&) const final; | 63 const DateComponents&) const final; |
63 bool isValidFormat(bool hasYear, | 64 bool isValidFormat(bool hasYear, |
64 bool hasMonth, | 65 bool hasMonth, |
65 bool hasWeek, | 66 bool hasWeek, |
66 bool hasDay, | 67 bool hasDay, |
67 bool hasAMPM, | 68 bool hasAMPM, |
68 bool hasHour, | 69 bool hasHour, |
69 bool hasMinute, | 70 bool hasMinute, |
70 bool hasSecond) const override; | 71 bool hasSecond) const override; |
71 }; | 72 }; |
72 | 73 |
73 } // namespace blink | 74 } // namespace blink |
74 | 75 |
75 #endif // DateTimeLocalInputType_h | 76 #endif // DateTimeLocalInputType_h |
OLD | NEW |