[Webkit-unassigned] [Bug 63553] SVG animation fill="freeze" doesn't set baseVal to current animVal if animation stops before reaching the end

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jul 1 07:51:39 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=63553





--- Comment #9 from Young Han Lee <joybro at company100.net>  2011-07-01 07:51:38 PST ---
(In reply to comment #6)
> (From update of attachment 99330 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=99330&action=review
> 
> > Source/WebCore/ChangeLog:10
> > +        When the animation stops before reaching the end, the elapsed time is bigger than
> > +        m_intervalEnd and smaller than simpleDuration. In that case, the progress of
> > +        the animation doesn't 100%, it should be the value of the stop point.
> 
> Can you go a bit more into detail? I don't understand what you try to fix. What do the timings mean? To review the patch I have to know more about what we try to do here.

I'm sorry for the undetailed comment.

I believe this phenomenon is caused by the miscalculated progress value.

The animated position of an SVGElement is updated in SMILTimeContainer::updateAnimations() in every frame. When an animation with fill=freeze option stops before reaching the end, the animated position should be updated to somewhere in the animation route, but now it is updated to the end of the animation.

The newly updated position is come from SVGSMILElement::progress(), in which the position is calculated based on the progress value returned from SVGSMILElement::calculateAnimationPercentAndRepeat().

The calculateAnimationPercentAndRepeat() returns 100% in the attached testcase, so consequently the last animated position is updated to the end of the animation. I think the calculateAnimationPercentAndRepeat() have to return the progress of the stopping point on the animation, not 100%.


> 
> > Source/WebCore/svg/animation/SVGSMILElement.cpp:829
> > +        activeTime = m_intervalEnd;
> 
> Why do you set activeTime here, we haven't done it before.

This change makes the progress value is calculated with the stopping point when the elapsed value exceeds the stopping point. Thus, the function will return the progress of the stopping point if the animation stops before the end.

But I missed something in there, the activeTime should be m_intervalEnd - m_intervalBegin. I will upload the new patch if you agree with the approach I wrote.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list