Re: SVGAnimationElement.getStartTime

Hi Brian.

Cameron McCormack:
> >  http://dev.w3.org/SVG/profiles/1.1F2/test/svg/animate-dom-01-f.svg

Brian Birtles:
> Thank you very much for following this up. Just to confirm however, I
> believe Olaf's original message said that the start time was not
> resolved until the syncbase had begun, i.e. in the test,

I misread Olaf’s mail slightly.  I contend that in his first example,

  <animate id="a" begin="5s"… />
  <animate id="b" begin="a.begin+2s"… />

at document time 0s, a and b both have a single, resolved begin instance
time: a has 5s, and b has 7s.  Thus at document time 0s, both a and b
have a current interval.  In his second example,

  <animate id="a" begin="click"… />
  <animate id="b" begin="a.begin+2s"… />

at document time 0s, a and b both have empty begin instance time lists
and there is no current interval for either element.  Once the eventbase
is clicked, an instance time corresponding to the current document time
is added to a’s begin instance time list, and an instance time
corresponding to the current document time plus two seconds is added to
b’s begin instance time list.  Then, the instance time lists are
re-evaluated, resulting in intervals being created for both elements.

And thus for the subtest I added to animate-dom-01-f.svg:

>   for document time=0s, a6.getStartTime() throws INVALID_STATE_ERR exception
>   for document time=6s, a6.getStartTime() returns 7

both of these calls would return 7.

Before the interval begins, a different time might be returned, since
the begin instance time lists can change.  For example, if
a6dep.beginElement() were called at document time 2s, then immediately
after that a6.getStartTime() would return 4.  SMIL explains this as the
current interval having had its begin time changed.

> (This is how syncbase timing is normally implemented, and parts of
> SMIL Animation seem to suggest this approach)
> 
> However, I was querying whether the section in SMIL Animation 3.6.3
> that I quoted implied that even at document time=0s, a6.getStartTime()
> returns 7.

Yes, looking at the quoted sentence I believe that supports my
explanation above (that at time 0s, a6.getStartTime() returns 7).

> I just want to confirm that you have discussed this and Olaf agrees
> with the behaviour of the test case which is that even at document
> time=0.5s, a6.getStartTime() returns 7 (as far as I can see).

I don’t know if Olaf agrees, but I’d welcome his opinion here.  (The
test is still unreviewed at this point, so isn’t official.)

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Monday, 9 February 2009 06:09:28 UTC