eb5a0d0bde
Now that rust-cssparser reports 1-based locations, bump the required cssparser version and remove get_location_with_offset. Previously, some code paths were not calling get_location_with_offset; see https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 for some background. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] These changes fix https://bugzilla.mozilla.org/show_bug.cgi?id=1398869 (github issue number if applicable). <!-- Either: --> - [ ] There are tests for these changes OR - [x] These changes do not require tests because tests are in rust-cssparser and/or M-C Source-Repo: https://github.com/servo/servo Source-Revision: 7746896bc4cf5a2a6dc78c00f643e4cff8e49da4 --HG-- extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear extra : subtree_revision : 919aeee03abfd07cd5dbcc9d478dd98cc76f054e |
||
---|---|---|
.. | ||
attr.rs | ||
bloom.rs | ||
build.rs | ||
builder.rs | ||
Cargo.toml | ||
context.rs | ||
gecko_like_types.rs | ||
lib.rs | ||
matching.rs | ||
parser.rs | ||
README.md | ||
sink.rs | ||
size_of_tests.rs | ||
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.