Re: [dev-servo] Making reflowing animations as fast as compositable animations

2015-03-21 Thread Robert O'Callahan
On Sun, Mar 22, 2015 at 8:03 AM, Patrick Walton wrote: > A hypothetical requestAsyncAnimationFrame() API whose callback had no > general access to the DOM and window object (though you could, for example, > pass specific DOM objects in to mutate their styles) would solve this > issue. Google's ol

Re: [dev-servo] Making reflowing animations as fast as compositable animations

2015-03-21 Thread Patrick Walton
Admittedly I haven't looked at precisely what jQuery does, other than to verify that its animations do run on the main thread. requestAnimationFrame doesn't solve the problem, though, because rAF callbacks run on the main thread with full access to the DOM and JS heap. So if we tried to run them co

Re: [dev-servo] Making reflowing animations as fast as compositable animations

2015-03-21 Thread L. David Baron
On Saturday 2015-03-21 11:27 -0700, Patrick Walton wrote: > 2. *Avoid going through style recalculation for transitions.* Style > recalculation (including CSS selector matching and layout object > construction) fundamentally has to access the DOM. But there is no need to > actually do this to updat

Re: [dev-servo] Making reflowing animations as fast as compositable animations

2015-03-21 Thread Josh Matthews
On 2015-03-21 2:27 PM, Patrick Walton wrote: One remaining issue is how to deal with jQuery-style animations that are done with setTimeout(). They have to contend with everything else on the DOM/script thread to avoid breaking the HTML/JavaScript event loop semantics. I've brainstormed ideas for

[dev-servo] Making reflowing animations as fast as compositable animations

2015-03-21 Thread Patrick Walton
Hi everyone, I've been thinking about ways that Servo's architecture can result in user experience improvements in common Web patterns today. One particularly relevant thing that's becoming clear is that Web pages often animate CSS properties that require reflows in current Web browsers. Google ha