W3C home > Mailing lists > Public > www-svg@w3.org > January 2009

Re: Behaviour of animation DOM methods before document begin

From: Erik Dahlström <ed@opera.com>
Date: Thu, 15 Jan 2009 11:14:07 +0100
To: "Brian Birtles" <birtles@gmail.com>, www-svg@w3.org
Message-ID: <op.unsmptxbgqiacl@gnorps.linkoping.osa>

On Thu, 15 Jan 2009 04:45:24 +0100, Brian Birtles <birtles@gmail.com> wrote:

> Dear all,
>
> I am glad to see that the behaviour of getCurrentTime()/setCurrentTime()
> before document timeline begin has been addressed in an erratum to SVG
> 1.1.[1]
>
> However, there are several other DOM methods that require similar attention.
> In particular the following two:
>
>   SVGSVGElement.animationsPaused()
>   SVGAnimationElement.BeginElementAt()
>
> For SVGSVGElement.animationsPaused() can we assume that although animations
> are not playing prior to the document timeline begin, they should not be
> considered to be paused unless pauseAnimations() is called?
>
> SVG 1.1 says:
>
>   Returns true if this SVG document fragment is in a paused state.[2]
>
> Can we understand "a paused state" as being narrowly defined as "a paused
> state brought about by calling pauseAnimations()"? Or does it include the
> apparent paused state of an SVG document fragment because the document
> timeline has not yet begun?

Since animations will play as soon as the document timeline starts it would seem a bit strange to return that the timeline is paused for this case.

> For SVGAnimationElement.BeginElementAt() what should be the behaviour if
> this is called prior to the document timeline begin since this is defined in
> terms of presentation time?[3] Shall we use the value of GetCurrentTime
> (which will be zero) and add an instance time with an offset from that? Or
> should the method fail?

That's an interesting question. The spec says for 'beginElement':

"The effective begin time is the current presentation time at the time of the DOM method call."

and for 'beginElementAt':

"Calling beginElementAt(seconds) has the same behavior as beginElement(), except that the effective begin time is offset from the current presentation time by an amount specified as a parameter."

And 'presentation time' is defined:

"For SVG, the term presentation time indicates the position in the timeline relative to the document begin of a given document fragment."

The "current presentation time" would be negative before the document timeline has started, how negative we don't know until the timeline starts. Another reading would be that it's undefined.

The question can be reformulated:
If one calls 'beginElement' on some animation element before the document timeline has started, will the animation run once the timeline starts?

Cheers
/Erik

-- 
Erik Dahlstrom, Core Technology Developer, Opera Software
Co-Chair, W3C SVG Working Group
Personal blog: http://my.opera.com/macdev_ed
Received on Thursday, 15 January 2009 10:14:51 GMT

This archive was generated by hypermail 2.3.1 : Friday, 8 March 2013 15:54:41 GMT