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

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

Issue 1686483002: Oilpan: Remove most WillBe types from the code base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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
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 27 matching lines...) Expand all
38 class FormAssociatedElement; 38 class FormAssociatedElement;
39 class GenericEventQueue; 39 class GenericEventQueue;
40 class HTMLFormControlElement; 40 class HTMLFormControlElement;
41 class HTMLFormControlsCollection; 41 class HTMLFormControlsCollection;
42 class HTMLImageElement; 42 class HTMLImageElement;
43 class RadioNodeListOrElement; 43 class RadioNodeListOrElement;
44 44
45 class CORE_EXPORT HTMLFormElement final : public HTMLElement { 45 class CORE_EXPORT HTMLFormElement final : public HTMLElement {
46 DEFINE_WRAPPERTYPEINFO(); 46 DEFINE_WRAPPERTYPEINFO();
47 public: 47 public:
48 static PassRefPtrWillBeRawPtr<HTMLFormElement> create(Document&); 48 static RawPtr<HTMLFormElement> create(Document&);
49 ~HTMLFormElement() override; 49 ~HTMLFormElement() override;
50 DECLARE_VIRTUAL_TRACE(); 50 DECLARE_VIRTUAL_TRACE();
51 51
52 PassRefPtrWillBeRawPtr<HTMLFormControlsCollection> elements(); 52 RawPtr<HTMLFormControlsCollection> elements();
53 void getNamedElements(const AtomicString&, WillBeHeapVector<RefPtrWillBeMemb er<Element>>&); 53 void getNamedElements(const AtomicString&, HeapVector<Member<Element>>&);
54 54
55 unsigned length() const; 55 unsigned length() const;
56 HTMLElement* item(unsigned index); 56 HTMLElement* item(unsigned index);
57 57
58 String enctype() const { return m_attributes.encodingType(); } 58 String enctype() const { return m_attributes.encodingType(); }
59 void setEnctype(const AtomicString&); 59 void setEnctype(const AtomicString&);
60 60
61 String encoding() const { return m_attributes.encodingType(); } 61 String encoding() const { return m_attributes.encodingType(); }
62 void setEncoding(const AtomicString& value) { setEnctype(value); } 62 void setEncoding(const AtomicString& value) { setEnctype(value); }
63 63
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 void requestAutocomplete(); 108 void requestAutocomplete();
109 void finishRequestAutocomplete(AutocompleteResult); 109 void finishRequestAutocomplete(AutocompleteResult);
110 110
111 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete); 111 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocomplete);
112 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror); 112 DEFINE_ATTRIBUTE_EVENT_LISTENER(autocompleteerror);
113 113
114 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc ope; } 114 RadioButtonGroupScope& radioButtonGroupScope() { return m_radioButtonGroupSc ope; }
115 115
116 const FormAssociatedElement::List& associatedElements() const; 116 const FormAssociatedElement::List& associatedElements() const;
117 const WillBeHeapVector<RawPtrWillBeMember<HTMLImageElement>>& imageElements( ); 117 const HeapVector<Member<HTMLImageElement>>& imageElements();
118 118
119 void anonymousNamedGetter(const AtomicString& name, RadioNodeListOrElement&) ; 119 void anonymousNamedGetter(const AtomicString& name, RadioNodeListOrElement&) ;
120 120
121 private: 121 private:
122 explicit HTMLFormElement(Document&); 122 explicit HTMLFormElement(Document&);
123 123
124 bool layoutObjectIsNeeded(const ComputedStyle&) override; 124 bool layoutObjectIsNeeded(const ComputedStyle&) override;
125 InsertionNotificationRequest insertedInto(ContainerNode*) override; 125 InsertionNotificationRequest insertedInto(ContainerNode*) override;
126 void removedFrom(ContainerNode*) override; 126 void removedFrom(ContainerNode*) override;
127 void finishParsingChildren() override; 127 void finishParsingChildren() override;
128 128
129 void handleLocalEvents(Event&) override; 129 void handleLocalEvents(Event&) override;
130 130
131 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 131 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
132 bool isURLAttribute(const Attribute&) const override; 132 bool isURLAttribute(const Attribute&) const override;
133 bool hasLegalLinkAttribute(const QualifiedName&) const override; 133 bool hasLegalLinkAttribute(const QualifiedName&) const override;
134 134
135 bool shouldRegisterAsNamedItem() const override { return true; } 135 bool shouldRegisterAsNamedItem() const override { return true; }
136 136
137 void copyNonAttributePropertiesFromElement(const Element&) override; 137 void copyNonAttributePropertiesFromElement(const Element&) override;
138 138
139 void submitDialog(PassRefPtrWillBeRawPtr<FormSubmission>); 139 void submitDialog(RawPtr<FormSubmission>);
140 void submit(Event*, bool activateSubmitButton, bool processingUserGesture); 140 void submit(Event*, bool activateSubmitButton, bool processingUserGesture);
141 141
142 void scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmission>); 142 void scheduleFormSubmission(RawPtr<FormSubmission>);
143 143
144 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st; 144 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st;
145 void collectImageElements(Node& root, WillBeHeapVector<RawPtrWillBeMember<HT MLImageElement>>&); 145 void collectImageElements(Node& root, HeapVector<Member<HTMLImageElement>>&) ;
146 146
147 // Returns true if the submission should proceed. 147 // Returns true if the submission should proceed.
148 bool validateInteractively(); 148 bool validateInteractively();
149 149
150 // Validates each of the controls, and stores controls of which 'invalid' 150 // Validates each of the controls, and stores controls of which 'invalid'
151 // event was not canceled to the specified vector. Returns true if there 151 // event was not canceled to the specified vector. Returns true if there
152 // are any invalid controls in this form. 152 // are any invalid controls in this form.
153 bool checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMe mber<HTMLFormControlElement>>*, CheckValidityEventBehavior); 153 bool checkInvalidControlsAndCollectUnhandled(HeapVector<Member<HTMLFormContr olElement>>*, CheckValidityEventBehavior);
154 154
155 Element* elementFromPastNamesMap(const AtomicString&); 155 Element* elementFromPastNamesMap(const AtomicString&);
156 void addToPastNamesMap(Element*, const AtomicString& pastName); 156 void addToPastNamesMap(Element*, const AtomicString& pastName);
157 void removeFromPastNamesMap(HTMLElement&); 157 void removeFromPastNamesMap(HTMLElement&);
158 158
159 typedef WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<Element>> PastNam esMap; 159 typedef HeapHashMap<AtomicString, Member<Element>> PastNamesMap;
160 160
161 FormSubmission::Attributes m_attributes; 161 FormSubmission::Attributes m_attributes;
162 OwnPtrWillBeMember<PastNamesMap> m_pastNamesMap; 162 Member<PastNamesMap> m_pastNamesMap;
163 163
164 RadioButtonGroupScope m_radioButtonGroupScope; 164 RadioButtonGroupScope m_radioButtonGroupScope;
165 165
166 // Do not access m_associatedElements directly. Use associatedElements() ins tead. 166 // Do not access m_associatedElements directly. Use associatedElements() ins tead.
167 FormAssociatedElement::List m_associatedElements; 167 FormAssociatedElement::List m_associatedElements;
168 // Do not access m_imageElements directly. Use imageElements() instead. 168 // Do not access m_imageElements directly. Use imageElements() instead.
169 WillBeHeapVector<RawPtrWillBeMember<HTMLImageElement>> m_imageElements; 169 HeapVector<Member<HTMLImageElement>> m_imageElements;
170 #if !ENABLE(OILPAN) 170 #if !ENABLE(OILPAN)
171 WeakPtrFactory<HTMLFormElement> m_weakPtrFactory; 171 WeakPtrFactory<HTMLFormElement> m_weakPtrFactory;
172 #endif 172 #endif
173 bool m_associatedElementsAreDirty : 1; 173 bool m_associatedElementsAreDirty : 1;
174 bool m_imageElementsAreDirty : 1; 174 bool m_imageElementsAreDirty : 1;
175 bool m_hasElementsAssociatedByParser : 1; 175 bool m_hasElementsAssociatedByParser : 1;
176 bool m_didFinishParsingChildren : 1; 176 bool m_didFinishParsingChildren : 1;
177 177
178 bool m_wasUserSubmitted : 1; 178 bool m_wasUserSubmitted : 1;
179 bool m_isSubmittingOrInUserJSSubmitEvent : 1; 179 bool m_isSubmittingOrInUserJSSubmitEvent : 1;
180 bool m_shouldSubmit : 1; 180 bool m_shouldSubmit : 1;
181 181
182 bool m_isInResetFunction : 1; 182 bool m_isInResetFunction : 1;
183 183
184 bool m_wasDemoted : 1; 184 bool m_wasDemoted : 1;
185 185
186 OwnPtrWillBeMember<GenericEventQueue> m_pendingAutocompleteEventsQueue; 186 Member<GenericEventQueue> m_pendingAutocompleteEventsQueue;
187 }; 187 };
188 188
189 } // namespace blink 189 } // namespace blink
190 190
191 #endif // HTMLFormElement_h 191 #endif // HTMLFormElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698