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

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

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 97
98 void animationStarted(PropertyType* newAnimVal, bool shouldOwnValues = false ) 98 void animationStarted(PropertyType* newAnimVal, bool shouldOwnValues = false )
99 { 99 {
100 ASSERT(!m_isAnimating); 100 ASSERT(!m_isAnimating);
101 ASSERT(newAnimVal); 101 ASSERT(newAnimVal);
102 ASSERT(m_values.size() == m_wrappers.size()); 102 ASSERT(m_values.size() == m_wrappers.size());
103 ASSERT(m_animatedWrappers.isEmpty()); 103 ASSERT(m_animatedWrappers.isEmpty());
104 104
105 // Switch to new passed in value type & new wrappers list. The new wrapp ers list must be created for the new value. 105 // Switch to new passed in value type & new wrappers list. The new wrapp ers list must be created for the new value.
106 if (!newAnimVal->isEmpty()) 106 if (!newAnimVal->isEmpty())
107 m_animatedWrappers.fill(0, newAnimVal->size()); 107 m_animatedWrappers.fill(nullptr, newAnimVal->size());
108 108
109 ListProperty* animVal = static_cast<ListProperty*>(this->animVal()); 109 ListProperty* animVal = static_cast<ListProperty*>(this->animVal());
110 animVal->setValuesAndWrappers(newAnimVal, &m_animatedWrappers, shouldOwn Values); 110 animVal->setValuesAndWrappers(newAnimVal, &m_animatedWrappers, shouldOwn Values);
111 ASSERT(animVal->values().size() == animVal->wrappers().size()); 111 ASSERT(animVal->values().size() == animVal->wrappers().size());
112 ASSERT(animVal->wrappers().size() == m_animatedWrappers.size()); 112 ASSERT(animVal->wrappers().size() == m_animatedWrappers.size());
113 m_isAnimating = true; 113 m_isAnimating = true;
114 } 114 }
115 115
116 void animationEnded() 116 void animationEnded()
117 { 117 {
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 ASSERT(contextElement); 167 ASSERT(contextElement);
168 return adoptRef(new SVGAnimatedListPropertyTearOff<PropertyType>(context Element, attributeName, animatedPropertyType, values)); 168 return adoptRef(new SVGAnimatedListPropertyTearOff<PropertyType>(context Element, attributeName, animatedPropertyType, values));
169 } 169 }
170 170
171 protected: 171 protected:
172 SVGAnimatedListPropertyTearOff(SVGElement* contextElement, const QualifiedNa me& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& valu es) 172 SVGAnimatedListPropertyTearOff(SVGElement* contextElement, const QualifiedNa me& attributeName, AnimatedPropertyType animatedPropertyType, PropertyType& valu es)
173 : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyTyp e) 173 : SVGAnimatedProperty(contextElement, attributeName, animatedPropertyTyp e)
174 , m_values(values) 174 , m_values(values)
175 { 175 {
176 if (!values.isEmpty()) 176 if (!values.isEmpty())
177 m_wrappers.fill(0, values.size()); 177 m_wrappers.fill(nullptr, values.size());
178 } 178 }
179 179
180 PropertyType& m_values; 180 PropertyType& m_values;
181 181
182 ListWrapperCache m_wrappers; 182 ListWrapperCache m_wrappers;
183 ListWrapperCache m_animatedWrappers; 183 ListWrapperCache m_animatedWrappers;
184 184
185 RefPtr<SVGProperty> m_baseVal; 185 RefPtr<SVGProperty> m_baseVal;
186 RefPtr<SVGProperty> m_animVal; 186 RefPtr<SVGProperty> m_animVal;
187 }; 187 };
188 188
189 } 189 }
190 190
191 #endif // SVGAnimatedListPropertyTearOff_h 191 #endif // SVGAnimatedListPropertyTearOff_h
OLDNEW
« no previous file with comments | « Source/core/svg/properties/NewSVGListPropertyTearOffHelper.h ('k') | Source/core/svg/properties/SVGListProperty.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698