[webkit-help] Fwd: Recording CSS3 animations on the server-side

Simon Fraser simon.fraser at apple.com
Thu May 19 08:10:31 PDT 2011


On May 18, 2011, at 11:36 PM, Mikko Ohtamaa wrote:

> We hope to run a headless WebKit on a server which would record CSS3 animations.
> 
> We have planned that the process would consist of two parts
> 
> 1) Controlling animation timer (and generally, Javascript timer too if possible)
> 
> 2) Taking a screenshot for every "tick"
> 
> For 2) there exists already plenty of solutions, like this one
> http://www.alexezell.com/code/webkit2png.txt Also, the question of
> processing individual frames to video is easy and already solved many
> times before.
> 
> But for 1) I'd hope to know whether this is possible with the existing
> WebKit APIs. We are namely looking for controlling CSS3 animations -
> we can already control <canvas> animation, but now we are looking for
> more generic solution.  If it cannot be done with the existing APIs
> (which I suspect) we can also do a custom WebKit built with our
> patches.
> 
> Also if you have any other hints for what we should be aware of I'd be
> grateful for those.

There are many different things inside WebKit that can cause the
visible rendering to change that are not related to JS timers; we have
timers for CSS animation, SVG animation, layout, painting and lots of
others.

What you really need to know is when content was painted. That's
available via the instrumentation points that the Inspector uses,
and it should be knowable through whatever platform classes you use
at the ScrollView/FrameView level.

Simon



More information about the webkit-help mailing list