Also refactors a lot of the restyle hint code to use these new hooks, and removes a lot of hacks in servo that shouldn't be needed because of correct handling of restyles due to attribute changes. I just smoketested this, so going for a full try run now. Source-Repo: https://github.com/servo/servo Source-Revision: 949931ec0caa20b9f38a12863f610da562950b90 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : f582806c0fe29152f09e8a8a4a3b407265b9b9eb |
||
|---|---|---|
| .. | ||
| bloom.rs | ||
| Cargo.toml | ||
| lib.rs | ||
| matching.rs | ||
| parser.rs | ||
| README.md | ||
| tree.rs | ||
| visitor.rs | ||
rust-selectors
CSS Selectors library for Rust. Includes parsing and serilization of selectors, as well as matching against a generic tree of elements. Pseudo-elements and most pseudo-classes are generic as well.
Warning: breaking changes are made to this library fairly frequently (13 times in 2016, for example). However you can use this crate without updating it that often, old versions stay available on crates.io and Cargo will only automatically update to versions that are numbered as compatible.
To see how to use this library with your own tree representation,
see Kuchiki’s src/select.rs.
(Note however that Kuchiki is not always up to date with the latest rust-selectors version,
so that code may need to be tweaked.)
If you don’t already have a tree data structure,
consider using Kuchiki itself.