Changeset 110591 in webkit
- Timestamp:
- Mar 13, 2012 12:27:51 PM (12 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r110589 r110591 1 2012-03-13 Nikolas Zimmermann <nzimmermann@rim.com> 2 3 SVG Animations update baseVal instead of animVal 4 https://bugs.webkit.org/show_bug.cgi?id=12437 5 6 Reviewed by Dirk Schulze. 7 8 Blind fix for some GC related assertions firing on v8. 9 10 Assure that animationStarted/animationEnded calls are happening 11 on the same SVGAnimatedProperty. Always call animationEnded(), 12 even if we shouldn't do anything for the target element, as its 13 destructed, as we still have to reset m_isAnimating. 14 15 * svg/SVGAnimateElement.cpp: 16 (WebCore::SVGAnimateElement::SVGAnimateElement): 17 (WebCore::SVGAnimateElement::resetToBaseValue): 18 (WebCore::SVGAnimateElement::targetElementWillChange): 19 * svg/SVGAnimateElement.h: 20 (SVGAnimateElement): 21 * svg/properties/SVGAnimatedPropertyTearOff.h: 22 (WebCore::SVGAnimatedPropertyTearOff::animationEnded): 23 1 24 2012-03-13 Mark Pilgrim <pilgrim@chromium.org> 2 25 -
trunk/Source/WebCore/svg/SVGAnimateElement.cpp
r110545 r110591 42 42 , m_fromPropertyValueType(RegularPropertyValue) 43 43 , m_toPropertyValueType(RegularPropertyValue) 44 , m_animatedProperty(0) 44 45 { 45 46 ASSERT(hasTagName(SVGNames::animateTag) || hasTagName(SVGNames::setTag) || hasTagName(SVGNames::animateColorTag)); … … 220 221 // SVG DOM primitives, like SVGLength. 221 222 SVGAnimatedTypeAnimator* animator = ensureAnimator(); 222 if (SVGAnimatedProperty* animatedProperty = animatedPropertyForType(animator->type())) { 223 m_animatedProperty = animatedPropertyForType(animator->type()); 224 if (m_animatedProperty) { 223 225 if (!m_animatedType) { 224 m_animatedType = animator->constructFromCopy( animatedProperty->currentBaseValue(animator->type()));225 animationStarted( animatedProperty, m_animatedType.get());226 m_animatedType = animator->constructFromCopy(m_animatedProperty->currentBaseValue(animator->type())); 227 animationStarted(m_animatedProperty, m_animatedType.get()); 226 228 } else 227 m_animatedType->setVariantValue( animatedProperty->currentBaseValue(m_animator->type()));229 m_animatedType->setVariantValue(m_animatedProperty->currentBaseValue(m_animator->type())); 228 230 ASSERT(m_animatedPropertyType == animator->type()); 231 ASSERT(m_animatedPropertyType == m_animatedProperty->animatedPropertyType()); 229 232 return; 230 233 } … … 260 263 SVGSMILElement::targetElementWillChange(currentTarget, newTarget); 261 264 262 // Be sure to never execute any of this, while the target element is being removed from the document or destructed. 263 if (currentTarget && currentTarget->inDocument() && currentTarget->parentNode()) { 264 ASSERT(!currentTarget->m_deletionHasBegun); 265 if (SVGAnimatedProperty* animatedProperty = animatedPropertyForType(m_animatedPropertyType)) 266 animationEnded(animatedProperty); 265 if (m_animatedProperty) { 266 animationEnded(m_animatedProperty); 267 m_animatedProperty = 0; 267 268 } 268 269 -
trunk/Source/WebCore/svg/SVGAnimateElement.h
r110545 r110591 41 41 }; 42 42 43 class SVGAnimatedProperty; 44 43 45 class SVGAnimateElement : public SVGAnimationElement { 44 46 public: … … 80 82 OwnPtr<SVGAnimatedType> m_toType; 81 83 OwnPtr<SVGAnimatedType> m_animatedType; 82 84 85 SVGAnimatedProperty* m_animatedProperty; 83 86 OwnPtr<SVGAnimatedTypeAnimator> m_animator; 84 87 }; -
trunk/Source/WebCore/svg/properties/SVGAnimatedPropertyTearOff.h
r110545 r110591 80 80 m_isAnimating = false; 81 81 82 ASSERT(contextElement()); 83 contextElement()->svgAttributeChanged(attributeName()); 82 SVGElement* element = contextElement(); 83 if (!element || !element->inDocument() || !element->parentNode()) 84 return; 85 ASSERT(!element->m_deletionHasBegun); 86 element->svgAttributeChanged(attributeName()); 84 87 } 85 88
Note: See TracChangeset
for help on using the changeset viewer.