void SVGSMILElement::svgAttributeChanged(const QualifiedName& attrName) { if (attrName == SVGNames::durAttr) { m_cachedDur = invalidCachedTime; } else if (attrName == SVGNames::repeatDurAttr) { m_cachedRepeatDur = invalidCachedTime; } else if (attrName == SVGNames::repeatCountAttr) { m_cachedRepeatCount = invalidCachedTime; } else if (attrName == SVGNames::minAttr) { m_cachedMin = invalidCachedTime; } else if (attrName == SVGNames::maxAttr) { m_cachedMax = invalidCachedTime; } else if (attrName == SVGNames::attributeNameAttr) { setAttributeName(constructQualifiedName(this, fastGetAttribute(SVGNames::attributeNameAttr))); } else if (attrName.matches(SVGNames::hrefAttr) || attrName.matches(XLinkNames::hrefAttr)) { // TODO(fs): Could be smarter here when 'href' is specified and 'xlink:href' is changed. SVGElement::InvalidationGuard invalidationGuard(this); buildPendingResource(); if (m_targetElement) clearAnimatedType(); } else if (attrName == SVGNames::beginAttr || attrName == SVGNames::endAttr) { if (inDocument()) { connectEventBaseConditions(); if (attrName == SVGNames::beginAttr) beginListChanged(elapsed()); else if (attrName == SVGNames::endAttr) endListChanged(elapsed()); } } else { SVGElement::svgAttributeChanged(attrName); return; } animationAttributeChanged(); }
void SVGSMILElement::setAttributeName(const QualifiedName& attributeName) { unscheduleIfScheduled(); if (m_targetElement) clearAnimatedType(); m_attributeName = attributeName; schedule(); }
SVGAnimateElement::~SVGAnimateElement() { #if !ENABLE(OILPAN) if (targetElement()) clearAnimatedType(targetElement()); #endif }
void SVGSMILElement::reset() { clearAnimatedType(); m_activeState = Inactive; m_isWaitingForFirstInterval = true; m_interval.begin = SMILTime::unresolved(); m_interval.end = SMILTime::unresolved(); m_previousIntervalBegin = SMILTime::unresolved(); m_lastPercent = 0; m_lastRepeat = 0; m_nextProgressTime = 0; resolveFirstInterval(); }
void SVGSMILElement::setTargetElement(SVGElement* target) { unscheduleIfScheduled(); if (m_targetElement) { // Clear values that may depend on the previous target. clearAnimatedType(); disconnectSyncBaseConditions(); } // If the animation state is not Inactive, always reset to a clear state before leaving the old target element. if (m_activeState != Inactive) endedActiveInterval(); m_targetElement = target; schedule(); }
void SVGAnimationElement::checkInvalidCSSAttributeType() { bool hasInvalidCSSAttributeType = targetElement() && hasValidAttributeName() && attributeType() == AttributeTypeCSS && !isTargetAttributeCSSProperty(targetElement(), attributeName()); if (hasInvalidCSSAttributeType != m_hasInvalidCSSAttributeType) { if (hasInvalidCSSAttributeType) unscheduleIfScheduled(); m_hasInvalidCSSAttributeType = hasInvalidCSSAttributeType; if (!hasInvalidCSSAttributeType) schedule(); } // Clear values that may depend on the previous target. if (targetElement()) clearAnimatedType(); }
SVGAnimateElement::~SVGAnimateElement() { if (targetElement()) clearAnimatedType(targetElement()); }