OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2008 Apple Inc. All rights reserved. | 4 * Copyright (C) 2008 Apple Inc. All rights reserved. |
5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. | 5 * Copyright (C) Research In Motion Limited 2011. All rights reserved. |
6 * | 6 * |
7 * This library is free software; you can redistribute it and/or | 7 * This library is free software; you can redistribute it and/or |
8 * modify it under the terms of the GNU Library General Public | 8 * modify it under the terms of the GNU Library General Public |
9 * License as published by the Free Software Foundation; either | 9 * License as published by the Free Software Foundation; either |
10 * version 2 of the License, or (at your option) any later version. | 10 * version 2 of the License, or (at your option) any later version. |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 { | 224 { |
225 ASSERT(targetElement); | 225 ASSERT(targetElement); |
226 if (attributeName == anyQName() || !targetElement->isConnected() || !targetE
lement->parentNode()) | 226 if (attributeName == anyQName() || !targetElement->isConnected() || !targetE
lement->parentNode()) |
227 return; | 227 return; |
228 | 228 |
229 CSSPropertyID id = cssPropertyID(attributeName.localName()); | 229 CSSPropertyID id = cssPropertyID(attributeName.localName()); |
230 targetElement->ensureAnimatedSMILStyleProperties()->removeProperty(id); | 230 targetElement->ensureAnimatedSMILStyleProperties()->removeProperty(id); |
231 targetElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTra
cing::create(StyleChangeReason::Animation)); | 231 targetElement->setNeedsStyleRecalc(LocalStyleChange, StyleChangeReasonForTra
cing::create(StyleChangeReason::Animation)); |
232 } | 232 } |
233 | 233 |
234 static inline void notifyTargetAboutAnimValChange(SVGElement* targetElement, con
st QualifiedName& attributeName) | |
235 { | |
236 targetElement->invalidateSVGAttributes(); | |
237 targetElement->svgAttributeChanged(attributeName); | |
238 } | |
239 | |
240 static inline void notifyTargetAndInstancesAboutAnimValChange(SVGElement* target
Element, const QualifiedName& attributeName) | 234 static inline void notifyTargetAndInstancesAboutAnimValChange(SVGElement* target
Element, const QualifiedName& attributeName) |
241 { | 235 { |
242 ASSERT(targetElement); | 236 ASSERT(targetElement); |
243 if (attributeName == anyQName() || !targetElement->isConnected() || !targetE
lement->parentNode()) | 237 if (attributeName == anyQName() || !targetElement->isConnected() || !targetE
lement->parentNode()) |
244 return; | 238 return; |
245 | 239 |
246 SVGElement::InstanceUpdateBlocker blocker(targetElement); | 240 targetElement->invalidateAnimatedAttribute(attributeName); |
247 notifyTargetAboutAnimValChange(targetElement, attributeName); | |
248 | |
249 // If the target element has instances, update them as well, w/o requiring t
he <use> tree to be rebuilt. | |
250 for (SVGElement* element : targetElement->instancesForElement()) | |
251 notifyTargetAboutAnimValChange(element, attributeName); | |
252 } | 241 } |
253 | 242 |
254 void SVGAnimateElement::clearAnimatedType() | 243 void SVGAnimateElement::clearAnimatedType() |
255 { | 244 { |
256 if (!m_animatedProperty) | 245 if (!m_animatedProperty) |
257 return; | 246 return; |
258 | 247 |
259 // The animated property lock is held for the "result animation" (see SMILTi
meContainer::updateAnimations()) | 248 // The animated property lock is held for the "result animation" (see SMILTi
meContainer::updateAnimations()) |
260 // while we're processing an animation group. We will very likely crash late
r if we clear the animated type | 249 // while we're processing an animation group. We will very likely crash late
r if we clear the animated type |
261 // while the lock is held. See crbug.com/581546. | 250 // while the lock is held. See crbug.com/581546. |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 { | 363 { |
375 visitor->trace(m_fromProperty); | 364 visitor->trace(m_fromProperty); |
376 visitor->trace(m_toProperty); | 365 visitor->trace(m_toProperty); |
377 visitor->trace(m_toAtEndOfDurationProperty); | 366 visitor->trace(m_toAtEndOfDurationProperty); |
378 visitor->trace(m_animatedProperty); | 367 visitor->trace(m_animatedProperty); |
379 visitor->trace(m_animator); | 368 visitor->trace(m_animator); |
380 SVGAnimationElement::trace(visitor); | 369 SVGAnimationElement::trace(visitor); |
381 } | 370 } |
382 | 371 |
383 } // namespace blink | 372 } // namespace blink |
OLD | NEW |