Expand description
Selector matching.
StructsΒ§
- Cascade
Data - Data resulting from performing the CSS cascade that is specific to a given origin.
- Cascade
Data πCache - Cascade
Data πCache Key - A key in the cascade data cache.
- Cascade
Layer π - Container
Condition Id - The id of a given container condition, a sequentially-increasing identifier for a given style set.
- Container
Condition πReference - Containing
Rule πState - A struct containing state from ancestor rules like @layer / @import / @container / nesting / @scope.
- Document
Cascade Data - All the computed information for all the stylesheets that apply to the document.
- Document
Cascade Data Iter - An iterator over the cascade data of a given document.
- EMPTY_
UA_ πCASCADE_ DATA - The empty UA cascade data for un-filled stylists.
- Extra
Style Data - This struct holds data which users of Stylist may want to extract from stylesheets which can be done at the same time as updating.
- Extra
Style Data Iterator - An iterator over the different ExtraStyleData.
- Generic
Element πAndPseudo Rules - A set of rules for element and pseudo-elements.
- IMPLICIT_
SCOPE π - LayerId
- The id of a given layer, a sequentially-increasing identifier.
- Layer
Ordered Map - A map that is sorted in layer order.
- Layer
Ordered Vec - A vector that is sorted in layer order.
- Page
Rule Data - Wrapper to allow better tracking of memory usage by page rule lists.
- Page
Rule Map - Stores page rules indexed by page names.
- Revalidation
Selector πAndHashes - SelectorMapEntry implementation for use in our revalidation selector map.
- Rule
- A rule, that wraps a style rule, but represents a single selector of the rule.
- Saved
Containing πRule State - Scope
Bound With Hashes - Start and end bound of a scope, along with their selector hashes.
- Scope
Bounds With Hashes - Bounds for this scope, along with corresponding selector hashes.
- Scope
Condition Id - The id of a given scope condition, a sequentially-increasing identifier for a given style set.
- Scope
Condition Reference - Data required to process this scope condition.
- Scope
Root Candidates - All potential sscope root candidates.
- Stylesheet
Contents πPtr - Stylist
- This structure holds all the selectors and device characteristics
for a given document. The selectors are converted into
Rule
s and sorted intoSelectorMap
s keyed off stylesheet origin and pseudo-element (seeCascadeData
). - Stylist
Selector πVisitor - A selector visitor implementation that collects all the state the Stylist cares about a selector.
- Stylist
Stylesheet πSet - A wrapper over a DocumentStylesheetSet that can be
Sync
, since itβs only used and exposed via mutable methods in theStylist
. - UA_
CASCADE_ πDATA_ CACHE - A cache of computed user-agent data, to be shared across documents.
- User
Agent πCascade Data
EnumsΒ§
- Author
Styles Enabled - Whether author styles are enabled.
- Nested
Declarations πContext - Nested declarations have effectively two behaviors:
- Rule
Inclusion - What cascade levels to include when styling elements.
- Scope
Matches πShadow Host :scope
selector, depending on the use case, can match a shadow host. If used outside of@scope
, it cannot possibly match the host. Even when inside of@scope
, itβs conditional if the selector will match the shadow host.- Stylist
Implicit πScope Root - Implicit scope root, which may or may not be cached (i.e. For shadow DOM author styles that are cached and shared).
TraitsΒ§
FunctionsΒ§
- compare_
keyframes_ πin_ same_ layer - component_
needs_ πrevalidation - needs_
revalidation_ for_ testing - A function to be able to test the revalidation stuff.
- replace_
parent_ selector_ with_ implicit_ scope - Replace any occurrence of parent selector in the given selector with a implicit scope selector.
- scope_
root_ candidates - Find all scope conditions for a given condition ID, indexing into the given list of scope conditions.
- scope_
start_ πmatches_ shadow_ host
Type AliasesΒ§
- Element
AndPseudo πRules - Part
Element πAndPseudo Rules - PartMap π
- Precomputed
Pseudo πElement Declarations - Replaced
Selectors π - Style
Sheet πContent List - Stylist
Sheet - The type of the stylesheets that the stylist contains.
- User
Agent πCascade Data Cache