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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
96 // FIXME: deprecated; will be removed soon. | 99 // FIXME: deprecated; will be removed soon. |
97 bool checkValidityWithoutDispatchingEvents(); | 100 bool checkValidityWithoutDispatchingEvents(); |
98 | 101 |
99 enum AutocompleteResult { | 102 enum AutocompleteResult { |
100 AutocompleteResultSuccess, | 103 AutocompleteResultSuccess, |
101 AutocompleteResultErrorDisabled, | 104 AutocompleteResultErrorDisabled, |
102 AutocompleteResultErrorCancel, | 105 AutocompleteResultErrorCancel, |
103 AutocompleteResultErrorInvalid, | 106 AutocompleteResultErrorInvalid, |
104 }; | 107 }; |
105 | 108 |
106 void requestAutocomplete(const Dictionary&); | 109 ScriptPromise requestAutocomplete(const Dictionary&); |
107 void finishRequestAutocomplete(AutocompleteResult); | 110 void finishRequestAutocomplete(AutocompleteResult); |
108 | 111 |
109 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); | 112 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); |
110 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); | 113 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); |
111 | 114 |
112 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc ope; } | 115 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc ope; } |
113 | 116 |
114 const Vector<FormAssociatedElement*>& associatedElements() const; | 117 const Vector<FormAssociatedElement*>& associatedElements() const; |
115 const Vector<HTMLImageElement*>& imageElements(); | 118 const Vector<HTMLImageElement*>& imageElements(); |
116 | 119 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
170 bool m_imageElementsAreDirty; | 173 bool m_imageElementsAreDirty; |
171 bool m_hasElementsAssociatedByParser; | 174 bool m_hasElementsAssociatedByParser; |
172 bool m_didFinishParsingChildren; | 175 bool m_didFinishParsingChildren; |
173 | 176 |
174 bool m_wasUserSubmitted; | 177 bool m_wasUserSubmitted; |
175 | 178 |
176 bool m_isInResetFunction; | 179 bool m_isInResetFunction; |
177 | 180 |
178 bool m_wasDemoted; | 181 bool m_wasDemoted; |
179 | 182 |
183 void doFinishRequestAutocomplete(AutocompleteResult, PassOwnPtr<Autocomplete Request>); | |
180 void requestAutocompleteTimerFired(Timer<HTMLFormElement>*); | 184 void requestAutocompleteTimerFired(Timer<HTMLFormElement>*); |
181 | 185 |
182 WillBePersistentHeapVector<RefPtrWillBeMember<Event> > m_pendingAutocomplete Events; | 186 OwnPtr<AutocompleteRequest> m_pendingAutocompleteRequest; |
187 WillBePersistentHeapVector<OwnPtrWillBeMember<AutocompleteRequest> > m_finis hedAutocompleteRequests; | |
tkent
2014/04/17 02:51:41
This should be |Vector<OwnPtr<AutocompleteRequest>
Dan Beam
2014/04/17 23:02:04
Done.
| |
183 Timer<HTMLFormElement> m_requestAutocompleteTimer; | 188 Timer<HTMLFormElement> m_requestAutocompleteTimer; |
184 }; | 189 }; |
185 | 190 |
186 } // namespace WebCore | 191 } // namespace WebCore |
187 | 192 |
188 #endif // HTMLFormElement_h | 193 #endif // HTMLFormElement_h |
OLD | NEW |