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 11 matching lines...) Expand all Loading... |
22 */ | 22 */ |
23 | 23 |
24 #ifndef HTMLFormElement_h | 24 #ifndef HTMLFormElement_h |
25 #define HTMLFormElement_h | 25 #define HTMLFormElement_h |
26 | 26 |
27 #include "core/html/HTMLElement.h" | 27 #include "core/html/HTMLElement.h" |
28 #include "core/html/HTMLFormControlElement.h" | 28 #include "core/html/HTMLFormControlElement.h" |
29 #include "core/html/forms/RadioButtonGroupScope.h" | 29 #include "core/html/forms/RadioButtonGroupScope.h" |
30 #include "core/loader/FormSubmission.h" | 30 #include "core/loader/FormSubmission.h" |
31 #include "wtf/OwnPtr.h" | 31 #include "wtf/OwnPtr.h" |
| 32 #include "wtf/RefPtr.h" |
32 #include "wtf/WeakPtr.h" | 33 #include "wtf/WeakPtr.h" |
33 | 34 |
34 namespace WTF{ | 35 namespace WTF{ |
35 class TextEncoding; | 36 class TextEncoding; |
36 } | 37 } |
37 | 38 |
38 namespace WebCore { | 39 namespace WebCore { |
39 | 40 |
| 41 class AutocompleteRequest; |
40 class Event; | 42 class Event; |
41 class FormAssociatedElement; | 43 class FormAssociatedElement; |
42 class FormData; | 44 class FormData; |
43 class HTMLFormControlElement; | 45 class HTMLFormControlElement; |
44 class HTMLImageElement; | 46 class HTMLImageElement; |
45 class HTMLInputElement; | 47 class HTMLInputElement; |
| 48 class ScriptPromise; |
46 | 49 |
47 class HTMLFormElement FINAL : public HTMLElement { | 50 class HTMLFormElement FINAL : public HTMLElement { |
48 public: | 51 public: |
49 static PassRefPtr<HTMLFormElement> create(Document&); | 52 static PassRefPtr<HTMLFormElement> create(Document&); |
50 virtual ~HTMLFormElement(); | 53 virtual ~HTMLFormElement(); |
51 | 54 |
52 PassRefPtr<HTMLCollection> elements(); | 55 PassRefPtr<HTMLCollection> elements(); |
53 void getNamedElements(const AtomicString&, Vector<RefPtr<Element> >&); | 56 void getNamedElements(const AtomicString&, Vector<RefPtr<Element> >&); |
54 | 57 |
55 unsigned length() const; | 58 unsigned length() const; |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 | 97 |
95 bool checkValidity(); | 98 bool checkValidity(); |
96 | 99 |
97 enum AutocompleteResult { | 100 enum AutocompleteResult { |
98 AutocompleteResultSuccess, | 101 AutocompleteResultSuccess, |
99 AutocompleteResultErrorDisabled, | 102 AutocompleteResultErrorDisabled, |
100 AutocompleteResultErrorCancel, | 103 AutocompleteResultErrorCancel, |
101 AutocompleteResultErrorInvalid, | 104 AutocompleteResultErrorInvalid, |
102 }; | 105 }; |
103 | 106 |
104 void requestAutocomplete(const Dictionary&); | 107 ScriptPromise requestAutocomplete(const Dictionary&); |
105 void finishRequestAutocomplete(AutocompleteResult); | 108 void finishRequestAutocomplete(AutocompleteResult); |
106 | 109 |
107 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); | 110 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); |
108 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); | 111 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); |
109 | 112 |
110 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc
ope; } | 113 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc
ope; } |
111 | 114 |
112 const Vector<FormAssociatedElement*>& associatedElements() const; | 115 const Vector<FormAssociatedElement*>& associatedElements() const; |
113 const Vector<HTMLImageElement*>& imageElements(); | 116 const Vector<HTMLImageElement*>& imageElements(); |
114 | 117 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
168 bool m_imageElementsAreDirty; | 171 bool m_imageElementsAreDirty; |
169 bool m_hasElementsAssociatedByParser; | 172 bool m_hasElementsAssociatedByParser; |
170 bool m_didFinishParsingChildren; | 173 bool m_didFinishParsingChildren; |
171 | 174 |
172 bool m_wasUserSubmitted; | 175 bool m_wasUserSubmitted; |
173 | 176 |
174 bool m_isInResetFunction; | 177 bool m_isInResetFunction; |
175 | 178 |
176 bool m_wasDemoted; | 179 bool m_wasDemoted; |
177 | 180 |
| 181 void doFinishRequestAutocomplete(AutocompleteResult, PassOwnPtr<Autocomplete
Request>); |
178 void requestAutocompleteTimerFired(Timer<HTMLFormElement>*); | 182 void requestAutocompleteTimerFired(Timer<HTMLFormElement>*); |
179 | 183 |
180 WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_pendingAutocomplete
Events; | 184 OwnPtr<AutocompleteRequest> m_pendingAutocompleteRequest; |
| 185 Vector<OwnPtr<AutocompleteRequest> > m_finishedAutocompleteRequests; |
181 Timer<HTMLFormElement> m_requestAutocompleteTimer; | 186 Timer<HTMLFormElement> m_requestAutocompleteTimer; |
182 }; | 187 }; |
183 | 188 |
184 } // namespace WebCore | 189 } // namespace WebCore |
185 | 190 |
186 #endif // HTMLFormElement_h | 191 #endif // HTMLFormElement_h |
OLD | NEW |