mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
style: Remove get_animation_rule_by_cascade.
It's pretty useless.
This commit is contained in:
parent
8d34aacb3b
commit
c5bfc81b74
3 changed files with 15 additions and 36 deletions
|
@ -764,29 +764,27 @@ pub trait MatchMethods : TElement {
|
|||
debug_assert!(context.shared.traversal_flags.for_animation_only());
|
||||
|
||||
if replacements.contains(RestyleHint::RESTYLE_SMIL) {
|
||||
replace_rule_node(CascadeLevel::SMILOverride,
|
||||
self.get_smil_override(),
|
||||
primary_rules);
|
||||
replace_rule_node(
|
||||
CascadeLevel::SMILOverride,
|
||||
self.get_smil_override(),
|
||||
primary_rules,
|
||||
);
|
||||
}
|
||||
|
||||
let replace_rule_node_for_animation = |level: CascadeLevel,
|
||||
primary_rules: &mut StrongRuleNode| {
|
||||
let animation_rule = self.get_animation_rule_by_cascade(level);
|
||||
replace_rule_node(level,
|
||||
animation_rule.as_ref().map(|a| a.borrow_arc()),
|
||||
primary_rules);
|
||||
};
|
||||
|
||||
// Apply Transition rules and Animation rules if the corresponding restyle hint
|
||||
// is contained.
|
||||
if replacements.contains(RestyleHint::RESTYLE_CSS_TRANSITIONS) {
|
||||
replace_rule_node_for_animation(CascadeLevel::Transitions,
|
||||
primary_rules);
|
||||
replace_rule_node(
|
||||
CascadeLevel::Transitions,
|
||||
self.get_transition_rule().as_ref().map(|a| a.borrow_arc()),
|
||||
primary_rules,
|
||||
);
|
||||
}
|
||||
|
||||
if replacements.contains(RestyleHint::RESTYLE_CSS_ANIMATIONS) {
|
||||
replace_rule_node_for_animation(CascadeLevel::Animations,
|
||||
primary_rules);
|
||||
replace_rule_node(
|
||||
CascadeLevel::Animations,
|
||||
self.get_animation_rule().as_ref().map(|a| a.borrow_arc()),
|
||||
primary_rules,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue