void SMILTimeContainer::schedule(SVGSMILElement* animation, SVGElement* target, const QualifiedName& attributeName) { ASSERT(animation->timeContainer() == this); ASSERT(target); ASSERT(animation->hasValidAttributeName()); #ifndef NDEBUG ASSERT(!m_preventScheduledAnimationsChanges); #endif ElementAttributePair key(target, attributeName); std::unique_ptr<AnimationsVector>& scheduled = m_scheduledAnimations.add(key, nullptr).iterator->value; if (!scheduled) scheduled = std::make_unique<AnimationsVector>(); ASSERT(!scheduled->contains(animation)); scheduled->append(animation); SMILTime nextFireTime = animation->nextProgressTime(); if (nextFireTime.isFinite()) notifyIntervalsChanged(); }
void SMILTimeContainer::schedule(SVGSMILElement* animation, SVGElement* target, const QualifiedName& attributeName) { ASSERT(animation->timeContainer() == this); ASSERT(target); ASSERT(animation->hasValidAttributeName()); #if ENABLE(ASSERT) ASSERT(!m_preventScheduledAnimationsChanges); #endif ElementAttributePair key(target, attributeName); OwnPtrWillBeMember<AnimationsLinkedHashSet>& scheduled = m_scheduledAnimations.add(key, nullptr).storedValue->value; if (!scheduled) scheduled = adoptPtrWillBeNoop(new AnimationsLinkedHashSet); ASSERT(!scheduled->contains(animation)); scheduled->add(animation); SMILTime nextFireTime = animation->nextProgressTime(); if (nextFireTime.isFinite()) notifyIntervalsChanged(); }
void SMILTimeContainer::schedule(SVGSMILElement* animation, SVGElement* target, const QualifiedName& attributeName) { ASSERT(animation->timeContainer() == this); ASSERT(target); ASSERT(animation->hasValidAttributeName()); #ifndef NDEBUG ASSERT(!m_preventScheduledAnimationsChanges); #endif ElementAttributePair key(target, attributeName); AnimationsVector* scheduled = m_scheduledAnimations.get(key); if (!scheduled) { scheduled = new AnimationsVector(); m_scheduledAnimations.set(key, scheduled); } ASSERT(!scheduled->contains(animation)); scheduled->append(animation); SMILTime nextFireTime = animation->nextProgressTime(); if (nextFireTime.isFinite()) notifyIntervalsChanged(); }