| 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; | 36 WTF_MAKE_FAST_ALLOCATED; |
| 37 public: | 37 public: |
| 38 Vector<OwnPtr<MutationObserverRegistration> > registry; | 38 Vector<OwnPtr<MutationObserverRegistration> > registry; |
| 39 HashSet<RawPtr<MutationObserverRegistration> > transientRegistry; | 39 HashSet<RawPtr<MutationObserverRegistration> > transientRegistry; |
| 40 | 40 |
| 41 static PassOwnPtr<NodeMutationObserverData> create() | 41 static PassOwnPtr<NodeMutationObserverData> create() |
| 42 { | 42 { |
| 43 return adoptPtr(new NodeMutationObserverData); | 43 return adoptPtr(new NodeMutationObserverData); |
| 44 } | 44 } |
| 45 | 45 |
| 46 void trace(Visitor* visitor) | |
| 47 { | |
| 48 #if ENABLE(OILPAN) | |
| 49 visitor->trace(registry); | |
| 50 visitor->trace(transientRegistry); | |
| 51 #endif | |
| 52 } | |
| 53 | |
| 54 private: | 46 private: |
| 55 NodeMutationObserverData() { } | 47 NodeMutationObserverData() { } |
| 56 }; | 48 }; |
| 57 | 49 |
| 58 class NodeRareData : public NodeRareDataBase { | 50 class NodeRareData : public NodeRareDataBase { |
| 59 WTF_MAKE_NONCOPYABLE(NodeRareData); | 51 WTF_MAKE_NONCOPYABLE(NodeRareData); |
| 60 WTF_MAKE_FAST_ALLOCATED; | 52 WTF_MAKE_FAST_ALLOCATED; |
| 61 public: | 53 public: |
| 62 static NodeRareData* create(RenderObject* renderer) | 54 static NodeRareData* create(RenderObject* renderer) |
| 63 { | 55 { |
| 64 return new NodeRareData(renderer); | 56 return new NodeRareData(renderer); |
| 65 } | 57 } |
| 66 | 58 |
| 67 NodeMutationObserverData* mutationObserverData() { return m_mutationObserver
Data.get(); } | 59 NodeMutationObserverData* mutationObserverData() { return m_mutationObserver
Data.get(); } |
| 68 NodeMutationObserverData& ensureMutationObserverData() | 60 NodeMutationObserverData& ensureMutationObserverData() |
| 69 { | 61 { |
| 70 if (!m_mutationObserverData) | 62 if (!m_mutationObserverData) |
| 71 m_mutationObserverData = NodeMutationObserverData::create(); | 63 m_mutationObserverData = NodeMutationObserverData::create(); |
| 72 return *m_mutationObserverData; | 64 return *m_mutationObserverData; |
| 73 } | 65 } |
| 74 | 66 |
| 75 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask;
} | 67 bool hasElementFlag(ElementFlags mask) const { return m_elementFlags & mask;
} |
| 76 void setElementFlag(ElementFlags mask, bool value) { m_elementFlags = (m_ele
mentFlags & ~mask) | (-(int32_t)value & mask); } | 68 void setElementFlag(ElementFlags mask, bool value) { m_elementFlags = (m_ele
mentFlags & ~mask) | (-(int32_t)value & mask); } |
| 77 void clearElementFlag(ElementFlags mask) { m_elementFlags &= ~mask; } | 69 void clearElementFlag(ElementFlags mask) { m_elementFlags &= ~mask; } |
| 78 | 70 |
| 79 void trace(Visitor*); | |
| 80 | |
| 81 void traceAfterDispatch(Visitor*); | |
| 82 void finalizeGarbageCollectedObject(); | |
| 83 | |
| 84 protected: | 71 protected: |
| 85 explicit NodeRareData(RenderObject* renderer) | 72 explicit NodeRareData(RenderObject* renderer) |
| 86 : NodeRareDataBase(renderer) | 73 : NodeRareDataBase(renderer) |
| 87 , m_elementFlags(0) | 74 , m_elementFlags(0) |
| 88 , m_isElementRareData(false) | 75 , m_isElementRareData(false) |
| 89 { } | 76 { } |
| 90 | 77 |
| 91 private: | 78 private: |
| 92 OwnPtr<NodeMutationObserverData> m_mutationObserverData; | 79 OwnPtr<NodeMutationObserverData> m_mutationObserverData; |
| 93 | 80 |
| 94 unsigned m_elementFlags : NumberOfElementFlags; | 81 unsigned m_elementFlags : NumberOfElementFlags; |
| 95 protected: | 82 protected: |
| 96 unsigned m_isElementRareData : 1; | 83 unsigned m_isElementRareData : 1; |
| 97 }; | 84 }; |
| 98 | 85 |
| 99 } // namespace blink | 86 } // namespace blink |
| 100 | 87 |
| 101 #endif // NodeRareData_h | 88 #endif // NodeRareData_h |
| OLD | NEW |