OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2011-2012. All rights reserved. |
3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. | 3 * Copyright (C) 2013 Samsung Electronics. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 to->add(from.get(), m_contextElement); | 162 to->add(from.get(), m_contextElement); |
163 } | 163 } |
164 | 164 |
165 namespace { | 165 namespace { |
166 | 166 |
167 void setAnimatedValueOnAllTargetProperties(const SVGElementInstances& list, cons
t QualifiedName& attributeName, PassRefPtrWillBeRawPtr<SVGPropertyBase> passValu
e) | 167 void setAnimatedValueOnAllTargetProperties(const SVGElementInstances& list, cons
t QualifiedName& attributeName, PassRefPtrWillBeRawPtr<SVGPropertyBase> passValu
e) |
168 { | 168 { |
169 RefPtrWillBeRawPtr<SVGPropertyBase> value = passValue; | 169 RefPtrWillBeRawPtr<SVGPropertyBase> value = passValue; |
170 | 170 |
171 for (SVGElement* elementInstance : list) { | 171 for (SVGElement* elementInstance : list) { |
172 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> animatedProperty = elementIn
stance->propertyFromAttribute(attributeName); | 172 if (SVGAnimatedPropertyBase* animatedProperty = elementInstance->propert
yFromAttribute(attributeName)) |
173 if (animatedProperty) | |
174 animatedProperty->setAnimatedValue(value); | 173 animatedProperty->setAnimatedValue(value); |
175 } | 174 } |
176 } | 175 } |
177 | 176 |
178 } | 177 } |
179 | 178 |
180 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGAnimatedTypeAnimator::resetAnimation(
const SVGElementInstances& list) | 179 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGAnimatedTypeAnimator::resetAnimation(
const SVGElementInstances& list) |
181 { | 180 { |
182 ASSERT(isAnimatingSVGDom()); | 181 ASSERT(isAnimatingSVGDom()); |
183 RefPtrWillBeRawPtr<SVGPropertyBase> animatedValue = m_animatedProperty->crea
teAnimatedValue(); | 182 RefPtrWillBeRawPtr<SVGPropertyBase> animatedValue = m_animatedProperty->crea
teAnimatedValue(); |
(...skipping 13 matching lines...) Expand all Loading... |
197 | 196 |
198 void SVGAnimatedTypeAnimator::stopAnimValAnimation(const SVGElementInstances& li
st) | 197 void SVGAnimatedTypeAnimator::stopAnimValAnimation(const SVGElementInstances& li
st) |
199 { | 198 { |
200 if (!isAnimatingSVGDom()) | 199 if (!isAnimatingSVGDom()) |
201 return; | 200 return; |
202 | 201 |
203 ASSERT(m_contextElement); | 202 ASSERT(m_contextElement); |
204 SVGElement::InstanceUpdateBlocker blocker(m_contextElement); | 203 SVGElement::InstanceUpdateBlocker blocker(m_contextElement); |
205 | 204 |
206 for (SVGElement* elementInstance : list) { | 205 for (SVGElement* elementInstance : list) { |
207 RefPtrWillBeRawPtr<SVGAnimatedPropertyBase> animatedProperty = elementIn
stance->propertyFromAttribute(m_animatedProperty->attributeName()); | 206 if (SVGAnimatedPropertyBase* animatedProperty = elementInstance->propert
yFromAttribute(m_animatedProperty->attributeName())) |
208 if (animatedProperty) | |
209 animatedProperty->animationEnded(); | 207 animatedProperty->animationEnded(); |
210 } | 208 } |
211 } | 209 } |
212 | 210 |
213 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGAnimatedTypeAnimator::resetAnimValToB
aseVal(const SVGElementInstances& list) | 211 PassRefPtrWillBeRawPtr<SVGPropertyBase> SVGAnimatedTypeAnimator::resetAnimValToB
aseVal(const SVGElementInstances& list) |
214 { | 212 { |
215 SVGElement::InstanceUpdateBlocker blocker(m_contextElement); | 213 SVGElement::InstanceUpdateBlocker blocker(m_contextElement); |
216 | 214 |
217 return resetAnimation(list); | 215 return resetAnimation(list); |
218 } | 216 } |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 } | 259 } |
262 | 260 |
263 DEFINE_TRACE(SVGAnimatedTypeAnimator) | 261 DEFINE_TRACE(SVGAnimatedTypeAnimator) |
264 { | 262 { |
265 visitor->trace(m_animationElement); | 263 visitor->trace(m_animationElement); |
266 visitor->trace(m_contextElement); | 264 visitor->trace(m_contextElement); |
267 visitor->trace(m_animatedProperty); | 265 visitor->trace(m_animatedProperty); |
268 } | 266 } |
269 | 267 |
270 } | 268 } |
OLD | NEW |