Re: [dev-servo] Where do styles live, and how to make it work with CSS fragmentation stuff

2013-06-12 Thread Boris Zbarsky
On 6/12/13 6:06 PM, Joel Feenstra wrote: What if the boxes and flow contexts were given a style accessor closure by the box/flow builder. How well would this perform? At least in Gecko, getting styles is something that happens a _lot_ and is a notorious performance hotspot during layout...

Re: [dev-servo] Where do styles live, and how to make it work with CSS fragmentation stuff

2013-06-12 Thread Joel Feenstra
What if the boxes and flow contexts were given a style accessor closure by the box/flow builder. Presumably the builder would need those styles anyway, and they could point to any part of the style tree or have any filtering or whatever as necessary. That way we wouldn't need special types of boxes

[dev-servo] Where do styles live, and how to make it work with CSS fragmentation stuff

2013-06-12 Thread Boris Zbarsky
It looks like in servo we're basically trying to have styles live on elements, with no concept of a "style" attached to layout boxes or flows at all. Anyone who needs styles has to talk to the element. This works pretty well (and makes things like style recomputation much simpler) except when