void SVGAnimatedPathAnimator::resetAnimValToBaseVal(const SVGElementAnimatedPropertyList& animatedTypes, SVGAnimatedType* type) { ASSERT(animatedTypes.size() >= 1); ASSERT(type); ASSERT(type->type() == m_type); const SVGPathSegList& baseValue = castAnimatedPropertyToActualType<SVGAnimatedPathSegListPropertyTearOff>(animatedTypes[0].properties[0].get())->currentBaseValue(); buildSVGPathByteStreamFromSVGPathSegList(baseValue, type->path(), UnalteredParsing); }
PassOwnPtr<SVGAnimatedType> SVGAnimatedPathAnimator::startAnimValAnimation(const SVGElementAnimatedPropertyList& animatedTypes) { ASSERT(animatedTypes.size() >= 1); SVGAnimatedPathSegListPropertyTearOff* property = castAnimatedPropertyToActualType<SVGAnimatedPathSegListPropertyTearOff>(animatedTypes[0].properties[0].get()); const SVGPathSegList& baseValue = property->currentBaseValue(); // Build initial path byte stream. OwnPtr<SVGPathByteStream> byteStream = SVGPathByteStream::create(); buildSVGPathByteStreamFromSVGPathSegList(baseValue, byteStream.get(), UnalteredParsing); Vector<RefPtr<SVGAnimatedPathSegListPropertyTearOff> > result; SVGElementAnimatedPropertyList::const_iterator end = animatedTypes.end(); for (SVGElementAnimatedPropertyList::const_iterator it = animatedTypes.begin(); it != end; ++it) result.append(castAnimatedPropertyToActualType<SVGAnimatedPathSegListPropertyTearOff>(it->properties[0].get())); SVGElementInstance::InstanceUpdateBlocker blocker(property->contextElement()); size_t resultSize = result.size(); for (size_t i = 0; i < resultSize; ++i) result[i]->animationStarted(byteStream.get(), &baseValue); return SVGAnimatedType::createPath(byteStream.release()); }