Bug 1317209 - Part 5: Support transition cascade level. r=emilio

Support a new enum, EffectCompositor_CascadeLevel, which is an equivalent of
EffectCompositor::CascadeLevel in Gecko.
This commit is contained in:
Boris Chiou 2017-01-24 15:34:08 +08:00
parent 3a89e89952
commit 19aea7ea78
7 changed files with 52 additions and 18 deletions

View file

@ -589,14 +589,14 @@ pub trait MatchMethods : TElement {
let mut applicable_declarations: Vec<ApplicableDeclarationBlock> = Vec::with_capacity(16);
let stylist = &context.shared.stylist;
let style_attribute = self.style_attribute();
let animation_rule = self.get_animation_rule(None);
let animation_rules = self.get_animation_rules(None);
// Compute the primary rule node.
let mut primary_relations =
stylist.push_applicable_declarations(self,
parent_bf,
style_attribute,
animation_rule,
animation_rules,
None,
&mut applicable_declarations,
MatchingReason::ForStyling);
@ -606,9 +606,9 @@ pub trait MatchMethods : TElement {
let mut per_pseudo: PseudoRuleNodes = HashMap::with_hasher(Default::default());
SelectorImpl::each_eagerly_cascaded_pseudo_element(|pseudo| {
debug_assert!(applicable_declarations.is_empty());
let pseudo_animation_rule = self.get_animation_rule(Some(&pseudo));
let pseudo_animation_rules = self.get_animation_rules(Some(&pseudo));
stylist.push_applicable_declarations(self, parent_bf, None,
pseudo_animation_rule,
pseudo_animation_rules,
Some(&pseudo.clone()),
&mut applicable_declarations,
MatchingReason::ForStyling);