Chromium Code Reviews| 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 25 matching lines...) Expand all Loading... | |
| 36 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; | 36 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED; |
| 37 public: | 37 public: |
| 38 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> > registry ; | 38 WillBeHeapVector<OwnPtrWillBeMember<MutationObserverRegistration> > registry ; |
| 39 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> > transie ntRegistry; | 39 WillBeHeapHashSet<RawPtrWillBeMember<MutationObserverRegistration> > transie ntRegistry; |
| 40 | 40 |
| 41 static PassOwnPtrWillBeRawPtr<NodeMutationObserverData> create() | 41 static PassOwnPtrWillBeRawPtr<NodeMutationObserverData> create() |
| 42 { | 42 { |
| 43 return adoptPtrWillBeNoop(new NodeMutationObserverData); | 43 return adoptPtrWillBeNoop(new NodeMutationObserverData); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void trace(Visitor* visitor) | 46 DEFINE_INLINE_TRACE() |
| 47 { | 47 { |
| 48 #if ENABLE(OILPAN) | 48 #if ENABLE(OILPAN) |
| 49 visitor->trace(registry); | 49 visitor->trace(registry); |
| 50 visitor->trace(transientRegistry); | 50 visitor->trace(transientRegistry); |
| 51 #endif | 51 #endif |
| 52 } | 52 } |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 NodeMutationObserverData() { } | 55 NodeMutationObserverData() { } |
| 56 }; | 56 }; |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 99 | 99 |
| 100 bool hasRestyleFlag(DynamicRestyleFlags mask) const { return m_restyleFlags & mask; } | 100 bool hasRestyleFlag(DynamicRestyleFlags mask) const { return m_restyleFlags & mask; } |
| 101 void setRestyleFlag(DynamicRestyleFlags mask) { m_restyleFlags |= mask; RELE ASE_ASSERT(m_restyleFlags); } | 101 void setRestyleFlag(DynamicRestyleFlags mask) { m_restyleFlags |= mask; RELE ASE_ASSERT(m_restyleFlags); } |
| 102 bool hasRestyleFlags() const { return m_restyleFlags; } | 102 bool hasRestyleFlags() const { return m_restyleFlags; } |
| 103 void clearRestyleFlags() { m_restyleFlags = 0; } | 103 void clearRestyleFlags() { m_restyleFlags = 0; } |
| 104 | 104 |
| 105 enum { | 105 enum { |
| 106 ConnectedFrameCountBits = 10, // Must fit Page::maxNumberOfFrames. | 106 ConnectedFrameCountBits = 10, // Must fit Page::maxNumberOfFrames. |
| 107 }; | 107 }; |
| 108 | 108 |
| 109 void trace(Visitor*); | 109 DECLARE_TRACE(); |
| 110 | 110 |
| 111 void traceAfterDispatch(Visitor*); | 111 DECLARE_TRACE_AFTER_DISPATCH(); |
|
haraken
2015/02/24 09:18:36
Add a comment on why we need traceAfterDispatch.
| |
| 112 void finalizeGarbageCollectedObject(); | 112 void finalizeGarbageCollectedObject(); |
| 113 | 113 |
| 114 protected: | 114 protected: |
| 115 explicit NodeRareData(LayoutObject* renderer) | 115 explicit NodeRareData(LayoutObject* renderer) |
| 116 : NodeRareDataBase(renderer) | 116 : NodeRareDataBase(renderer) |
| 117 , m_connectedFrameCount(0) | 117 , m_connectedFrameCount(0) |
| 118 , m_elementFlags(0) | 118 , m_elementFlags(0) |
| 119 , m_restyleFlags(0) | 119 , m_restyleFlags(0) |
| 120 , m_isElementRareData(false) | 120 , m_isElementRareData(false) |
| 121 { } | 121 { } |
| 122 | 122 |
| 123 private: | 123 private: |
| 124 OwnPtrWillBeMember<NodeListsNodeData> m_nodeLists; | 124 OwnPtrWillBeMember<NodeListsNodeData> m_nodeLists; |
| 125 OwnPtrWillBeMember<NodeMutationObserverData> m_mutationObserverData; | 125 OwnPtrWillBeMember<NodeMutationObserverData> m_mutationObserverData; |
| 126 | 126 |
| 127 unsigned m_connectedFrameCount : ConnectedFrameCountBits; | 127 unsigned m_connectedFrameCount : ConnectedFrameCountBits; |
| 128 unsigned m_elementFlags : NumberOfElementFlags; | 128 unsigned m_elementFlags : NumberOfElementFlags; |
| 129 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; | 129 unsigned m_restyleFlags : NumberOfDynamicRestyleFlags; |
| 130 protected: | 130 protected: |
| 131 unsigned m_isElementRareData : 1; | 131 unsigned m_isElementRareData : 1; |
| 132 }; | 132 }; |
| 133 | 133 |
| 134 } // namespace blink | 134 } // namespace blink |
| 135 | 135 |
| 136 #endif // NodeRareData_h | 136 #endif // NodeRareData_h |
| OLD | NEW |