Bug 93972 - beginElement() does not observe updated animation attributes
Summary: beginElement() does not observe updated animation attributes
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Florin Malita
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-14 08:53 PDT by Florin Malita
Modified: 2012-08-14 14:34 PDT (History)
3 users (show)

See Also:


Attachments
Circle should move left-to-right, then right-to-left (558 bytes, image/svg+xml)
2012-08-14 08:53 PDT, Florin Malita
no flags Details
Patch (6.09 KB, patch)
2012-08-14 12:43 PDT, Florin Malita
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.