Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(162)

Side by Side Diff: Source/core/html/HTMLFormElement.h

Issue 270823004: Oilpan: Prepare to move FormAssociatedElement to Oilpan heap, part 2. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 class FormData; 42 class FormData;
43 class GenericEventQueue; 43 class GenericEventQueue;
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 PassRefPtrWillBeRawPtr<HTMLFormElement> create(Document&); 50 static PassRefPtrWillBeRawPtr<HTMLFormElement> create(Document&);
51 virtual ~HTMLFormElement(); 51 virtual ~HTMLFormElement();
52 virtual void trace(Visitor*) OVERRIDE;
52 53
53 PassRefPtr<HTMLCollection> elements(); 54 PassRefPtr<HTMLCollection> elements();
54 void getNamedElements(const AtomicString&, Vector<RefPtr<Element> >&); 55 void getNamedElements(const AtomicString&, Vector<RefPtr<Element> >&);
55 56
56 unsigned length() const; 57 unsigned length() const;
57 Element* item(unsigned index); 58 Element* item(unsigned index);
58 59
59 String enctype() const { return m_attributes.encodingType(); } 60 String enctype() const { return m_attributes.encodingType(); }
60 void setEnctype(const AtomicString&); 61 void setEnctype(const AtomicString&);
61 62
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 }; 104 };
104 105
105 void requestAutocomplete(const Dictionary&); 106 void requestAutocomplete(const Dictionary&);
106 void finishRequestAutocomplete(AutocompleteResult); 107 void finishRequestAutocomplete(AutocompleteResult);
107 108
108 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); 109 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete);
109 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); 110 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror);
110 111
111 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc ope; } 112 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc ope; }
112 113
113 const Vector<FormAssociatedElement*>& associatedElements() const; 114 const FormAssociatedElement::List& associatedElements() const;
114 const Vector<HTMLImageElement*>& imageElements(); 115 const Vector<HTMLImageElement*>& imageElements();
115 116
116 void anonymousNamedGetter(const AtomicString& name, bool&, RefPtr<RadioNodeL ist>&, bool&, RefPtr<Element>&); 117 void anonymousNamedGetter(const AtomicString& name, bool&, RefPtr<RadioNodeL ist>&, bool&, RefPtr<Element>&);
117 118
118 private: 119 private:
119 explicit HTMLFormElement(Document&); 120 explicit HTMLFormElement(Document&);
120 121
121 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE; 122 virtual bool rendererIsNeeded(const RenderStyle&) OVERRIDE;
122 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE; 123 virtual InsertionNotificationRequest insertedInto(ContainerNode*) OVERRIDE;
123 virtual void removedFrom(ContainerNode*) OVERRIDE; 124 virtual void removedFrom(ContainerNode*) OVERRIDE;
124 virtual void finishParsingChildren() OVERRIDE; 125 virtual void finishParsingChildren() OVERRIDE;
125 126
126 virtual void handleLocalEvents(Event*) OVERRIDE; 127 virtual void handleLocalEvents(Event*) OVERRIDE;
127 128
128 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE; 129 virtual void parseAttribute(const QualifiedName&, const AtomicString&) OVERR IDE;
129 virtual bool isURLAttribute(const Attribute&) const OVERRIDE; 130 virtual bool isURLAttribute(const Attribute&) const OVERRIDE;
130 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE; 131 virtual bool hasLegalLinkAttribute(const QualifiedName&) const OVERRIDE;
131 132
132 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; } 133 virtual bool shouldRegisterAsNamedItem() const OVERRIDE { return true; }
133 134
134 virtual void copyNonAttributePropertiesFromElement(const Element&) OVERRIDE; 135 virtual void copyNonAttributePropertiesFromElement(const Element&) OVERRIDE;
135 136
136 void submitDialog(PassRefPtr<FormSubmission>); 137 void submitDialog(PassRefPtr<FormSubmission>);
137 void submit(Event*, bool activateSubmitButton, bool processingUserGesture, F ormSubmissionTrigger); 138 void submit(Event*, bool activateSubmitButton, bool processingUserGesture, F ormSubmissionTrigger);
138 139
139 void scheduleFormSubmission(PassRefPtr<FormSubmission>); 140 void scheduleFormSubmission(PassRefPtr<FormSubmission>);
140 141
141 void collectAssociatedElements(Node& root, Vector<FormAssociatedElement*>&) const; 142 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st;
142 void collectImageElements(Node& root, Vector<HTMLImageElement*>&); 143 void collectImageElements(Node& root, Vector<HTMLImageElement*>&);
143 144
144 // Returns true if the submission should proceed. 145 // Returns true if the submission should proceed.
145 bool validateInteractively(Event*); 146 bool validateInteractively(Event*);
146 147
147 // Validates each of the controls, and stores controls of which 'invalid' 148 // Validates each of the controls, and stores controls of which 'invalid'
148 // 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
149 // are any invalid controls in this form. 150 // are any invalid controls in this form.
150 bool checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMe mber<FormAssociatedElement> >*); 151 bool checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMe mber<FormAssociatedElement> >*);
151 152
152 Element* elementFromPastNamesMap(const AtomicString&); 153 Element* elementFromPastNamesMap(const AtomicString&);
153 void addToPastNamesMap(Element*, const AtomicString& pastName); 154 void addToPastNamesMap(Element*, const AtomicString& pastName);
154 void removeFromPastNamesMap(HTMLElement&); 155 void removeFromPastNamesMap(HTMLElement&);
155 156
156 typedef HashMap<AtomicString, Element*> PastNamesMap; 157 typedef HashMap<AtomicString, Element*> PastNamesMap;
157 158
158 FormSubmission::Attributes m_attributes; 159 FormSubmission::Attributes m_attributes;
159 OwnPtr<PastNamesMap> m_pastNamesMap; 160 OwnPtr<PastNamesMap> m_pastNamesMap;
160 161
161 RadioButtonGroupScope m_radioButtonGroupScope; 162 RadioButtonGroupScope m_radioButtonGroupScope;
162 163
163 // Do not access m_associatedElements directly. Use associatedElements() ins tead. 164 // Do not access m_associatedElements directly. Use associatedElements() ins tead.
164 // FIXME: Oilpan: m_associatedElements should be HeapVector<Member<>>. 165 FormAssociatedElement::List 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;
168 WeakPtrFactory<HTMLFormElement> m_weakPtrFactory; 168 WeakPtrFactory<HTMLFormElement> m_weakPtrFactory;
169 bool m_associatedElementsAreDirty; 169 bool m_associatedElementsAreDirty;
170 bool m_imageElementsAreDirty; 170 bool m_imageElementsAreDirty;
171 bool m_hasElementsAssociatedByParser; 171 bool m_hasElementsAssociatedByParser;
172 bool m_didFinishParsingChildren; 172 bool m_didFinishParsingChildren;
173 173
174 bool m_wasUserSubmitted; 174 bool m_wasUserSubmitted;
175 175
176 bool m_isInResetFunction; 176 bool m_isInResetFunction;
177 177
178 bool m_wasDemoted; 178 bool m_wasDemoted;
179 179
180 OwnPtr<GenericEventQueue> m_pendingAutocompleteEventsQueue; 180 OwnPtr<GenericEventQueue> m_pendingAutocompleteEventsQueue;
181 }; 181 };
182 182
183 } // namespace WebCore 183 } // namespace WebCore
184 184
185 #endif // HTMLFormElement_h 185 #endif // HTMLFormElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698