Module stylist

Source
Expand description

Selector matching.

StructsΒ§

CascadeData
Data resulting from performing the CSS cascade that is specific to a given origin.
CascadeDataCache πŸ”’
CascadeDataCacheKey πŸ”’
A key in the cascade data cache.
CascadeLayer πŸ”’
ContainerConditionId
The id of a given container condition, a sequentially-increasing identifier for a given style set.
ContainerConditionReference πŸ”’
ContainingRuleState πŸ”’
A struct containing state from ancestor rules like @layer / @import / @container / nesting / @scope.
DocumentCascadeData
All the computed information for all the stylesheets that apply to the document.
DocumentCascadeDataIter
An iterator over the cascade data of a given document.
EMPTY_UA_CASCADE_DATA πŸ”’
The empty UA cascade data for un-filled stylists.
ExtraStyleData
This struct holds data which users of Stylist may want to extract from stylesheets which can be done at the same time as updating.
ExtraStyleDataIterator
An iterator over the different ExtraStyleData.
GenericElementAndPseudoRules πŸ”’
A set of rules for element and pseudo-elements.
IMPLICIT_SCOPE πŸ”’
LayerId
The id of a given layer, a sequentially-increasing identifier.
LayerOrderedMap
A map that is sorted in layer order.
LayerOrderedVec
A vector that is sorted in layer order.
PageRuleData
Wrapper to allow better tracking of memory usage by page rule lists.
PageRuleMap
Stores page rules indexed by page names.
RevalidationSelectorAndHashes πŸ”’
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.
SavedContainingRuleState πŸ”’
ScopeBoundWithHashes
Start and end bound of a scope, along with their selector hashes.
ScopeBoundsWithHashes
Bounds for this scope, along with corresponding selector hashes.
ScopeConditionId
The id of a given scope condition, a sequentially-increasing identifier for a given style set.
ScopeConditionReference
Data required to process this scope condition.
ScopeRootCandidates
All potential sscope root candidates.
StylesheetContentsPtr πŸ”’
Stylist
This structure holds all the selectors and device characteristics for a given document. The selectors are converted into Rules and sorted into SelectorMaps keyed off stylesheet origin and pseudo-element (see CascadeData).
StylistSelectorVisitor πŸ”’
A selector visitor implementation that collects all the state the Stylist cares about a selector.
StylistStylesheetSet πŸ”’
A wrapper over a DocumentStylesheetSet that can be Sync, since it’s only used and exposed via mutable methods in the Stylist.
UA_CASCADE_DATA_CACHE πŸ”’
A cache of computed user-agent data, to be shared across documents.
UserAgentCascadeData πŸ”’

EnumsΒ§

AuthorStylesEnabled
Whether author styles are enabled.
NestedDeclarationsContext πŸ”’
Nested declarations have effectively two behaviors:
RuleInclusion
What cascade levels to include when styling elements.
ScopeMatchesShadowHost πŸ”’
: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.
StylistImplicitScopeRoot πŸ”’
Implicit scope root, which may or may not be cached (i.e. For shadow DOM author styles that are cached and shared).

TraitsΒ§

CascadeDataCacheEntry πŸ”’

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Β§

ElementAndPseudoRules πŸ”’
PartElementAndPseudoRules πŸ”’
PartMap πŸ”’
PrecomputedPseudoElementDeclarations πŸ”’
ReplacedSelectors πŸ”’
StyleSheetContentList πŸ”’
StylistSheet
The type of the stylesheets that the stylist contains.
UserAgentCascadeDataCache πŸ”’