OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 12 matching lines...) Expand all Loading... |
23 * SUCH DAMAGE. | 23 * SUCH DAMAGE. |
24 */ | 24 */ |
25 | 25 |
26 #ifndef DateTimeEditElement_h | 26 #ifndef DateTimeEditElement_h |
27 #define DateTimeEditElement_h | 27 #define DateTimeEditElement_h |
28 | 28 |
29 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) | 29 #if ENABLE(INPUT_MULTIPLE_FIELDS_UI) |
30 #include "core/html/forms/StepRange.h" | 30 #include "core/html/forms/StepRange.h" |
31 #include "core/html/shadow/DateTimeFieldElement.h" | 31 #include "core/html/shadow/DateTimeFieldElement.h" |
32 #include "platform/DateComponents.h" | 32 #include "platform/DateComponents.h" |
| 33 #include "wtf/Allocator.h" |
33 | 34 |
34 namespace blink { | 35 namespace blink { |
35 | 36 |
36 class DateTimeFieldsState; | 37 class DateTimeFieldsState; |
37 class Locale; | 38 class Locale; |
38 class StepRange; | 39 class StepRange; |
39 | 40 |
40 // DateTimeEditElement class contains numberic field and symbolc field for | 41 // DateTimeEditElement class contains numberic field and symbolc field for |
41 // representing date and time, such as | 42 // representing date and time, such as |
42 // - Year, Month, Day Of Month | 43 // - Year, Month, Day Of Month |
(...skipping 12 matching lines...) Expand all Loading... |
55 virtual void didFocusOnControl() = 0; | 56 virtual void didFocusOnControl() = 0; |
56 virtual void editControlValueChanged() = 0; | 57 virtual void editControlValueChanged() = 0; |
57 virtual String formatDateTimeFieldsState(const DateTimeFieldsState&) con
st = 0; | 58 virtual String formatDateTimeFieldsState(const DateTimeFieldsState&) con
st = 0; |
58 virtual bool isEditControlOwnerDisabled() const = 0; | 59 virtual bool isEditControlOwnerDisabled() const = 0; |
59 virtual bool isEditControlOwnerReadOnly() const = 0; | 60 virtual bool isEditControlOwnerReadOnly() const = 0; |
60 virtual AtomicString localeIdentifier() const = 0; | 61 virtual AtomicString localeIdentifier() const = 0; |
61 virtual void editControlDidChangeValueByKeyboard() = 0; | 62 virtual void editControlDidChangeValueByKeyboard() = 0; |
62 }; | 63 }; |
63 | 64 |
64 struct LayoutParameters { | 65 struct LayoutParameters { |
| 66 STACK_ALLOCATED(); |
65 String dateTimeFormat; | 67 String dateTimeFormat; |
66 String fallbackDateTimeFormat; | 68 String fallbackDateTimeFormat; |
67 Locale& locale; | 69 Locale& locale; |
68 const StepRange stepRange; | 70 const StepRange stepRange; |
69 DateComponents minimum; | 71 DateComponents minimum; |
70 DateComponents maximum; | 72 DateComponents maximum; |
71 String placeholderForDay; | 73 String placeholderForDay; |
72 String placeholderForMonth; | 74 String placeholderForMonth; |
73 String placeholderForYear; | 75 String placeholderForYear; |
74 | 76 |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
151 WillBeHeapVector<RawPtrWillBeMember<DateTimeFieldElement>, maximumNumberOfFi
elds> m_fields; | 153 WillBeHeapVector<RawPtrWillBeMember<DateTimeFieldElement>, maximumNumberOfFi
elds> m_fields; |
152 RawPtrWillBeMember<EditControlOwner> m_editControlOwner; | 154 RawPtrWillBeMember<EditControlOwner> m_editControlOwner; |
153 }; | 155 }; |
154 | 156 |
155 DEFINE_TYPE_CASTS(DateTimeEditElement, Element, element, element->isDateTimeEdit
Element(), element.isDateTimeEditElement()); | 157 DEFINE_TYPE_CASTS(DateTimeEditElement, Element, element, element->isDateTimeEdit
Element(), element.isDateTimeEditElement()); |
156 | 158 |
157 } // namespace blink | 159 } // namespace blink |
158 | 160 |
159 #endif | 161 #endif |
160 #endif | 162 #endif |
OLD | NEW |