On Sunday 2014-02-16 22:37 -0500, Paul Rouget wrote: > Andrew Sutherland wrote: > > Is it possible / advisable to have Gecko support some preference or > > other magical mechanism to cause transitions and non-infinite > > animations to effectively complete in some extremely small time > > interval / on the next turn of the event loop, at least for > > durations originally less than 1second/other short time? I briefly > > looked for such an existing mechanism, but was unable to find one. > > Yes. You can use advanceTimeAndRefresh from nsIDOMWindowUtils. > See comment here: > http://mxr.mozilla.org/mozilla-central/source/dom/interfaces/base/nsIDOMWindowUtils.idl#1264
I'd warn you that advanceTimeAndRefresh is somewhat dangerous since: (1) it requires that you take complete control of the clock, and you *must* remember to call restoreNormalRefresh when you're done, or else the clock will never advance, and (2) it affects all presentations that happen to share the same refresh driver, which is something that might change over time. It might work here -- but it's a sharp tool, so be careful with it. -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
signature.asc
Description: Digital signature
_______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform