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 26 matching lines...) Expand all Loading... |
37 #include "core/html/ClassList.h" | 37 #include "core/html/ClassList.h" |
38 #include "core/style/StyleInheritedData.h" | 38 #include "core/style/StyleInheritedData.h" |
39 #include "platform/heap/Handle.h" | 39 #include "platform/heap/Handle.h" |
40 #include "wtf/HashSet.h" | 40 #include "wtf/HashSet.h" |
41 #include <memory> | 41 #include <memory> |
42 | 42 |
43 namespace blink { | 43 namespace blink { |
44 | 44 |
45 class HTMLElement; | 45 class HTMLElement; |
46 class CompositorProxiedPropertySet; | 46 class CompositorProxiedPropertySet; |
| 47 class ResizeObservation; |
| 48 class ResizeObserver; |
47 | 49 |
48 class ElementRareData : public NodeRareData { | 50 class ElementRareData : public NodeRareData { |
49 public: | 51 public: |
50 static ElementRareData* create(LayoutObject* layoutObject) | 52 static ElementRareData* create(LayoutObject* layoutObject) |
51 { | 53 { |
52 return new ElementRareData(layoutObject); | 54 return new ElementRareData(layoutObject); |
53 } | 55 } |
54 | 56 |
55 ~ElementRareData(); | 57 ~ElementRareData(); |
56 | 58 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 void removeAttrNodeList() { m_attrNodeList.clear(); } | 133 void removeAttrNodeList() { m_attrNodeList.clear(); } |
132 | 134 |
133 NodeIntersectionObserverData* intersectionObserverData() const { return m_in
tersectionObserverData.get(); } | 135 NodeIntersectionObserverData* intersectionObserverData() const { return m_in
tersectionObserverData.get(); } |
134 NodeIntersectionObserverData& ensureIntersectionObserverData() | 136 NodeIntersectionObserverData& ensureIntersectionObserverData() |
135 { | 137 { |
136 if (!m_intersectionObserverData) | 138 if (!m_intersectionObserverData) |
137 m_intersectionObserverData = new NodeIntersectionObserverData(); | 139 m_intersectionObserverData = new NodeIntersectionObserverData(); |
138 return *m_intersectionObserverData; | 140 return *m_intersectionObserverData; |
139 } | 141 } |
140 | 142 |
| 143 using ResizeObserverDataMap = HeapHashMap<Member<ResizeObserver>, Member<Res
izeObservation>>; |
| 144 |
| 145 ResizeObserverDataMap* resizeObserverData() const { return m_resizeObserverD
ata; } |
| 146 ResizeObserverDataMap& ensureResizeObserverData(); |
| 147 |
141 DECLARE_TRACE_AFTER_DISPATCH(); | 148 DECLARE_TRACE_AFTER_DISPATCH(); |
142 | 149 |
143 DECLARE_TRACE_WRAPPERS_AFTER_DISPATCH(); | 150 DECLARE_TRACE_WRAPPERS_AFTER_DISPATCH(); |
144 | 151 |
145 private: | 152 private: |
146 CompositorProxiedPropertySet& ensureCompositorProxiedPropertySet(); | 153 CompositorProxiedPropertySet& ensureCompositorProxiedPropertySet(); |
147 void clearCompositorProxiedPropertySet() { m_proxiedProperties = nullptr; } | 154 void clearCompositorProxiedPropertySet() { m_proxiedProperties = nullptr; } |
148 | 155 |
149 short m_tabindex; | 156 short m_tabindex; |
150 | 157 |
151 LayoutSize m_minimumSizeForResizing; | 158 LayoutSize m_minimumSizeForResizing; |
152 IntSize m_savedLayerScrollOffset; | 159 IntSize m_savedLayerScrollOffset; |
153 | 160 |
154 Member<DatasetDOMStringMap> m_dataset; | 161 Member<DatasetDOMStringMap> m_dataset; |
155 Member<ElementShadow> m_shadow; | 162 Member<ElementShadow> m_shadow; |
156 Member<ClassList> m_classList; | 163 Member<ClassList> m_classList; |
157 Member<NamedNodeMap> m_attributeMap; | 164 Member<NamedNodeMap> m_attributeMap; |
158 Member<AttrNodeList> m_attrNodeList; | 165 Member<AttrNodeList> m_attrNodeList; |
159 Member<InlineCSSStyleDeclaration> m_cssomWrapper; | 166 Member<InlineCSSStyleDeclaration> m_cssomWrapper; |
160 Member<InlineStylePropertyMap> m_cssomMapWrapper; | 167 Member<InlineStylePropertyMap> m_cssomMapWrapper; |
161 std::unique_ptr<CompositorProxiedPropertySet> m_proxiedProperties; | 168 std::unique_ptr<CompositorProxiedPropertySet> m_proxiedProperties; |
162 | 169 |
163 Member<ElementAnimations> m_elementAnimations; | 170 Member<ElementAnimations> m_elementAnimations; |
164 Member<NodeIntersectionObserverData> m_intersectionObserverData; | 171 Member<NodeIntersectionObserverData> m_intersectionObserverData; |
| 172 Member<ResizeObserverDataMap> m_resizeObserverData; |
165 | 173 |
166 RefPtr<ComputedStyle> m_computedStyle; | 174 RefPtr<ComputedStyle> m_computedStyle; |
167 Member<V0CustomElementDefinition> m_customElementDefinition; | 175 Member<V0CustomElementDefinition> m_customElementDefinition; |
168 | 176 |
169 Member<PseudoElementData> m_pseudoElementData; | 177 Member<PseudoElementData> m_pseudoElementData; |
170 | 178 |
171 explicit ElementRareData(LayoutObject*); | 179 explicit ElementRareData(LayoutObject*); |
172 }; | 180 }; |
173 | 181 |
174 inline LayoutSize defaultMinimumSizeForResizing() | 182 inline LayoutSize defaultMinimumSizeForResizing() |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro
pertySet() | 240 inline CompositorProxiedPropertySet& ElementRareData::ensureCompositorProxiedPro
pertySet() |
233 { | 241 { |
234 if (!m_proxiedProperties) | 242 if (!m_proxiedProperties) |
235 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 243 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
236 return *m_proxiedProperties; | 244 return *m_proxiedProperties; |
237 } | 245 } |
238 | 246 |
239 } // namespace blink | 247 } // namespace blink |
240 | 248 |
241 #endif // ElementRareData_h | 249 #endif // ElementRareData_h |
OLD | NEW |