| 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 25 matching lines...) Expand all Loading... |
| 36 WTF_MAKE_NONCOPYABLE(SVGElementRareData); WTF_MAKE_FAST_ALLOCATED_WILL_BE_RE
MOVED; | 36 WTF_MAKE_NONCOPYABLE(SVGElementRareData); WTF_MAKE_FAST_ALLOCATED_WILL_BE_RE
MOVED; |
| 37 public: | 37 public: |
| 38 SVGElementRareData(SVGElement* owner) | 38 SVGElementRareData(SVGElement* owner) |
| 39 #if ENABLE(OILPAN) | 39 #if ENABLE(OILPAN) |
| 40 : m_owner(owner) | 40 : m_owner(owner) |
| 41 , m_cursorElement(nullptr) | 41 , m_cursorElement(nullptr) |
| 42 #else | 42 #else |
| 43 : m_cursorElement(nullptr) | 43 : m_cursorElement(nullptr) |
| 44 #endif | 44 #endif |
| 45 , m_cursorImageValue(nullptr) | 45 , m_cursorImageValue(nullptr) |
| 46 , m_correspondingElement(0) | 46 , m_correspondingElement(nullptr) |
| 47 , m_instancesUpdatesBlocked(false) | 47 , m_instancesUpdatesBlocked(false) |
| 48 , m_useOverrideComputedStyle(false) | 48 , m_useOverrideComputedStyle(false) |
| 49 , m_needsOverrideComputedStyleUpdate(false) | 49 , m_needsOverrideComputedStyleUpdate(false) |
| 50 { | 50 { |
| 51 } | 51 } |
| 52 | 52 |
| 53 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<const SVGElement>, RawPtrWi
llBeMember<SVGElementRareData> > SVGElementRareDataMap; | 53 typedef WillBeHeapHashMap<RawPtrWillBeWeakMember<const SVGElement>, RawPtrWi
llBeMember<SVGElementRareData> > SVGElementRareDataMap; |
| 54 | 54 |
| 55 static SVGElementRareDataMap& rareDataMap() | 55 static SVGElementRareDataMap& rareDataMap() |
| 56 { | 56 { |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool useOverrideComputedStyle() const { return m_useOverrideComputedStyle; } | 108 bool useOverrideComputedStyle() const { return m_useOverrideComputedStyle; } |
| 109 void setUseOverrideComputedStyle(bool value) { m_useOverrideComputedStyle =
value; } | 109 void setUseOverrideComputedStyle(bool value) { m_useOverrideComputedStyle =
value; } |
| 110 void setNeedsOverrideComputedStyleUpdate() { m_needsOverrideComputedStyleUpd
ate = true; } | 110 void setNeedsOverrideComputedStyleUpdate() { m_needsOverrideComputedStyleUpd
ate = true; } |
| 111 | 111 |
| 112 void trace(Visitor* visitor) | 112 void trace(Visitor* visitor) |
| 113 { | 113 { |
| 114 visitor->trace(m_animatedSMILStyleProperties); | 114 visitor->trace(m_animatedSMILStyleProperties); |
| 115 visitor->trace(m_elementInstances); | 115 visitor->trace(m_elementInstances); |
| 116 visitor->trace(m_correspondingElement); |
| 116 visitor->registerWeakMembers<SVGElementRareData, &SVGElementRareData::pr
ocessWeakMembers>(this); | 117 visitor->registerWeakMembers<SVGElementRareData, &SVGElementRareData::pr
ocessWeakMembers>(this); |
| 117 } | 118 } |
| 118 | 119 |
| 119 void processWeakMembers(Visitor* visitor) | 120 void processWeakMembers(Visitor* visitor) |
| 120 { | 121 { |
| 121 #if ENABLE(OILPAN) | 122 #if ENABLE(OILPAN) |
| 122 if (!visitor->isAlive(m_owner)) { | 123 if (!visitor->isAlive(m_owner)) { |
| 123 // If the owning SVGElement is dead this raraData element will be co
llected ASAP. | 124 // If the owning SVGElement is dead this raraData element will be co
llected ASAP. |
| 124 // The owning SVGElement will also be automatically removed from the
SVGCursorElement's | 125 // The owning SVGElement will also be automatically removed from the
SVGCursorElement's |
| 125 // HashSet so no need to call out and clear anything. | 126 // HashSet so no need to call out and clear anything. |
| (...skipping 17 matching lines...) Expand all Loading... |
| 143 } | 144 } |
| 144 m_cursorImageValue = nullptr; | 145 m_cursorImageValue = nullptr; |
| 145 } | 146 } |
| 146 ASSERT(!m_cursorElement || visitor->isAlive(m_cursorElement)); | 147 ASSERT(!m_cursorElement || visitor->isAlive(m_cursorElement)); |
| 147 ASSERT(!m_cursorImageValue || visitor->isAlive(m_cursorImageValue)); | 148 ASSERT(!m_cursorImageValue || visitor->isAlive(m_cursorImageValue)); |
| 148 #endif | 149 #endif |
| 149 } | 150 } |
| 150 | 151 |
| 151 private: | 152 private: |
| 152 #if ENABLE(OILPAN) | 153 #if ENABLE(OILPAN) |
| 153 RawPtrWillBeWeakMember<SVGElement> m_owner; | 154 WeakMember<SVGElement> m_owner; |
| 154 #endif | 155 #endif |
| 155 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementInstances; | 156 WillBeHeapHashSet<RawPtrWillBeWeakMember<SVGElement> > m_elementInstances; |
| 156 RawPtrWillBeWeakMember<SVGCursorElement> m_cursorElement; | 157 RawPtrWillBeWeakMember<SVGCursorElement> m_cursorElement; |
| 157 RawPtrWillBeWeakMember<CSSCursorImageValue> m_cursorImageValue; | 158 RawPtrWillBeWeakMember<CSSCursorImageValue> m_cursorImageValue; |
| 158 SVGElement* m_correspondingElement; | 159 RawPtrWillBeMember<SVGElement> m_correspondingElement; |
| 159 bool m_instancesUpdatesBlocked : 1; | 160 bool m_instancesUpdatesBlocked : 1; |
| 160 bool m_useOverrideComputedStyle : 1; | 161 bool m_useOverrideComputedStyle : 1; |
| 161 bool m_needsOverrideComputedStyleUpdate : 1; | 162 bool m_needsOverrideComputedStyleUpdate : 1; |
| 162 RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties; | 163 RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties; |
| 163 RefPtr<RenderStyle> m_overrideComputedStyle; | 164 RefPtr<RenderStyle> m_overrideComputedStyle; |
| 164 }; | 165 }; |
| 165 | 166 |
| 166 } | 167 } |
| 167 | 168 |
| 168 #endif | 169 #endif |
| OLD | NEW |