Le 30/10/2013 23:02, Josh Matthews a écrit :
On 10/30/2013 06:26 PM, Jack Moffitt wrote:
Right now we have this TreeNode abstraction that has been around for a
long time and has lost its original purpose (whatever that was). It's
only job right now appears to be to break the cyclic dependency
between the script and style crates.

Does anyone have strong feelings as to whether this is a worthwhile
reason to keep TreeNode around? If we get rid of it, I assume that
style will have to live in the script crate as it did before.

jack.


The gfx crate depends on the style crate for borders and text
decoration, which complicates matters. Simon and I also considered
keeping all the CSS code together in one crate (rather than splitting it
between script and main) was a worthy goal.

Because of gfx as Josh says above, I doubt just moving style back into script will work.

If possible, I’d much rather have the data structures for the DOM (ie. just enough to implement selector matching) be moved into a new crate that wouldn’t depend on gfx or the rest of script, so that style can use it.

This is kind of what we do now in util with traits, but this could be just the concrete data types.

--
Simon Sapin
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo

Reply via email to