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

Side by Side Diff: Source/core/svg/properties/SVGPropertyTearOff.h

Issue 25164005: Merge 158408 "Revert 157959 "Introduce a new reference graph to ..." (Closed) Base URL: svn://svn.chromium.org/blink/branches/chromium/1650/
Patch Set: Created 7 years, 2 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 | Annotate | Revision Log
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 m_animatedProperty = animatedProperty; 67 m_animatedProperty = animatedProperty;
68 68
69 if (m_animatedProperty) 69 if (m_animatedProperty)
70 m_contextElement = m_animatedProperty->contextElement(); 70 m_contextElement = m_animatedProperty->contextElement();
71 } 71 }
72 72
73 SVGElement* contextElement() const 73 SVGElement* contextElement() const
74 { 74 {
75 if (!m_animatedProperty || m_valueIsCopy) 75 if (!m_animatedProperty || m_valueIsCopy)
76 return 0; 76 return 0;
77 ASSERT(m_contextElement); 77 return m_contextElement.get();
78 return m_contextElement;
79 } 78 }
80 79
81 void addChild(WeakPtr<SVGPropertyTearOffBase> child) 80 void addChild(WeakPtr<SVGPropertyTearOffBase> child)
82 { 81 {
83 m_childTearOffs.append(child); 82 m_childTearOffs.append(child);
84 } 83 }
85 84
86 virtual void detachWrapper() OVERRIDE 85 virtual void detachWrapper() OVERRIDE
87 { 86 {
88 if (m_valueIsCopy) 87 if (m_valueIsCopy)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 147
149 void detachChildren() 148 void detachChildren()
150 { 149 {
151 for (Vector<WeakPtr<SVGPropertyTearOffBase> >::iterator iter = m_childTe arOffs.begin(); iter != m_childTearOffs.end(); iter++) { 150 for (Vector<WeakPtr<SVGPropertyTearOffBase> >::iterator iter = m_childTe arOffs.begin(); iter != m_childTearOffs.end(); iter++) {
152 if (iter->get()) 151 if (iter->get())
153 iter->get()->detachWrapper(); 152 iter->get()->detachWrapper();
154 } 153 }
155 m_childTearOffs.clear(); 154 m_childTearOffs.clear();
156 } 155 }
157 156
158 SVGElement* m_contextElement; 157 RefPtr<SVGElement> m_contextElement;
159 SVGAnimatedProperty* m_animatedProperty; 158 SVGAnimatedProperty* m_animatedProperty;
160 SVGPropertyRole m_role; 159 SVGPropertyRole m_role;
161 PropertyType* m_value; 160 PropertyType* m_value;
162 Vector<WeakPtr<SVGPropertyTearOffBase> > m_childTearOffs; 161 Vector<WeakPtr<SVGPropertyTearOffBase> > m_childTearOffs;
163 bool m_valueIsCopy : 1; 162 bool m_valueIsCopy : 1;
164 }; 163 };
165 164
166 } 165 }
167 166
168 #endif // SVGPropertyTearOff_h 167 #endif // SVGPropertyTearOff_h
OLDNEW
« no previous file with comments | « Source/core/svg/properties/SVGPathSegListPropertyTearOff.h ('k') | Source/core/svg/properties/SVGStaticListPropertyTearOff.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698