Struct style::rule_cache::RuleCache
[−]
[src]
pub struct RuleCache { /* fields omitted */ }
A TLS cache from rules matched to computed values.
Methods
impl RuleCache
[src]
pub fn new() -> Self
[src]
Creates an empty RuleCache
.
pub fn find(
&self,
builder_with_early_props: &StyleBuilder
) -> Option<&ComputedValues>
[src]
&self,
builder_with_early_props: &StyleBuilder
) -> Option<&ComputedValues>
Finds a node in the properties matched cache.
This needs to receive a StyleBuilder
with the early
properties
already applied.
pub fn insert_if_possible(
&mut self,
style: &Arc<ComputedValues>,
pseudo: Option<&PseudoElement>,
conditions: &RuleCacheConditions
) -> bool
[src]
&mut self,
style: &Arc<ComputedValues>,
pseudo: Option<&PseudoElement>,
conditions: &RuleCacheConditions
) -> bool
Inserts a node into the rules cache if possible.
Returns whether the style was inserted into the cache.