Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(264)

Side by Side Diff: Source/core/svg/SVGElementRareData.h

Issue 266063002: Store SVGElement instead of SVGElementInstance for instancesForElement (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix nits Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/core/svg/SVGElementInstance.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 #include "core/css/resolver/StyleResolver.h" 24 #include "core/css/resolver/StyleResolver.h"
25 #include "wtf/HashSet.h" 25 #include "wtf/HashSet.h"
26 #include "wtf/Noncopyable.h" 26 #include "wtf/Noncopyable.h"
27 #include "wtf/StdLibExtras.h" 27 #include "wtf/StdLibExtras.h"
28 28
29 namespace WebCore { 29 namespace WebCore {
30 30
31 class CSSCursorImageValue; 31 class CSSCursorImageValue;
32 class SVGCursorElement; 32 class SVGCursorElement;
33 class SVGElement; 33 class SVGElement;
34 class SVGElementInstance;
35 34
36 class SVGElementRareData : public NoBaseWillBeGarbageCollectedFinalized<SVGEleme ntRareData> { 35 class SVGElementRareData : public NoBaseWillBeGarbageCollectedFinalized<SVGEleme ntRareData> {
37 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;
38 public: 37 public:
39 SVGElementRareData(SVGElement* owner) 38 SVGElementRareData(SVGElement* owner)
40 : m_owner(owner) 39 : m_owner(owner)
41 , m_cursorElement(nullptr) 40 , m_cursorElement(nullptr)
42 , m_cursorImageValue(nullptr) 41 , m_cursorImageValue(nullptr)
43 , m_correspondingElement(0) 42 , m_correspondingElement(0)
44 , m_instancesUpdatesBlocked(false) 43 , m_instancesUpdatesBlocked(false)
(...skipping 13 matching lines...) Expand all
58 DEFINE_STATIC_LOCAL(SVGElementRareDataMap, rareDataMap, ()); 57 DEFINE_STATIC_LOCAL(SVGElementRareDataMap, rareDataMap, ());
59 return rareDataMap; 58 return rareDataMap;
60 #endif 59 #endif
61 } 60 }
62 61
63 static SVGElementRareData* rareDataFromMap(const SVGElement* element) 62 static SVGElementRareData* rareDataFromMap(const SVGElement* element)
64 { 63 {
65 return rareDataMap().get(element); 64 return rareDataMap().get(element);
66 } 65 }
67 66
68 HashSet<SVGElementInstance*>& elementInstances() { return m_elementInstances ; } 67 HashSet<SVGElement*>& elementInstances() { return m_elementInstances; }
69 const HashSet<SVGElementInstance*>& elementInstances() const { return m_elem entInstances; } 68 const HashSet<SVGElement*>& elementInstances() const { return m_elementInsta nces; }
70 69
71 bool instanceUpdatesBlocked() const { return m_instancesUpdatesBlocked; } 70 bool instanceUpdatesBlocked() const { return m_instancesUpdatesBlocked; }
72 void setInstanceUpdatesBlocked(bool value) { m_instancesUpdatesBlocked = val ue; } 71 void setInstanceUpdatesBlocked(bool value) { m_instancesUpdatesBlocked = val ue; }
73 72
74 SVGCursorElement* cursorElement() const { return m_cursorElement; } 73 SVGCursorElement* cursorElement() const { return m_cursorElement; }
75 void setCursorElement(SVGCursorElement* cursorElement) { m_cursorElement = c ursorElement; } 74 void setCursorElement(SVGCursorElement* cursorElement) { m_cursorElement = c ursorElement; }
76 75
77 SVGElement* correspondingElement() { return m_correspondingElement; } 76 SVGElement* correspondingElement() { return m_correspondingElement; }
78 void setCorrespondingElement(SVGElement* correspondingElement) { m_correspon dingElement = correspondingElement; } 77 void setCorrespondingElement(SVGElement* correspondingElement) { m_correspon dingElement = correspondingElement; }
79 78
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 } 138 }
140 m_cursorImageValue = nullptr; 139 m_cursorImageValue = nullptr;
141 } 140 }
142 ASSERT(!m_cursorElement || visitor->isAlive(m_cursorElement)); 141 ASSERT(!m_cursorElement || visitor->isAlive(m_cursorElement));
143 ASSERT(!m_cursorImageValue || visitor->isAlive(m_cursorImageValue)); 142 ASSERT(!m_cursorImageValue || visitor->isAlive(m_cursorImageValue));
144 #endif 143 #endif
145 } 144 }
146 145
147 private: 146 private:
148 RawPtrWillBeWeakMember<SVGElement> m_owner; 147 RawPtrWillBeWeakMember<SVGElement> m_owner;
149 HashSet<SVGElementInstance*> m_elementInstances; 148 HashSet<SVGElement*> m_elementInstances;
150 RawPtrWillBeWeakMember<SVGCursorElement> m_cursorElement; 149 RawPtrWillBeWeakMember<SVGCursorElement> m_cursorElement;
151 RawPtrWillBeWeakMember<CSSCursorImageValue> m_cursorImageValue; 150 RawPtrWillBeWeakMember<CSSCursorImageValue> m_cursorImageValue;
152 SVGElement* m_correspondingElement; 151 SVGElement* m_correspondingElement;
153 bool m_instancesUpdatesBlocked : 1; 152 bool m_instancesUpdatesBlocked : 1;
154 bool m_useOverrideComputedStyle : 1; 153 bool m_useOverrideComputedStyle : 1;
155 bool m_needsOverrideComputedStyleUpdate : 1; 154 bool m_needsOverrideComputedStyleUpdate : 1;
156 RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties; 155 RefPtrWillBeMember<MutableStylePropertySet> m_animatedSMILStyleProperties;
157 RefPtr<RenderStyle> m_overrideComputedStyle; 156 RefPtr<RenderStyle> m_overrideComputedStyle;
158 }; 157 };
159 158
160 } 159 }
161 160
162 #endif 161 #endif
OLDNEW
« no previous file with comments | « Source/core/svg/SVGElementInstance.cpp ('k') | Source/core/svg/SVGUseElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698