Bug 93972

Summary: beginElement() does not observe updated animation attributes
Product: WebKit Reporter: Florin Malita <fmalita>
Component: SVGAssignee: Florin Malita <fmalita>
Status: RESOLVED FIXED    
Severity: Normal CC: krit, webkit.review.bot, zimmermann
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Circle should move left-to-right, then right-to-left
none
Patch none

Description Florin Malita 2012-08-14 08:53:13 PDT
Created attachment 158343 [details]
Circle should move left-to-right, then right-to-left

If an expired animation's attributes are updated programmatically and then the animation is restarted using beginElement(), the new values are ignored.

In the attached test, the green circle should animate left-to-right, then right-to-left. Instead, it animates left-to-right twice.

A workaround is to update the 'dur' attribute.

Chromium issue: http://code.google.com/p/chromium/issues/detail?id=141793
Comment 1 Florin Malita 2012-08-14 12:34:51 PDT
The 'from', 'to' & 'by' attributes are not claimed (isSupportedAttribute) by any of the SVGSMILElement descendants, hence updates are ignored.

Patch coming soon.
Comment 2 Florin Malita 2012-08-14 12:43:52 PDT
Created attachment 158394 [details]
Patch
Comment 3 Dirk Schulze 2012-08-14 13:33:16 PDT
Comment on attachment 158394 [details]
Patch

I don't think that this approach is correct. You make these attributes animatable, but they aren't from the spec. point of view.
Comment 4 Florin Malita 2012-08-14 13:45:07 PDT
(In reply to comment #3)
> (From update of attachment 158394 [details])
> I don't think that this approach is correct. You make these attributes animatable, but they aren't from the spec. point of view.

Hm, not sure I understand: why are you saying the patch makes these animatable? AFAICT, isSupportedAttribute() == true doesn't mean the attribute is animatable - am I missing something?

Looking at both SVG & SMIL specs, from/to/by appear to be defined at the same level as begin/end/dur/... - which are currently listed in SVGSMILElement::isSupportedAttribute().
Comment 5 Dirk Schulze 2012-08-14 13:51:32 PDT
Comment on attachment 158394 [details]
Patch

Sorry, my fault. Mixed it up with something different :(.
Comment 6 WebKit Review Bot 2012-08-14 14:34:12 PDT
Comment on attachment 158394 [details]
Patch

Clearing flags on attachment: 158394

Committed r125608: <http://trac.webkit.org/changeset/125608>
Comment 7 WebKit Review Bot 2012-08-14 14:34:16 PDT
All reviewed patches have been landed.  Closing bug.