SMIL Animation patch

Archive SMIL

G’day! I’ve produced a new patch to provide SMIL Animation for SVG. Since last time I’ve added:

  • keySplines
  • keyTimes
  • accumulate
  • restart
  • min, max
  • ElementTimeControl DOM interface

I’ve added a status page showing just what’s been implemented and I’ve also updated the test cases.

This represents all the features I intend to implement this year although I may attempt a draft implementation of <animateTransform> for demonstration purposes. The next obvious thing to implement is syncbase timing although none of this will be of much use until we determine how to represent animated values in SVG and CSS!

For now I’ll be working on a report of my attempts and documenting some difficulties I’ve come across with SMIL.

Here are the patches:

I’ve (hopefully) fixed the paths in the patch so you should be able to apply it from mozilla with:

$ patch -p0 smil-anim-2005-11-05-1539.patch

Known issues:

  • An SVG image referenced via <object> will remain paused when returning to the page using the back button if the page is in the bfcache. This is because page transition events are not received. If anyone can help me with this I’d really appreciate it!
  • An SVG document added entirely via script won’t be animated. (See this test case.)

Comments

gandalf

There’s a bug in your latest patch:

../../../../dist/include/content/nsISMILAnimVal.h:53:52: macro "NS_DEFINE_STATIC
_IID_ACCESSOR" requires 2 arguments, but only 1 given
In file included from /server/cvs/mozilla/mozilla/content/svg/content/src/nsSVGA
nimatedLength.cpp:45:
../../../../dist/include/content/nsISMILAnimVal.h:66: error: ISO C++ forbids dec
laration of `NS_DEFINE_STATIC_IID_ACCESSOR' with no type
Brian

Hi gandalf,

Looks like this is bustage from bug 313309. See:

http://bonsai.mozilla.org/cvsview2.cgi?diff_mode=context&whitespace_mode=show&file=nsID.h&branch=&root=/cvsroot&subdir=mozilla/xpcom/glue&command=DIFF_FRAMESET&rev1=1.16&rev2=1.17

I’ll do an update and fix it in the next few days. I’ve also made a few other fixes to ‘by animation’ and the animation timer so I’ll put up a new patch with those included too.

Sorry for the delay, I’m currently quite busy writing a report about this project.

Thanks again for trying out the patch.

IFlo

I just want to say: “thank you”
(for implementing the SVG animate module)

Brian

Thanks IFlo for your encouraging comment. I’m taking a bit of a break now but I hope to make a few updates in the coming weeks.

Leave a reply

Most markdown like **bold** and _italic_ is supported.

Never shown. Only used for looking up your gravatar.

Optional
https://