| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 DEFINE_STATIC_LOCAL(SVGElementRareDataMap, rareDataMap, ()); | 57 DEFINE_STATIC_LOCAL(SVGElementRareDataMap, rareDataMap, ()); |
| 58 return rareDataMap; | 58 return rareDataMap; |
| 59 #endif | 59 #endif |
| 60 } | 60 } |
| 61 | 61 |
| 62 static SVGElementRareData* rareDataFromMap(const SVGElement* element) | 62 static SVGElementRareData* rareDataFromMap(const SVGElement* element) |
| 63 { | 63 { |
| 64 return rareDataMap().get(element); | 64 return rareDataMap().get(element); |
| 65 } | 65 } |
| 66 | 66 |
| 67 HashSet<SVGElement*>& elementInstances() { return m_elementInstances; } | 67 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> >& elementInstances() {
return m_elementInstances; } |
| 68 const HashSet<SVGElement*>& elementInstances() const { return m_elementInsta
nces; } | 68 const WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> >& elementInstanc
es() const { return m_elementInstances; } |
| 69 | 69 |
| 70 bool instanceUpdatesBlocked() const { return m_instancesUpdatesBlocked; } | 70 bool instanceUpdatesBlocked() const { return m_instancesUpdatesBlocked; } |
| 71 void setInstanceUpdatesBlocked(bool value) { m_instancesUpdatesBlocked = val
ue; } | 71 void setInstanceUpdatesBlocked(bool value) { m_instancesUpdatesBlocked = val
ue; } |
| 72 | 72 |
| 73 SVGCursorElement* cursorElement() const { return m_cursorElement; } | 73 SVGCursorElement* cursorElement() const { return m_cursorElement; } |
| 74 void setCursorElement(SVGCursorElement* cursorElement) { m_cursorElement = c
ursorElement; } | 74 void setCursorElement(SVGCursorElement* cursorElement) { m_cursorElement = c
ursorElement; } |
| 75 | 75 |
| 76 SVGElement* correspondingElement() { return m_correspondingElement; } | 76 SVGElement* correspondingElement() { return m_correspondingElement; } |
| 77 void setCorrespondingElement(SVGElement* correspondingElement) { m_correspon
dingElement = correspondingElement; } | 77 void setCorrespondingElement(SVGElement* correspondingElement) { m_correspon
dingElement = correspondingElement; } |
| 78 | 78 |
| (...skipping 22 matching lines...) Expand all Loading... |
| 101 return m_overrideComputedStyle.get(); | 101 return m_overrideComputedStyle.get(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 bool useOverrideComputedStyle() const { return m_useOverrideComputedStyle; } | 104 bool useOverrideComputedStyle() const { return m_useOverrideComputedStyle; } |
| 105 void setUseOverrideComputedStyle(bool value) { m_useOverrideComputedStyle =
value; } | 105 void setUseOverrideComputedStyle(bool value) { m_useOverrideComputedStyle =
value; } |
| 106 void setNeedsOverrideComputedStyleUpdate() { m_needsOverrideComputedStyleUpd
ate = true; } | 106 void setNeedsOverrideComputedStyleUpdate() { m_needsOverrideComputedStyleUpd
ate = true; } |
| 107 | 107 |
| 108 void trace(Visitor* visitor) | 108 void trace(Visitor* visitor) |
| 109 { | 109 { |
| 110 visitor->trace(m_animatedSMILStyleProperties); | 110 visitor->trace(m_animatedSMILStyleProperties); |
| 111 visitor->trace(m_elementInstances); |
| 111 visitor->registerWeakMembers<SVGElementRareData, &SVGElementRareData::pr
ocessWeakMembers>(this); | 112 visitor->registerWeakMembers<SVGElementRareData, &SVGElementRareData::pr
ocessWeakMembers>(this); |
| 112 } | 113 } |
| 113 | 114 |
| 114 void processWeakMembers(Visitor* visitor) | 115 void processWeakMembers(Visitor* visitor) |
| 115 { | 116 { |
| 116 #if ENABLE(OILPAN) | 117 #if ENABLE(OILPAN) |
| 117 if (!visitor->isAlive(m_owner)) { | 118 if (!visitor->isAlive(m_owner)) { |
| 118 // If the owning SVGElement is dead this raraData element will be co
llected ASAP. | 119 // If the owning SVGElement is dead this raraData element will be co
llected ASAP. |
| 119 // The owning SVGElement will also be automatically removed from the
SVGCursorElement's | 120 // The owning SVGElement will also be automatically removed from the
SVGCursorElement's |
| 120 // HashSet so no need to call out and clear anything. | 121 // HashSet so no need to call out and clear anything. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 138 } | 139 } |
| 139 m_cursorImageValue = nullptr; | 140 m_cursorImageValue = nullptr; |
| 140 } | 141 } |
| 141 ASSERT(!m_cursorElement || visitor->isAlive(m_cursorElement)); | 142 ASSERT(!m_cursorElement || visitor->isAlive(m_cursorElement)); |
| 142 ASSERT(!m_cursorImageValue || visitor->isAlive(m_cursorImageValue)); | 143 ASSERT(!m_cursorImageValue || visitor->isAlive(m_cursorImageValue)); |
| 143 #endif | 144 #endif |
| 144 } | 145 } |
| 145 | 146 |
| 146 private: | 147 private: |
| 147 RawPtrWillBeWeakMember<SVGElement> m_owner; | 148 RawPtrWillBeWeakMember<SVGElement> m_owner; |
| 148 HashSet<SVGElement*> m_elementInstances; | 149 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementInstances; |
| 149 RawPtrWillBeWeakMember<SVGCursorElement> m_cursorElement; | 150 RawPtrWillBeWeakMember<SVGCursorElement> m_cursorElement; |
| 150 RawPtrWillBeWeakMember<CSSCursorImageValue> m_cursorImageValue; | 151 RawPtrWillBeWeakMember<CSSCursorImageValue> m_cursorImageValue; |
| 151 SVGElement* m_correspondingElement; | 152 SVGElement* m_correspondingElement; |
| 152 bool m_instancesUpdatesBlocked : 1; | 153 bool m_instancesUpdatesBlocked : 1; |
| 153 bool m_useOverrideComputedStyle : 1; | 154 bool m_useOverrideComputedStyle : 1; |
| 154 bool m_needsOverrideComputedStyleUpdate : 1; | 155 bool m_needsOverrideComputedStyleUpdate : 1; |
| 155 RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties; | 156 RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties; |
| 156 RefPtr<RenderStyle> m_overrideComputedStyle; | 157 RefPtr<RenderStyle> m_overrideComputedStyle; |
| 157 }; | 158 }; |
| 158 | 159 |
| 159 } | 160 } |
| 160 | 161 |
| 161 #endif | 162 #endif |
| OLD | NEW |