mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Make cascade_with_rules take SharedStyleContext instead StyleContext.
This commit is contained in:
parent
4516d25889
commit
c22d4e518c
1 changed files with 3 additions and 4 deletions
|
@ -468,13 +468,12 @@ trait PrivateMatchMethods: TElement {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn cascade_with_rules(&self,
|
fn cascade_with_rules(&self,
|
||||||
context: &StyleContext<Self>,
|
shared_context: &SharedStyleContext,
|
||||||
rule_node: &StrongRuleNode,
|
rule_node: &StrongRuleNode,
|
||||||
primary_style: &ComputedStyle,
|
primary_style: &ComputedStyle,
|
||||||
pseudo_style: &Option<(&PseudoElement, &mut ComputedStyle)>,
|
pseudo_style: &Option<(&PseudoElement, &mut ComputedStyle)>,
|
||||||
cascade_flags: CascadeFlags)
|
cascade_flags: CascadeFlags)
|
||||||
-> Arc<ComputedValues> {
|
-> Arc<ComputedValues> {
|
||||||
let shared_context = context.shared;
|
|
||||||
let mut cascade_info = CascadeInfo::new();
|
let mut cascade_info = CascadeInfo::new();
|
||||||
|
|
||||||
// Grab the inherited values.
|
// Grab the inherited values.
|
||||||
|
@ -557,7 +556,7 @@ trait PrivateMatchMethods: TElement {
|
||||||
|
|
||||||
// Grab the rule node.
|
// Grab the rule node.
|
||||||
let rule_node = &pseudo_style.as_ref().map_or(primary_style, |p| &*p.1).rules;
|
let rule_node = &pseudo_style.as_ref().map_or(primary_style, |p| &*p.1).rules;
|
||||||
self.cascade_with_rules(context, rule_node, primary_style, pseudo_style, cascade_flags)
|
self.cascade_with_rules(context.shared, rule_node, primary_style, pseudo_style, cascade_flags)
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Computes values and damage for the primary or pseudo style of an element,
|
/// Computes values and damage for the primary or pseudo style of an element,
|
||||||
|
@ -622,7 +621,7 @@ trait PrivateMatchMethods: TElement {
|
||||||
if self.skip_root_and_item_based_display_fixup() {
|
if self.skip_root_and_item_based_display_fixup() {
|
||||||
cascade_flags.insert(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP)
|
cascade_flags.insert(SKIP_ROOT_AND_ITEM_BASED_DISPLAY_FIXUP)
|
||||||
}
|
}
|
||||||
self.cascade_with_rules(context,
|
self.cascade_with_rules(context.shared,
|
||||||
&without_transition_rules,
|
&without_transition_rules,
|
||||||
primary_style,
|
primary_style,
|
||||||
&pseudo_style,
|
&pseudo_style,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue