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

Side by Side Diff: third_party/WebKit/Source/core/dom/ElementRareData.h

Issue 2796553002: Revert of Initial skeleton of Accessibility Object Model Phase 1 (Closed)
Patch Set: Created 3 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) 2008, 2009, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2008, 2009, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com> 3 * Copyright (C) 2008 David Smith <catfish.man@gmail.com>
4 * 4 *
5 * This library is free software; you can redistribute it and/or 5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public 6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either 7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or (at your option) any later version. 8 * version 2 of the License, or (at your option) any later version.
9 * 9 *
10 * This library is distributed in the hope that it will be useful, 10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details. 13 * Library General Public License for more details.
14 * 14 *
15 * You should have received a copy of the GNU Library General Public License 15 * You should have received a copy of the GNU Library General Public License
16 * along with this library; see the file COPYING.LIB. If not, write to 16 * along with this library; see the file COPYING.LIB. If not, write to
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA. 18 * Boston, MA 02110-1301, USA.
19 * 19 *
20 */ 20 */
21 21
22 #ifndef ElementRareData_h 22 #ifndef ElementRareData_h
23 #define ElementRareData_h 23 #define ElementRareData_h
24 24
25 #include <memory>
26 #include "bindings/core/v8/ScriptWrappableVisitor.h" 25 #include "bindings/core/v8/ScriptWrappableVisitor.h"
27 #include "core/animation/ElementAnimations.h" 26 #include "core/animation/ElementAnimations.h"
28 #include "core/css/cssom/InlineStylePropertyMap.h" 27 #include "core/css/cssom/InlineStylePropertyMap.h"
29 #include "core/dom/AccessibleNode.h"
30 #include "core/dom/Attr.h" 28 #include "core/dom/Attr.h"
31 #include "core/dom/CompositorProxiedPropertySet.h" 29 #include "core/dom/CompositorProxiedPropertySet.h"
32 #include "core/dom/DatasetDOMStringMap.h" 30 #include "core/dom/DatasetDOMStringMap.h"
33 #include "core/dom/ElementIntersectionObserverData.h" 31 #include "core/dom/ElementIntersectionObserverData.h"
34 #include "core/dom/NamedNodeMap.h" 32 #include "core/dom/NamedNodeMap.h"
35 #include "core/dom/NodeRareData.h" 33 #include "core/dom/NodeRareData.h"
36 #include "core/dom/PseudoElement.h" 34 #include "core/dom/PseudoElement.h"
37 #include "core/dom/PseudoElementData.h" 35 #include "core/dom/PseudoElementData.h"
38 #include "core/dom/custom/CustomElementDefinition.h" 36 #include "core/dom/custom/CustomElementDefinition.h"
39 #include "core/dom/custom/V0CustomElementDefinition.h" 37 #include "core/dom/custom/V0CustomElementDefinition.h"
40 #include "core/dom/shadow/ElementShadow.h" 38 #include "core/dom/shadow/ElementShadow.h"
41 #include "core/html/ClassList.h" 39 #include "core/html/ClassList.h"
42 #include "platform/heap/Handle.h" 40 #include "platform/heap/Handle.h"
43 #include "wtf/HashSet.h" 41 #include "wtf/HashSet.h"
42 #include <memory>
44 43
45 namespace blink { 44 namespace blink {
46 45
47 class LayoutObject; 46 class LayoutObject;
48 class CompositorProxiedPropertySet; 47 class CompositorProxiedPropertySet;
49 class ResizeObservation; 48 class ResizeObservation;
50 class ResizeObserver; 49 class ResizeObserver;
51 50
52 class ElementRareData : public NodeRareData { 51 class ElementRareData : public NodeRareData {
53 public: 52 public:
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 return m_v0CustomElementDefinition.get(); 146 return m_v0CustomElementDefinition.get();
148 } 147 }
149 148
150 void setCustomElementDefinition(CustomElementDefinition* definition) { 149 void setCustomElementDefinition(CustomElementDefinition* definition) {
151 m_customElementDefinition = definition; 150 m_customElementDefinition = definition;
152 } 151 }
153 CustomElementDefinition* customElementDefinition() const { 152 CustomElementDefinition* customElementDefinition() const {
154 return m_customElementDefinition.get(); 153 return m_customElementDefinition.get();
155 } 154 }
156 155
157 AccessibleNode* accessibleNode() const { return m_accessibleNode.get(); }
158 AccessibleNode* ensureAccessibleNode(Element* ownerElement) {
159 if (!m_accessibleNode) {
160 m_accessibleNode = new AccessibleNode(ownerElement);
161 ScriptWrappableVisitor::writeBarrier(this, m_accessibleNode);
162 }
163 return m_accessibleNode;
164 }
165
166 AttrNodeList& ensureAttrNodeList(); 156 AttrNodeList& ensureAttrNodeList();
167 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } 157 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); }
168 void removeAttrNodeList() { m_attrNodeList.clear(); } 158 void removeAttrNodeList() { m_attrNodeList.clear(); }
169 void addAttr(Attr* attr) { 159 void addAttr(Attr* attr) {
170 ensureAttrNodeList().push_back(attr); 160 ensureAttrNodeList().push_back(attr);
171 ScriptWrappableVisitor::writeBarrier(this, attr); 161 ScriptWrappableVisitor::writeBarrier(this, attr);
172 } 162 }
173 163
174 ElementIntersectionObserverData* intersectionObserverData() const { 164 ElementIntersectionObserverData* intersectionObserverData() const {
175 return m_intersectionObserverData.get(); 165 return m_intersectionObserverData.get();
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 Member<ElementIntersectionObserverData> m_intersectionObserverData; 203 Member<ElementIntersectionObserverData> m_intersectionObserverData;
214 Member<ResizeObserverDataMap> m_resizeObserverData; 204 Member<ResizeObserverDataMap> m_resizeObserverData;
215 205
216 RefPtr<ComputedStyle> m_computedStyle; 206 RefPtr<ComputedStyle> m_computedStyle;
217 // TODO(davaajav):remove this field when v0 custom elements are deprecated 207 // TODO(davaajav):remove this field when v0 custom elements are deprecated
218 Member<V0CustomElementDefinition> m_v0CustomElementDefinition; 208 Member<V0CustomElementDefinition> m_v0CustomElementDefinition;
219 Member<CustomElementDefinition> m_customElementDefinition; 209 Member<CustomElementDefinition> m_customElementDefinition;
220 210
221 Member<PseudoElementData> m_pseudoElementData; 211 Member<PseudoElementData> m_pseudoElementData;
222 212
223 Member<AccessibleNode> m_accessibleNode;
224
225 explicit ElementRareData(LayoutObject*); 213 explicit ElementRareData(LayoutObject*);
226 }; 214 };
227 215
228 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ElementRareData); 216 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ElementRareData);
229 217
230 inline LayoutSize defaultMinimumSizeForResizing() { 218 inline LayoutSize defaultMinimumSizeForResizing() {
231 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); 219 return LayoutSize(LayoutUnit::max(), LayoutUnit::max());
232 } 220 }
233 221
234 inline ElementRareData::ElementRareData(LayoutObject* layoutObject) 222 inline ElementRareData::ElementRareData(LayoutObject* layoutObject)
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 inline CompositorProxiedPropertySet& 269 inline CompositorProxiedPropertySet&
282 ElementRareData::ensureCompositorProxiedPropertySet() { 270 ElementRareData::ensureCompositorProxiedPropertySet() {
283 if (!m_proxiedProperties) 271 if (!m_proxiedProperties)
284 m_proxiedProperties = CompositorProxiedPropertySet::create(); 272 m_proxiedProperties = CompositorProxiedPropertySet::create();
285 return *m_proxiedProperties; 273 return *m_proxiedProperties;
286 } 274 }
287 275
288 } // namespace blink 276 } // namespace blink
289 277
290 #endif // ElementRareData_h 278 #endif // ElementRareData_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/dom/Element.idl ('k') | third_party/WebKit/Source/core/dom/ElementRareData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698