OLD | NEW |
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, |
(...skipping 10 matching lines...) Expand all Loading... |
21 | 21 |
22 #ifndef ElementRareData_h | 22 #ifndef ElementRareData_h |
23 #define ElementRareData_h | 23 #define ElementRareData_h |
24 | 24 |
25 #include "bindings/core/v8/ScriptWrappableVisitor.h" | 25 #include "bindings/core/v8/ScriptWrappableVisitor.h" |
26 #include "core/animation/ElementAnimations.h" | 26 #include "core/animation/ElementAnimations.h" |
27 #include "core/css/cssom/InlineStylePropertyMap.h" | 27 #include "core/css/cssom/InlineStylePropertyMap.h" |
28 #include "core/dom/Attr.h" | 28 #include "core/dom/Attr.h" |
29 #include "core/dom/CompositorProxiedPropertySet.h" | 29 #include "core/dom/CompositorProxiedPropertySet.h" |
30 #include "core/dom/DatasetDOMStringMap.h" | 30 #include "core/dom/DatasetDOMStringMap.h" |
| 31 #include "core/dom/ElementIntersectionObserverData.h" |
31 #include "core/dom/NamedNodeMap.h" | 32 #include "core/dom/NamedNodeMap.h" |
32 #include "core/dom/NodeIntersectionObserverData.h" | |
33 #include "core/dom/NodeRareData.h" | 33 #include "core/dom/NodeRareData.h" |
34 #include "core/dom/PseudoElement.h" | 34 #include "core/dom/PseudoElement.h" |
35 #include "core/dom/PseudoElementData.h" | 35 #include "core/dom/PseudoElementData.h" |
36 #include "core/dom/custom/CustomElementDefinition.h" | 36 #include "core/dom/custom/CustomElementDefinition.h" |
37 #include "core/dom/custom/V0CustomElementDefinition.h" | 37 #include "core/dom/custom/V0CustomElementDefinition.h" |
38 #include "core/dom/shadow/ElementShadow.h" | 38 #include "core/dom/shadow/ElementShadow.h" |
39 #include "core/html/ClassList.h" | 39 #include "core/html/ClassList.h" |
40 #include "platform/heap/Handle.h" | 40 #include "platform/heap/Handle.h" |
41 #include "wtf/HashSet.h" | 41 #include "wtf/HashSet.h" |
42 #include <memory> | 42 #include <memory> |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
154 } | 154 } |
155 | 155 |
156 AttrNodeList& ensureAttrNodeList(); | 156 AttrNodeList& ensureAttrNodeList(); |
157 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } | 157 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } |
158 void removeAttrNodeList() { m_attrNodeList.clear(); } | 158 void removeAttrNodeList() { m_attrNodeList.clear(); } |
159 void addAttr(Attr* attr) { | 159 void addAttr(Attr* attr) { |
160 ensureAttrNodeList().append(attr); | 160 ensureAttrNodeList().append(attr); |
161 ScriptWrappableVisitor::writeBarrier(this, attr); | 161 ScriptWrappableVisitor::writeBarrier(this, attr); |
162 } | 162 } |
163 | 163 |
164 NodeIntersectionObserverData* intersectionObserverData() const { | 164 ElementIntersectionObserverData* intersectionObserverData() const { |
165 return m_intersectionObserverData.get(); | 165 return m_intersectionObserverData.get(); |
166 } | 166 } |
167 NodeIntersectionObserverData& ensureIntersectionObserverData() { | 167 ElementIntersectionObserverData& ensureIntersectionObserverData() { |
168 if (!m_intersectionObserverData) { | 168 if (!m_intersectionObserverData) { |
169 m_intersectionObserverData = new NodeIntersectionObserverData(); | 169 m_intersectionObserverData = new ElementIntersectionObserverData(); |
170 ScriptWrappableVisitor::writeBarrier(this, m_intersectionObserverData); | 170 ScriptWrappableVisitor::writeBarrier(this, m_intersectionObserverData); |
171 } | 171 } |
172 return *m_intersectionObserverData; | 172 return *m_intersectionObserverData; |
173 } | 173 } |
174 | 174 |
175 using ResizeObserverDataMap = | 175 using ResizeObserverDataMap = |
176 HeapHashMap<Member<ResizeObserver>, Member<ResizeObservation>>; | 176 HeapHashMap<Member<ResizeObserver>, Member<ResizeObservation>>; |
177 | 177 |
178 ResizeObserverDataMap* resizeObserverData() const { | 178 ResizeObserverDataMap* resizeObserverData() const { |
179 return m_resizeObserverData; | 179 return m_resizeObserverData; |
(...skipping 13 matching lines...) Expand all Loading... |
193 Member<DatasetDOMStringMap> m_dataset; | 193 Member<DatasetDOMStringMap> m_dataset; |
194 Member<ElementShadow> m_shadow; | 194 Member<ElementShadow> m_shadow; |
195 Member<ClassList> m_classList; | 195 Member<ClassList> m_classList; |
196 Member<NamedNodeMap> m_attributeMap; | 196 Member<NamedNodeMap> m_attributeMap; |
197 Member<AttrNodeList> m_attrNodeList; | 197 Member<AttrNodeList> m_attrNodeList; |
198 Member<InlineCSSStyleDeclaration> m_cssomWrapper; | 198 Member<InlineCSSStyleDeclaration> m_cssomWrapper; |
199 Member<InlineStylePropertyMap> m_cssomMapWrapper; | 199 Member<InlineStylePropertyMap> m_cssomMapWrapper; |
200 std::unique_ptr<CompositorProxiedPropertySet> m_proxiedProperties; | 200 std::unique_ptr<CompositorProxiedPropertySet> m_proxiedProperties; |
201 | 201 |
202 Member<ElementAnimations> m_elementAnimations; | 202 Member<ElementAnimations> m_elementAnimations; |
203 Member<NodeIntersectionObserverData> m_intersectionObserverData; | 203 Member<ElementIntersectionObserverData> m_intersectionObserverData; |
204 Member<ResizeObserverDataMap> m_resizeObserverData; | 204 Member<ResizeObserverDataMap> m_resizeObserverData; |
205 | 205 |
206 RefPtr<ComputedStyle> m_computedStyle; | 206 RefPtr<ComputedStyle> m_computedStyle; |
207 // TODO(davaajav):remove this field when v0 custom elements are deprecated | 207 // TODO(davaajav):remove this field when v0 custom elements are deprecated |
208 Member<V0CustomElementDefinition> m_v0CustomElementDefinition; | 208 Member<V0CustomElementDefinition> m_v0CustomElementDefinition; |
209 Member<CustomElementDefinition> m_customElementDefinition; | 209 Member<CustomElementDefinition> m_customElementDefinition; |
210 | 210 |
211 Member<PseudoElementData> m_pseudoElementData; | 211 Member<PseudoElementData> m_pseudoElementData; |
212 | 212 |
213 explicit ElementRareData(LayoutObject*); | 213 explicit ElementRareData(LayoutObject*); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
267 inline CompositorProxiedPropertySet& | 267 inline CompositorProxiedPropertySet& |
268 ElementRareData::ensureCompositorProxiedPropertySet() { | 268 ElementRareData::ensureCompositorProxiedPropertySet() { |
269 if (!m_proxiedProperties) | 269 if (!m_proxiedProperties) |
270 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 270 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
271 return *m_proxiedProperties; | 271 return *m_proxiedProperties; |
272 } | 272 } |
273 | 273 |
274 } // namespace blink | 274 } // namespace blink |
275 | 275 |
276 #endif // ElementRareData_h | 276 #endif // ElementRareData_h |
OLD | NEW |