On Sat, Nov 7, 2009 at 12:16 AM, Simon Pieters <span dir="ltr"><<a href="mailto:simonp@opera.com">simonp@opera.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Fri, 06 Nov 2009 11:05:03 +0100, Robert O'Callahan <<a href="mailto:robert@ocallahan.org" target="_blank">robert@ocallahan.org</a>> wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On Fri, Nov 6, 2009 at 10:44 PM, Philip Jägenstedt <<a href="mailto:philipj@opera.com" target="_blank">philipj@opera.com</a>>wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
We've considered firing it for each frame, but there is one problem. If<br>
people expect that it fires once per frame they will probably write scripts<br>
which do frame-based animations by moving things n pixels per frame or<br>
similar. Some animations are just easier to do this way, so there's no<br>
reason to think that people won't do it. This will break horribly if a<br>
browser is ever forced to drop a frame, which is going to happen on slower<br>
machines. In balance this may or may not be a risk worth taking.<br>
<br>
</blockquote>
<br>
That's possible, but we haven't noticed authors doing that yet.<br>
</blockquote>
<br>
</div><a href="http://people.mozilla.com/%7Eprouget/demos/round/index.xhtml" target="_blank">http://people.mozilla.com/~prouget/demos/round/index.xhtml</a><font color="#888888"></font><br></blockquote></div><br clear="all">
Aha, good catch.<br><br>But I agree with Brian. These people are just as likely to use setTimeout(0), and that's broken too. Users of scripted animation APIs who advance their animations by a fixed amount per callback are guaranteed to lose no matter what period the callback nominally has. The only thing we could do is require callback intervals to be highly random so authors notice jerkiness and fix their code :-).<br>
<br>Rob<br>-- <br>"He was pierced for our transgressions, he was crushed for our iniquities; the punishment that brought us peace was upon him, and by his wounds we are healed. We all, like sheep, have gone astray, each of us has turned to his own way; and the LORD has laid on him the iniquity of us all." [Isaiah 53:5-6]<br>