Probably a duplicate of bug 265895
From dholbert in bug 623677... I'm actually not sure that Firefox's behavior is wrong on this. Basically, it sounds like you're saying the following: If an element is cloned via <use>, then DOM API calls (".beginElement()" in this case) on the original element should be repeated on all cloned copies of that element. However, from a quick glance over the spec, I don't see any support for that position. The relevant chunk of spec is: http://www.w3.org/TR/SVG11/struct.html#UseElement There is a paragraph or so about event propagation in the two subtrees (clone & original), but I don't think that applies here, because there aren't really any events involved here. (I could easily be missing / misreading something, though. :))
Created attachment 502281 [details] Extended testcase I still feel that current behavior is not consistent, so probably not correct. FFX fires animation twice while other SVG implementations thrice. First is triggered by scripting, which does not work and has been commented by Daniel. Second is triggered by offset value and works even in cloned element. Third is triggered by another animation and works in cascade in cloned element as well. So the scripting API is the only one which behaves differently.
Created attachment 502333 [details] Even more extended test case One more extended testcase, adding cases for testing also: - accessKey values (o, a) - user event values (mouseover over upper square) - repeat event value (second repeat of upper square fill animation) All of them work, so really trigger via JS API is the only case behaving differently... so I would really vote for aligning the behavior of them...
(In reply to comment #6) > - user event values [...] > All of them work, so really trigger via JS API is the only case behaving > differently (Actually -- see bug 619509 for one instance where event-based animations in <use>-cloned content don't actually quite work how they're supposed to yet. I'm pretty sure that one's a bug, whereas I'm still not sure this one is per comment 4 (though we may end up deciding to act on this anyway for interop purposes)).
(In reply to Robert Longson from comment #4) > However, from a quick glance over the spec, I don't see any support for that > position. > > The relevant chunk of spec is: > http://www.w3.org/TR/SVG11/struct.html#UseElement > I had the opposite impression after reading the documentation, particularly the line where it says: "Animations on a referenced element will cause the instances to also be animated." I believe this means that anything regarding the animations should work synchronously on all instances of the original element. Voting for the bug.
(In reply to Leonid from comment #8) > I had the opposite impression after reading the documentation, particularly > the line where it says: > "Animations on a referenced element will cause the instances to also be > animated." > That'a bug 619509 rather than this one.
(In reply to Robert Longson from comment #9) > That'a bug 619509 rather than this one. Not really. The mentioned bug states that animation triggers should flow from any instance to all others (which would be nice btw), and this bug as well as the line from the documentation i have mentioned state that when you programmatically trigger animation on an original (referenced) element then the animations should also trigger on all instances of the original.