OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
4 * (C) 2000 Dirk Mueller (mueller@kde.org) | 4 * (C) 2000 Dirk Mueller (mueller@kde.org) |
5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. | 5 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights
reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "core/html/HTMLElement.h" | 28 #include "core/html/HTMLElement.h" |
29 #include "core/html/HTMLFormControlElement.h" | 29 #include "core/html/HTMLFormControlElement.h" |
30 #include "core/html/forms/RadioButtonGroupScope.h" | 30 #include "core/html/forms/RadioButtonGroupScope.h" |
31 #include "core/loader/FormSubmission.h" | 31 #include "core/loader/FormSubmission.h" |
32 #include "wtf/OwnPtr.h" | 32 #include "wtf/OwnPtr.h" |
33 | 33 |
34 namespace blink { | 34 namespace blink { |
35 | 35 |
36 class Event; | 36 class Event; |
37 class FormAssociatedElement; | 37 class FormAssociatedElement; |
38 class GenericEventQueue; | |
39 class HTMLFormControlElement; | 38 class HTMLFormControlElement; |
40 class HTMLFormControlsCollection; | 39 class HTMLFormControlsCollection; |
41 class HTMLImageElement; | 40 class HTMLImageElement; |
42 class RadioNodeListOrElement; | 41 class RadioNodeListOrElement; |
43 | 42 |
44 class CORE_EXPORT HTMLFormElement final : public HTMLElement { | 43 class CORE_EXPORT HTMLFormElement final : public HTMLElement { |
45 DEFINE_WRAPPERTYPEINFO(); | 44 DEFINE_WRAPPERTYPEINFO(); |
46 public: | 45 public: |
47 static HTMLFormElement* create(Document&); | 46 static HTMLFormElement* create(Document&); |
48 ~HTMLFormElement() override; | 47 ~HTMLFormElement() override; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 | 86 |
88 // Find the 'default button.' | 87 // Find the 'default button.' |
89 // https://html.spec.whatwg.org/multipage/forms.html#default-button | 88 // https://html.spec.whatwg.org/multipage/forms.html#default-button |
90 HTMLFormControlElement* findDefaultButton() const; | 89 HTMLFormControlElement* findDefaultButton() const; |
91 | 90 |
92 bool checkValidity(); | 91 bool checkValidity(); |
93 bool reportValidity(); | 92 bool reportValidity(); |
94 bool matchesValidityPseudoClasses() const final; | 93 bool matchesValidityPseudoClasses() const final; |
95 bool isValidElement() final; | 94 bool isValidElement() final; |
96 | 95 |
97 enum AutocompleteResult { | |
98 AutocompleteResultSuccess, | |
99 AutocompleteResultErrorDisabled, | |
100 AutocompleteResultErrorCancel, | |
101 AutocompleteResultErrorInvalid, | |
102 }; | |
103 | |
104 void requestAutocomplete(); | |
105 void finishRequestAutocomplete(AutocompleteResult); | |
106 | |
107 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); | |
108 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); | |
109 | |
110 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc
ope; } | 96 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc
ope; } |
111 | 97 |
112 const FormAssociatedElement::List& associatedElements() const; | 98 const FormAssociatedElement::List& associatedElements() const; |
113 const HeapVector<Member<HTMLImageElement>>& imageElements(); | 99 const HeapVector<Member<HTMLImageElement>>& imageElements(); |
114 | 100 |
115 void anonymousNamedGetter(const AtomicString& name, RadioNodeListOrElement&)
; | 101 void anonymousNamedGetter(const AtomicString& name, RadioNodeListOrElement&)
; |
116 void invalidateDefaultButtonStyle() const; | 102 void invalidateDefaultButtonStyle() const; |
117 | 103 |
118 private: | 104 private: |
119 explicit HTMLFormElement(Document&); | 105 explicit HTMLFormElement(Document&); |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 bool m_hasElementsAssociatedByParser : 1; | 156 bool m_hasElementsAssociatedByParser : 1; |
171 bool m_hasElementsAssociatedByFormAttribute : 1; | 157 bool m_hasElementsAssociatedByFormAttribute : 1; |
172 bool m_didFinishParsingChildren : 1; | 158 bool m_didFinishParsingChildren : 1; |
173 | 159 |
174 bool m_isSubmittingOrInUserJSSubmitEvent : 1; | 160 bool m_isSubmittingOrInUserJSSubmitEvent : 1; |
175 bool m_shouldSubmit : 1; | 161 bool m_shouldSubmit : 1; |
176 | 162 |
177 bool m_isInResetFunction : 1; | 163 bool m_isInResetFunction : 1; |
178 | 164 |
179 bool m_wasDemoted : 1; | 165 bool m_wasDemoted : 1; |
180 | |
181 Member<GenericEventQueue> m_pendingAutocompleteEventsQueue; | |
182 }; | 166 }; |
183 | 167 |
184 } // namespace blink | 168 } // namespace blink |
185 | 169 |
186 #endif // HTMLFormElement_h | 170 #endif // HTMLFormElement_h |
OLD | NEW |