| 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, |
| 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> |
| 25 #include "bindings/core/v8/ScriptWrappableVisitor.h" | 26 #include "bindings/core/v8/ScriptWrappableVisitor.h" |
| 26 #include "core/animation/ElementAnimations.h" | 27 #include "core/animation/ElementAnimations.h" |
| 27 #include "core/css/cssom/InlineStylePropertyMap.h" | 28 #include "core/css/cssom/InlineStylePropertyMap.h" |
| 29 #include "core/dom/AccessibleNode.h" |
| 28 #include "core/dom/Attr.h" | 30 #include "core/dom/Attr.h" |
| 29 #include "core/dom/CompositorProxiedPropertySet.h" | 31 #include "core/dom/CompositorProxiedPropertySet.h" |
| 30 #include "core/dom/DatasetDOMStringMap.h" | 32 #include "core/dom/DatasetDOMStringMap.h" |
| 31 #include "core/dom/ElementIntersectionObserverData.h" | 33 #include "core/dom/ElementIntersectionObserverData.h" |
| 32 #include "core/dom/NamedNodeMap.h" | 34 #include "core/dom/NamedNodeMap.h" |
| 33 #include "core/dom/NodeRareData.h" | 35 #include "core/dom/NodeRareData.h" |
| 34 #include "core/dom/PseudoElement.h" | 36 #include "core/dom/PseudoElement.h" |
| 35 #include "core/dom/PseudoElementData.h" | 37 #include "core/dom/PseudoElementData.h" |
| 36 #include "core/dom/custom/CustomElementDefinition.h" | 38 #include "core/dom/custom/CustomElementDefinition.h" |
| 37 #include "core/dom/custom/V0CustomElementDefinition.h" | 39 #include "core/dom/custom/V0CustomElementDefinition.h" |
| 38 #include "core/dom/shadow/ElementShadow.h" | 40 #include "core/dom/shadow/ElementShadow.h" |
| 39 #include "core/html/ClassList.h" | 41 #include "core/html/ClassList.h" |
| 40 #include "platform/heap/Handle.h" | 42 #include "platform/heap/Handle.h" |
| 41 #include "wtf/HashSet.h" | 43 #include "wtf/HashSet.h" |
| 42 #include <memory> | |
| 43 | 44 |
| 44 namespace blink { | 45 namespace blink { |
| 45 | 46 |
| 46 class LayoutObject; | 47 class LayoutObject; |
| 47 class CompositorProxiedPropertySet; | 48 class CompositorProxiedPropertySet; |
| 48 class ResizeObservation; | 49 class ResizeObservation; |
| 49 class ResizeObserver; | 50 class ResizeObserver; |
| 50 | 51 |
| 51 class ElementRareData : public NodeRareData { | 52 class ElementRareData : public NodeRareData { |
| 52 public: | 53 public: |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 return m_v0CustomElementDefinition.get(); | 147 return m_v0CustomElementDefinition.get(); |
| 147 } | 148 } |
| 148 | 149 |
| 149 void setCustomElementDefinition(CustomElementDefinition* definition) { | 150 void setCustomElementDefinition(CustomElementDefinition* definition) { |
| 150 m_customElementDefinition = definition; | 151 m_customElementDefinition = definition; |
| 151 } | 152 } |
| 152 CustomElementDefinition* customElementDefinition() const { | 153 CustomElementDefinition* customElementDefinition() const { |
| 153 return m_customElementDefinition.get(); | 154 return m_customElementDefinition.get(); |
| 154 } | 155 } |
| 155 | 156 |
| 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 |
| 156 AttrNodeList& ensureAttrNodeList(); | 166 AttrNodeList& ensureAttrNodeList(); |
| 157 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } | 167 AttrNodeList* attrNodeList() { return m_attrNodeList.get(); } |
| 158 void removeAttrNodeList() { m_attrNodeList.clear(); } | 168 void removeAttrNodeList() { m_attrNodeList.clear(); } |
| 159 void addAttr(Attr* attr) { | 169 void addAttr(Attr* attr) { |
| 160 ensureAttrNodeList().push_back(attr); | 170 ensureAttrNodeList().push_back(attr); |
| 161 ScriptWrappableVisitor::writeBarrier(this, attr); | 171 ScriptWrappableVisitor::writeBarrier(this, attr); |
| 162 } | 172 } |
| 163 | 173 |
| 164 ElementIntersectionObserverData* intersectionObserverData() const { | 174 ElementIntersectionObserverData* intersectionObserverData() const { |
| 165 return m_intersectionObserverData.get(); | 175 return m_intersectionObserverData.get(); |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 203 Member<ElementIntersectionObserverData> m_intersectionObserverData; | 213 Member<ElementIntersectionObserverData> m_intersectionObserverData; |
| 204 Member<ResizeObserverDataMap> m_resizeObserverData; | 214 Member<ResizeObserverDataMap> m_resizeObserverData; |
| 205 | 215 |
| 206 RefPtr<ComputedStyle> m_computedStyle; | 216 RefPtr<ComputedStyle> m_computedStyle; |
| 207 // TODO(davaajav):remove this field when v0 custom elements are deprecated | 217 // TODO(davaajav):remove this field when v0 custom elements are deprecated |
| 208 Member<V0CustomElementDefinition> m_v0CustomElementDefinition; | 218 Member<V0CustomElementDefinition> m_v0CustomElementDefinition; |
| 209 Member<CustomElementDefinition> m_customElementDefinition; | 219 Member<CustomElementDefinition> m_customElementDefinition; |
| 210 | 220 |
| 211 Member<PseudoElementData> m_pseudoElementData; | 221 Member<PseudoElementData> m_pseudoElementData; |
| 212 | 222 |
| 223 Member<AccessibleNode> m_accessibleNode; |
| 224 |
| 213 explicit ElementRareData(LayoutObject*); | 225 explicit ElementRareData(LayoutObject*); |
| 214 }; | 226 }; |
| 215 | 227 |
| 216 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ElementRareData); | 228 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(ElementRareData); |
| 217 | 229 |
| 218 inline LayoutSize defaultMinimumSizeForResizing() { | 230 inline LayoutSize defaultMinimumSizeForResizing() { |
| 219 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); | 231 return LayoutSize(LayoutUnit::max(), LayoutUnit::max()); |
| 220 } | 232 } |
| 221 | 233 |
| 222 inline ElementRareData::ElementRareData(LayoutObject* layoutObject) | 234 inline ElementRareData::ElementRareData(LayoutObject* layoutObject) |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 269 inline CompositorProxiedPropertySet& | 281 inline CompositorProxiedPropertySet& |
| 270 ElementRareData::ensureCompositorProxiedPropertySet() { | 282 ElementRareData::ensureCompositorProxiedPropertySet() { |
| 271 if (!m_proxiedProperties) | 283 if (!m_proxiedProperties) |
| 272 m_proxiedProperties = CompositorProxiedPropertySet::create(); | 284 m_proxiedProperties = CompositorProxiedPropertySet::create(); |
| 273 return *m_proxiedProperties; | 285 return *m_proxiedProperties; |
| 274 } | 286 } |
| 275 | 287 |
| 276 } // namespace blink | 288 } // namespace blink |
| 277 | 289 |
| 278 #endif // ElementRareData_h | 290 #endif // ElementRareData_h |
| OLD | NEW |