OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2008, 2010 Apple Inc. All rights reserved. | 2 * Copyright (C) 2008, 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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 transient_registry_; | 91 transient_registry_; |
92 }; | 92 }; |
93 | 93 |
94 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(NodeMutationObserverData); | 94 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(NodeMutationObserverData); |
95 | 95 |
96 class NodeRareData : public GarbageCollectedFinalized<NodeRareData>, | 96 class NodeRareData : public GarbageCollectedFinalized<NodeRareData>, |
97 public NodeRareDataBase { | 97 public NodeRareDataBase { |
98 WTF_MAKE_NONCOPYABLE(NodeRareData); | 98 WTF_MAKE_NONCOPYABLE(NodeRareData); |
99 | 99 |
100 public: | 100 public: |
101 static NodeRareData* Create(NodeLayoutData* node_layout_data) { | 101 static NodeRareData* Create(NodeRenderingData* node_layout_data) { |
102 return new NodeRareData(node_layout_data); | 102 return new NodeRareData(node_layout_data); |
103 } | 103 } |
104 | 104 |
105 void ClearNodeLists() { node_lists_.Clear(); } | 105 void ClearNodeLists() { node_lists_.Clear(); } |
106 NodeListsNodeData* NodeLists() const { return node_lists_.Get(); } | 106 NodeListsNodeData* NodeLists() const { return node_lists_.Get(); } |
107 // ensureNodeLists() and a following NodeListsNodeData functions must be | 107 // ensureNodeLists() and a following NodeListsNodeData functions must be |
108 // wrapped with a ThreadState::GCForbiddenScope in order to avoid an | 108 // wrapped with a ThreadState::GCForbiddenScope in order to avoid an |
109 // initialized m_nodeLists is cleared by NodeRareData::traceAfterDispatch(). | 109 // initialized m_nodeLists is cleared by NodeRareData::traceAfterDispatch(). |
110 NodeListsNodeData& EnsureNodeLists() { | 110 NodeListsNodeData& EnsureNodeLists() { |
111 DCHECK(ThreadState::Current()->IsGCForbidden()); | 111 DCHECK(ThreadState::Current()->IsGCForbidden()); |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 | 156 |
157 DECLARE_TRACE(); | 157 DECLARE_TRACE(); |
158 | 158 |
159 DECLARE_TRACE_AFTER_DISPATCH(); | 159 DECLARE_TRACE_AFTER_DISPATCH(); |
160 void FinalizeGarbageCollectedObject(); | 160 void FinalizeGarbageCollectedObject(); |
161 | 161 |
162 DECLARE_TRACE_WRAPPERS(); | 162 DECLARE_TRACE_WRAPPERS(); |
163 DECLARE_TRACE_WRAPPERS_AFTER_DISPATCH(); | 163 DECLARE_TRACE_WRAPPERS_AFTER_DISPATCH(); |
164 | 164 |
165 protected: | 165 protected: |
166 explicit NodeRareData(NodeLayoutData* node_layout_data) | 166 explicit NodeRareData(NodeRenderingData* node_layout_data) |
167 : NodeRareDataBase(node_layout_data), | 167 : NodeRareDataBase(node_layout_data), |
168 connected_frame_count_(0), | 168 connected_frame_count_(0), |
169 element_flags_(0), | 169 element_flags_(0), |
170 restyle_flags_(0), | 170 restyle_flags_(0), |
171 is_element_rare_data_(false) { | 171 is_element_rare_data_(false) { |
172 CHECK_NE(node_layout_data, nullptr); | 172 CHECK_NE(node_layout_data, nullptr); |
173 } | 173 } |
174 | 174 |
175 private: | 175 private: |
176 Member<NodeListsNodeData> node_lists_; | 176 Member<NodeListsNodeData> node_lists_; |
177 Member<NodeMutationObserverData> mutation_observer_data_; | 177 Member<NodeMutationObserverData> mutation_observer_data_; |
178 | 178 |
179 unsigned connected_frame_count_ : kConnectedFrameCountBits; | 179 unsigned connected_frame_count_ : kConnectedFrameCountBits; |
180 unsigned element_flags_ : kNumberOfElementFlags; | 180 unsigned element_flags_ : kNumberOfElementFlags; |
181 unsigned restyle_flags_ : kNumberOfDynamicRestyleFlags; | 181 unsigned restyle_flags_ : kNumberOfDynamicRestyleFlags; |
182 | 182 |
183 protected: | 183 protected: |
184 unsigned is_element_rare_data_ : 1; | 184 unsigned is_element_rare_data_ : 1; |
185 }; | 185 }; |
186 | 186 |
187 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(NodeRareData); | 187 DEFINE_TRAIT_FOR_TRACE_WRAPPERS(NodeRareData); |
188 | 188 |
189 } // namespace blink | 189 } // namespace blink |
190 | 190 |
191 #endif // NodeRareData_h | 191 #endif // NodeRareData_h |
OLD | NEW |