Name Description Size Coverage
attr.rs 6682 26 %
bloom.rs Counting and non-counting Bloom filters tuned for use as ancestor filters for selector matching. 11846 18 %
builder.rs Helper module to build up a selector safely and efficiently. Our selector representation is designed to optimize matching, and has several requirements: * All simple selectors and combinators are stored inline in the same buffer as Component instances. * We store the top-level compound selectors from right to left, i.e. in matching order. * We store the simple selectors for each combinator from left to right, so that we match the cheaper simple selectors first. For example, the selector: .bar:hover > .baz:nth-child(2) + .qux Gets stored as: [.qux, + , .baz, :nth-child(2), > , .bar, :hover] Meeting all these constraints without extra memmove traffic during parsing is non-trivial. This module encapsulates those details and presents an easy-to-use API for the parser. 16710 96 %
Cargo.toml 909 -
CHANGES.md 184 -
context.rs 17359 100 %
kleene_value.rs Kleen logic: https://en.wikipedia.org/wiki/Three-valued_logic#Kleene_and_Priest_logics 3537 100 %
lib.rs 784 100 %
matching.rs 56898 99 %
nth_index_cache.rs 3171 100 %
parser.rs 178111 60 %
README.md rust-selectors 1171 -
relative_selector 97 %
sink.rs Small helpers to abstract over different containers. 950 100 %
subtree_filter.rs Hashes for the DOM-maintained filter of local names, classes and null-namespace attribute names in an element's DOM subtree, including itself. Shadow-tree contents are not included. This is separate from the ancestor bloom and the wider, lazily constructed `RelativeSelectorFilterMap`. Required hashes can be OR'd together: `(filter & hashes) == hashes` means that a match remains possible. Zero never rejects. Removed names may leave stale bits, so a hit cannot prove that a selector matches. 1397 -
tree.rs Traits that nodes must implement. Breaks the otherwise-cyclic dependency between layout and style. 6648 100 %
visitor.rs Visitor traits for selectors. 4884 46 %