Bug 20028

Summary: Dynamically created <animate> elements do not animate upon document insertion as they should
Product: WebKit Reporter: lars.sonchocky-helldorf
Component: SVGAssignee: Rob Buis <rwlbuis>
Status: RESOLVED FIXED    
Severity: Normal CC: bradneuberg, rwlbuis
Priority: P2 Keywords: HasReduction, InRadar
Version: 528+ (Nightly build)   
Hardware: Macintosh   
OS: OS X 10.4   
URL: http://www.kevlindev.com/tutorials/basics/animation/js_dom_smil/index.htm
Attachments:
Description Flags
Patch krit: review+

Description lars.sonchocky-helldorf 2008-07-13 15:35:39 PDT
http://www.kevlindev.com/tutorials/basics/animation/js_dom_smil/index.htm does not work: The green rects are drawn but they don't move.
Comment 1 Mark Rowe (bdash) 2008-07-14 12:49:58 PDT
<rdar://problem/6073950>
Comment 2 Brad Neuberg 2009-08-05 12:11:01 PDT
I confirm that I'm encountering this bug as well with dynamically created SMIL animate elements:

rect = document.createElementNS(svgns, 'rect');
rect.setAttribute('x', 50);
rect.setAttribute('y', 50);
rect.setAttribute('width', 50);
rect.setAttribute('height', 50);
rect.setAttribute('fill', '#0f5');
rect.setAttribute('stroke', '#085');
rect.setAttribute('stroke-width', '4');
anim = document.createElementNS(svgns, 'animate');
anim.setAttribute('attributeName', 'x');
anim.setAttribute('calcMode', 'linear');
anim.setAttribute('additive', 'replace');
anim.setAttribute('accumulate', 'none');
anim.setAttribute('from', 50);
anim.setAttribute('to', 100);
anim.setAttribute('begin', '2s; 5s');
anim.setAttribute('dur', '2s');
anim.setAttribute('fill', 'remove');
rect.appendChild(anim);
svg.appendChild(rect);
Comment 3 Rob Buis 2011-05-26 08:36:32 PDT
Created attachment 94978 [details]
Patch
Comment 4 Dirk Schulze 2011-05-26 09:02:12 PDT
Comment on attachment 94978 [details]
Patch

r=me
Comment 5 Rob Buis 2011-05-26 09:13:29 PDT
Committed r87392: <http://trac.webkit.org/changeset/87392>