Hi,
As mentioned before, I have a CSS parser written in Rust that is mostly
complete. (It still needs more tests and a bit of catching up with spec
changes.)
https://github.com/SimonSapin/rust-cssparser/
I’m now looking into integrating it with Servo. The goal it to
eventually replace libcss with Rust code, but libcss also does Selector
matching so I expect to also implement Selectors. (By the way, is
netsurfcss the same thing as libcss?)
Is it correct that most of this happens in the src/support/css
submodule? Will I need to touch more code outside of that?
While CSS parsing is fairly standalone, Selectors are fundamentally
about a document/DOM/content tree. What data structure or API should I
use for this tree? If Hubbub it expected to be replaced at some point,
do we or should we have an abstraction layer in-between?
Also, I expect we’ll want to do some string interning for
property/element/attribute names and other keywords to avoid many linear
string comparisons. There is a set of known names, but we still want to
support eg. unknown HTML element in Selectors. How does or should that work?
Cheers,
--
Simon Sapin
_______________________________________________
dev-servo mailing list
dev-servo@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-servo