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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
44 class HTMLFormControlElement; | 44 class HTMLFormControlElement; |
45 class HTMLImageElement; | 45 class HTMLImageElement; |
46 class HTMLInputElement; | 46 class HTMLInputElement; |
47 | 47 |
48 class HTMLFormElement FINAL : public HTMLElement { | 48 class HTMLFormElement FINAL : public HTMLElement { |
49 public: | 49 public: |
50 static PassRefPtr<HTMLFormElement> create(Document&); | 50 static PassRefPtr<HTMLFormElement> create(Document&); |
51 virtual ~HTMLFormElement(); | 51 virtual ~HTMLFormElement(); |
52 | 52 |
53 PassRefPtr<HTMLCollection> elements(); | 53 PassRefPtr<HTMLCollection> elements(); |
54 void getNamedElements(const AtomicString&, Vector<RefPtr<Node> >&); | 54 void getNamedElements(const AtomicString&, Vector<RefPtr<Element> >&); |
55 | 55 |
56 unsigned length() const; | 56 unsigned length() const; |
57 Node* item(unsigned index); | 57 Node* item(unsigned index); |
58 | 58 |
59 String enctype() const { return m_attributes.encodingType(); } | 59 String enctype() const { return m_attributes.encodingType(); } |
60 void setEnctype(const AtomicString&); | 60 void setEnctype(const AtomicString&); |
61 | 61 |
62 String encoding() const { return m_attributes.encodingType(); } | 62 String encoding() const { return m_attributes.encodingType(); } |
63 void setEncoding(const AtomicString& value) { setEnctype(value); } | 63 void setEncoding(const AtomicString& value) { setEnctype(value); } |
64 | 64 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); | 109 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); |
110 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); | 110 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); |
111 | 111 |
112 CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; } | 112 CheckedRadioButtons& checkedRadioButtons() { return m_checkedRadioButtons; } |
113 | 113 |
114 const Vector<FormAssociatedElement*>& associatedElements() const; | 114 const Vector<FormAssociatedElement*>& associatedElements() const; |
115 const Vector<HTMLImageElement*>& imageElements(); | 115 const Vector<HTMLImageElement*>& imageElements(); |
116 | 116 |
117 void getTextFieldValues(StringPairVector& fieldNamesAndValues) const; | 117 void getTextFieldValues(StringPairVector& fieldNamesAndValues) const; |
118 void anonymousNamedGetter(const AtomicString& name, bool&, RefPtr<RadioNodeL
ist>&, bool&, RefPtr<Node>&); | 118 void anonymousNamedGetter(const AtomicString& name, bool&, RefPtr<RadioNodeL
ist>&, bool&, RefPtr<Element>&); |
119 | 119 |
120 private: | 120 private: |
121 explicit HTMLFormElement(Document&); | 121 explicit HTMLFormElement(Document&); |
122 | 122 |
123 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; | 123 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; |
124 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; | 124 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; |
125 virtual void removedFrom(ContainerNode*) OVERRIDE; | 125 virtual void removedFrom(ContainerNode*) OVERRIDE; |
126 virtual void finishParsingChildren() OVERRIDE; | 126 virtual void finishParsingChildren() OVERRIDE; |
127 | 127 |
128 virtual void handleLocalEvents(Event*) OVERRIDE; | 128 virtual void handleLocalEvents(Event*) OVERRIDE; |
(...skipping 14 matching lines...) Expand all Loading... |
143 void collectImageElements(Node* root, Vector<HTMLImageElement*>&); | 143 void collectImageElements(Node* root, Vector<HTMLImageElement*>&); |
144 | 144 |
145 // Returns true if the submission should proceed. | 145 // Returns true if the submission should proceed. |
146 bool validateInteractively(Event*); | 146 bool validateInteractively(Event*); |
147 | 147 |
148 // Validates each of the controls, and stores controls of which 'invalid' | 148 // Validates each of the controls, and stores controls of which 'invalid' |
149 // event was not canceled to the specified vector. Returns true if there | 149 // event was not canceled to the specified vector. Returns true if there |
150 // are any invalid controls in this form. | 150 // are any invalid controls in this form. |
151 bool checkInvalidControlsAndCollectUnhandled(Vector<RefPtr<FormAssociatedEle
ment> >*, HTMLFormControlElement::CheckValidityDispatchEvents = HTMLFormControlE
lement::CheckValidityDispatchEventsAllowed); | 151 bool checkInvalidControlsAndCollectUnhandled(Vector<RefPtr<FormAssociatedEle
ment> >*, HTMLFormControlElement::CheckValidityDispatchEvents = HTMLFormControlE
lement::CheckValidityDispatchEventsAllowed); |
152 | 152 |
153 Node* elementFromPastNamesMap(const AtomicString&); | 153 Element* elementFromPastNamesMap(const AtomicString&); |
154 void addToPastNamesMap(Node*, const AtomicString& pastName); | 154 void addToPastNamesMap(Element*, const AtomicString& pastName); |
155 void removeFromPastNamesMap(HTMLElement&); | 155 void removeFromPastNamesMap(HTMLElement&); |
156 | 156 |
157 typedef HashMap<AtomicString, Node*> PastNamesMap; | 157 typedef HashMap<AtomicString, Element*> PastNamesMap; |
158 | 158 |
159 FormSubmission::Attributes m_attributes; | 159 FormSubmission::Attributes m_attributes; |
160 OwnPtr<PastNamesMap> m_pastNamesMap; | 160 OwnPtr<PastNamesMap> m_pastNamesMap; |
161 | 161 |
162 CheckedRadioButtons m_checkedRadioButtons; | 162 CheckedRadioButtons m_checkedRadioButtons; |
163 | 163 |
164 // Do not access m_associatedElements directly. Use associatedElements() ins
tead. | 164 // Do not access m_associatedElements directly. Use associatedElements() ins
tead. |
165 Vector<FormAssociatedElement*> m_associatedElements; | 165 Vector<FormAssociatedElement*> m_associatedElements; |
166 // Do not access m_imageElements directly. Use imageElements() instead. | 166 // Do not access m_imageElements directly. Use imageElements() instead. |
167 Vector<HTMLImageElement*> m_imageElements; | 167 Vector<HTMLImageElement*> m_imageElements; |
(...skipping 15 matching lines...) Expand all Loading... |
183 | 183 |
184 Vector<RefPtr<Event> > m_pendingAutocompleteEvents; | 184 Vector<RefPtr<Event> > m_pendingAutocompleteEvents; |
185 Timer<HTMLFormElement> m_requestAutocompleteTimer; | 185 Timer<HTMLFormElement> m_requestAutocompleteTimer; |
186 }; | 186 }; |
187 | 187 |
188 DEFINE_NODE_TYPE_CASTS(HTMLFormElement, hasTagName(HTMLNames::formTag)); | 188 DEFINE_NODE_TYPE_CASTS(HTMLFormElement, hasTagName(HTMLNames::formTag)); |
189 | 189 |
190 } // namespace WebCore | 190 } // namespace WebCore |
191 | 191 |
192 #endif // HTMLFormElement_h | 192 #endif // HTMLFormElement_h |
OLD | NEW |