[Webkit-unassigned] [Bug 34301] New: Creating <animateMotion> elements via javascript do not execute

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Jan 28 20:03:07 PST 2010


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

           Summary: Creating <animateMotion> elements via javascript do
                    not execute
           Product: WebKit
           Version: 420+
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: SVG
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: dj.am.juicebox at gmail.com


Adding <animateMotion> elements via javascript fail to execute. This may be
related to this bug 17043 "SVG missing some .idl files":

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

The following example should animate a rectangle moving from left to right when
the page loads. It does nothing. The same page works ok in opera. The same
animation definition in the body of the document executes ok:

<html>
  <head>
    <script>

        window.onload = function() {
            var svg = document.createElementNS('http://www.w3.org/2000/svg',
'svg');
            svg.setAttribute('xmlns:xlink', 'http://www.w3.org/1999/xlink');
            svg.setAttribute('version', '1.1');
            svg.setAttribute('width', '800px');
            svg.setAttribute('height', '400px');
            document.body.appendChild(svg);

            var rect = document.createElementNS('http://www.w3.org/2000/svg',
'rect');
            rect.setAttribute("id", "myrect"); 
            rect.setAttribute("fill","red");
            rect.setAttribute("stroke","black");
            rect.setAttribute("stroke-width","5");
            rect.setAttribute("x", "100");
            rect.setAttribute("y", "100");
            rect.setAttribute("width", "100");
            rect.setAttribute("height", "50");
            svg.appendChild(rect);

            var anim =
document.createElementNS('http://www.w3.org/2000/svg','animate');
            anim.setAttribute("attributeName", "width");
            anim.setAttribute("from", "100");
            anim.setAttribute("to", "400");
            anim.setAttribute("dur", "10s");
            anim.setAttribute("begin", "0s");
            anim.setAttribute("fill", "freeze");
            rect.appendChild(anim);

            anim.beginElement();
        }

    </script>
  </head>

  <body>
  </body>

</html>

-- 
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