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

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, 8 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 void invalidateDefaultButtonStyle() const; 120 void invalidateDefaultButtonStyle() const;
121 121
122 private: 122 private:
123 explicit HTMLFormElement(Document&); 123 explicit HTMLFormElement(Document&);
124 124
125 bool layoutObjectIsNeeded(const ComputedStyle&) override; 125 bool layoutObjectIsNeeded(const ComputedStyle&) override;
126 InsertionNotificationRequest insertedInto(ContainerNode*) override; 126 InsertionNotificationRequest insertedInto(ContainerNode*) override;
127 void removedFrom(ContainerNode*) override; 127 void removedFrom(ContainerNode*) override;
128 void finishParsingChildren() override; 128 void finishParsingChildren() override;
129 129
130 void handleLocalEvents(Event&) override; 130 void handleLocalEvents(Event&) override;
131 131
132 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override; 132 void parseAttribute(const QualifiedName&, const AtomicString&, const AtomicS tring&) override;
133 bool isURLAttribute(const Attribute&) const override; 133 bool isURLAttribute(const Attribute&) const override;
134 bool hasLegalLinkAttribute(const QualifiedName&) const override; 134 bool hasLegalLinkAttribute(const QualifiedName&) const override;
135 135
136 bool shouldRegisterAsNamedItem() const override { return true; } 136 bool shouldRegisterAsNamedItem() const override { return true; }
137 137
138 void copyNonAttributePropertiesFromElement(const Element&) override; 138 void copyNonAttributePropertiesFromElement(const Element&) override;
139 139
140 void submitDialog(PassRefPtrWillBeRawPtr<FormSubmission>); 140 void submitDialog(RawPtr<FormSubmission>);
141 void submit(Event*, bool activateSubmitButton); 141 void submit(Event*, bool activateSubmitButton);
142 142
143 void scheduleFormSubmission(PassRefPtrWillBeRawPtr<FormSubmission>); 143 void scheduleFormSubmission(RawPtr<FormSubmission>);
144 144
145 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st; 145 void collectAssociatedElements(Node& root, FormAssociatedElement::List&) con st;
146 void collectImageElements(Node& root, WillBeHeapVector<RawPtrWillBeMember<HT MLImageElement>>&); 146 void collectImageElements(Node& root, HeapVector<Member<HTMLImageElement>>&) ;
147 147
148 // Returns true if the submission should proceed. 148 // Returns true if the submission should proceed.
149 bool validateInteractively(); 149 bool validateInteractively();
150 150
151 // Validates each of the controls, and stores controls of which 'invalid' 151 // Validates each of the controls, and stores controls of which 'invalid'
152 // event was not canceled to the specified vector. Returns true if there 152 // event was not canceled to the specified vector. Returns true if there
153 // are any invalid controls in this form. 153 // are any invalid controls in this form.
154 bool checkInvalidControlsAndCollectUnhandled(WillBeHeapVector<RefPtrWillBeMe mber<HTMLFormControlElement>>*, CheckValidityEventBehavior); 154 bool checkInvalidControlsAndCollectUnhandled(HeapVector<Member<HTMLFormContr olElement>>*, CheckValidityEventBehavior);
155 155
156 Element* elementFromPastNamesMap(const AtomicString&); 156 Element* elementFromPastNamesMap(const AtomicString&);
157 void addToPastNamesMap(Element*, const AtomicString& pastName); 157 void addToPastNamesMap(Element*, const AtomicString& pastName);
158 void removeFromPastNamesMap(HTMLElement&); 158 void removeFromPastNamesMap(HTMLElement&);
159 159
160 typedef WillBeHeapHashMap<AtomicString, RawPtrWillBeMember<Element>> PastNam esMap; 160 typedef HeapHashMap<AtomicString, Member<Element>> PastNamesMap;
161 161
162 FormSubmission::Attributes m_attributes; 162 FormSubmission::Attributes m_attributes;
163 OwnPtrWillBeMember<PastNamesMap> m_pastNamesMap; 163 Member<PastNamesMap> m_pastNamesMap;
164 164
165 RadioButtonGroupScope m_radioButtonGroupScope; 165 RadioButtonGroupScope m_radioButtonGroupScope;
166 166
167 // Do not access m_associatedElements directly. Use associatedElements() ins tead. 167 // Do not access m_associatedElements directly. Use associatedElements() ins tead.
168 FormAssociatedElement::List m_associatedElements; 168 FormAssociatedElement::List m_associatedElements;
169 // Do not access m_imageElements directly. Use imageElements() instead. 169 // Do not access m_imageElements directly. Use imageElements() instead.
170 WillBeHeapVector<RawPtrWillBeMember<HTMLImageElement>> m_imageElements; 170 HeapVector<Member<HTMLImageElement>> m_imageElements;
171 #if !ENABLE(OILPAN) 171 #if !ENABLE(OILPAN)
172 WeakPtrFactory<HTMLFormElement> m_weakPtrFactory; 172 WeakPtrFactory<HTMLFormElement> m_weakPtrFactory;
173 #endif 173 #endif
174 bool m_associatedElementsAreDirty : 1; 174 bool m_associatedElementsAreDirty : 1;
175 bool m_imageElementsAreDirty : 1; 175 bool m_imageElementsAreDirty : 1;
176 bool m_hasElementsAssociatedByParser : 1; 176 bool m_hasElementsAssociatedByParser : 1;
177 bool m_hasElementsAssociatedByFormAttribute : 1; 177 bool m_hasElementsAssociatedByFormAttribute : 1;
178 bool m_didFinishParsingChildren : 1; 178 bool m_didFinishParsingChildren : 1;
179 179
180 bool m_isSubmittingOrInUserJSSubmitEvent : 1; 180 bool m_isSubmittingOrInUserJSSubmitEvent : 1;
181 bool m_shouldSubmit : 1; 181 bool m_shouldSubmit : 1;
182 182
183 bool m_isInResetFunction : 1; 183 bool m_isInResetFunction : 1;
184 184
185 bool m_wasDemoted : 1; 185 bool m_wasDemoted : 1;
186 186
187 OwnPtrWillBeMember<GenericEventQueue> m_pendingAutocompleteEventsQueue; 187 Member<GenericEventQueue> m_pendingAutocompleteEventsQueue;
188 }; 188 };
189 189
190 } // namespace blink 190 } // namespace blink
191 191
192 #endif // HTMLFormElement_h 192 #endif // HTMLFormElement_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698