fune/servo/components/selectors
Jan-Niklas Jaeschke fa75d3a60f Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio
Added WebIDL interfaces as per spec, added some necessary changes to support maplike and setlike structures to be accessed from C++.

Added `::highlight(foo)` pseudo element to CSS engine.

Implemented Highlight as new kind of `Selection` using `HighlightType::eHighlight`. This implies Selections being added/removed during runtime (one `Selection` object per highlight identifier), therefore a dynamic container for highlight `Selection` objects was added to `nsFrameSelection`. Also, the painting code queries the highlight style for highlight Selections.

Implementation is currently hidden behind a pref `dom.customHighlightAPI.enabled`.

Differential Revision: https://phabricator.services.mozilla.com/D164203
2023-01-27 11:42:18 +00:00
..
attr.rs
bloom.rs
build.rs
builder.rs Bug 1811205 - [css-nesting] Parse parent selector. r=zrhoffman 2023-01-24 10:02:18 +00:00
Cargo.toml Bug 1352757 - Add lab(), lch(), oklab(), oklch() to specified colors. r=supply-chain-reviewers,emilio 2023-01-20 10:55:51 +00:00
context.rs Bug 1808228 - Implement selector matching for :nth-child(An+B of selector list) and :nth-last-child(An+B of selector list) r=emilio 2023-01-16 11:26:41 +00:00
lib.rs
matching.rs Bug 1811205 - [css-nesting] Parse parent selector. r=zrhoffman 2023-01-24 10:02:18 +00:00
nth_index_cache.rs Bug 1808228 - Implement selector matching for :nth-child(An+B of selector list) and :nth-last-child(An+B of selector list) r=emilio 2023-01-16 11:26:41 +00:00
parser.rs Bug 1803355: Basic implementation of Custom Highlight API. r=edgar,emilio 2023-01-27 11:42:18 +00:00
README.md
sink.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 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.