Name Description Size
Cargo.toml 2625 servo-style 216 CSS transitions and animations. 52994 Applicable declarations management. 4502 Parsed representations of [DOM attributes][attr]. [attr]: 18803 A set of author stylesheets and their computed representation, such as the ones used for ShadowRoot. 2543 Parametric Bézier curves. This is based on `WebCore/platform/graphics/UnitBezier.h` in WebKit. 3302 The style bloom filter is used as an optimization when matching deep descendant selectors. 13950 2693 13787 The context within which style is calculated. 29430
counter_style 3 Support for [custom properties for cascading variables][custom]. [custom]: 41129 Per-node data used in style calculation. 16688 Types and traits used to access the DOM from style calculation. 34730 Generic implementations of some DOM APIs so they can be shared between Servo and Gecko. 21348 Implements traversal over the DOM tree. The traversal starts in sequential mode, and optionally parallelizes as it discovers work. 7823 States elements can be in. 8432 Parsing stylesheets from bytes (not `&str`). 3454 Types used to report parsing errors. 11590 The [`@font-face`][ff] at-rule. [ff]: 19559 Access to font metrics from the style system. 3129
gecko 20
gecko_bindings 2
gecko_string_cache 2 Global style data 6075 Reexports of hashglobe types in Gecko mode, and stdlib hashmap shims in Servo mode Can go away when the stdlib gets fallible collections 1041
invalidation 4 Calculate [specified][specified] and [computed values][computed] from a tree of DOM nodes and a set of stylesheets. [computed]: [specified]: In particular, this crate contains the definitions of supported properties, the code to parse them into specified values and calculate the computed values based on the specified values, as well as the code to serialize both specified and computed values. The main entry point is [`recalc_style_at`][recalc_style_at]. [recalc_style_at]: traversal/fn.recalc_style_at.html Major dependencies are the [cssparser][cssparser] and [selectors][selectors] crates. [cssparser]: ../cssparser/index.html [selectors]: ../selectors/index.html 6834 Geometry in flow-relative space. 44978 Various macro helpers. 3954 High-level interface to CSS selector matching. 39808
media_queries 6 Implements parallel traversal over the DOM tree. This traversal is based on Rayon, and therefore its safety is largely verified by the type system. The primary trickiness and fine print for the above relates to the thread safety of the DOM nodes themselves. Accessing a DOM element concurrently on multiple threads is actually mostly "safe", since all the mutable state is protected by an AtomicRefCell, and so we'll generally panic if something goes wrong. Still, we try to to enforce our thread invariants at compile time whenever possible. As such, TNode and TElement are not Send, so ordinary style system code cannot accidentally share them with other threads. In the parallel traversal, we explicitly invoke |unsafe { SendNode::new(n) }| to put nodes in containers that may be sent to other threads. This occurs in only a handful of places and is easy to grep for. At the time of this writing, there is no other unsafe code in the parallel traversal. 13113 The context within which CSS code is parsed. 7041
properties 14 A cache from rule node to computed values, in order to cache reset properties. 6217 Collects a series of applicable rules for a given element. 17673
rule_tree 6 Stack-scoped thread-local storage for rayon thread pools. 2701 A data structure to efficiently index structs containing selectors by local name, ids and hash. 22118 The pseudo-classes and pseudo-elements supported by the style system. 7642
servo 5 Different objects protected by the same lock 12090
sharing 2 String utils for attributes and similar stuff. 7785 A struct to encapsulate all the style fixups and flags propagations a computed style needs in order for it to adhere to the CSS spec. 33789 Style resolution for a given element or pseudo-element. 19391 A centralized set of stylesheets for a document. 22123
stylesheets 19 Selector matching. 87457 Supports dynamic assertions in about what sort of thread is running and what state it's in. 2656 Traversing the DOM tree; the bloom filter. 31182 Flags that control the traversal process. We CamelCase rather than UPPER_CASING so that we can grep for the same strings across gecko and servo. 2778
use_counters 1
values 7