gecko-dev/servo/components/selectors
Emilio Cobos Álvarez 0fc4331924 servo: Merge #16293 - style: Refactor the selectors crate to remove ad-hoc logic (from emilio:refactor-selectors); r=bholley
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
2017-04-09 05:17:55 -05:00
..
bloom.rs servo: Merge #16070 - selectors: Get rid of hashing overhead using the precomputed hash atoms have (from emilio:selectors-bloom-hash-less); r=bholley 2017-04-07 19:03:12 -05:00
Cargo.toml servo: Merge #16070 - selectors: Get rid of hashing overhead using the precomputed hash atoms have (from emilio:selectors-bloom-hash-less); r=bholley 2017-04-07 19:03:12 -05:00
lib.rs servo: Merge #16293 - style: Refactor the selectors crate to remove ad-hoc logic (from emilio:refactor-selectors); r=bholley 2017-04-09 05:17:55 -05:00
matching.rs servo: Merge #16293 - style: Refactor the selectors crate to remove ad-hoc logic (from emilio:refactor-selectors); r=bholley 2017-04-09 05:17:55 -05:00
parser.rs servo: Merge #16293 - style: Refactor the selectors crate to remove ad-hoc logic (from emilio:refactor-selectors); r=bholley 2017-04-09 05:17:55 -05:00
README.md
tree.rs servo: Merge #16077 - Bug 1345950: stylo: Fix slow selector flags. r=bholley (from emilio:slow-flags); r=bholley 2017-03-22 03:23:51 -07:00
visitor.rs servo: Merge #16293 - style: Refactor the selectors crate to remove ad-hoc logic (from emilio:refactor-selectors); r=bholley 2017-04-09 05:17:55 -05:00

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 Kuchikis 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 dont already have a tree data structure, consider using Kuchiki itself.