ded / morpheus

A Brilliant Animator
504 stars 57 forks source link

Workaround for IE10 msRequestAnimationFrame #32

Closed ghost closed 11 years ago

ghost commented 11 years ago

IE10 workd differently than it's documented in MSDN. Or maybe I'm just dump and don't now how to read. Anyways this patch just wraps callback and passes current timestamp with each call not relying on original argument.

moret commented 11 years ago

Hello. We had a bug on IE10 precisely because of that. I tested d1o pull request and it worked fine, both the examples page and our own use of it.

ded commented 11 years ago

cool will have a look now

ded commented 11 years ago

looks great! thanks

moret commented 11 years ago

Unfortunately the same behaviour seems to be now present on Chrome 24 Beta. I made a second pull request applying the wrapping workaround on any animationFrame method. See https://github.com/ded/morpheus/pull/34 .

ded commented 11 years ago

wtf chrome. did the standard change?

moret commented 11 years ago

The draft is still indicating that time should be an argument for the callback: http://www.w3.org/TR/animation-timing/#dfn-invoke-callbacks-algorithm

ghost commented 11 years ago

fixed it for good. the parameter was changed. windows.perfomance.now() should be used to obtain animation start instead of +new Date(). they tried to push it into mainline back in may, but got same compatibility problems. seems like everyone adopted except us :)

http://lists.w3.org/Archives/Public/public-web-perf/2012May/thread.html#msg36

So slow

ded commented 11 years ago

so it appears we have to detect that as well...