style: Fix parsing and add generated keyframes

This commit is contained in:
Emilio Cobos Álvarez 2016-06-27 08:52:33 -07:00
parent 46eec45886
commit 2d566ef0ef
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
10 changed files with 189 additions and 94 deletions

View file

@ -386,7 +386,7 @@ trait PrivateMatchMethods: TNode
cacheable = !self.update_animations_for_cascade(context, &mut style) && cacheable;
}
let mut this_style;
let this_style;
match parent_style {
Some(ref parent_style) => {
let cache_entry = applicable_declarations_cache.find(applicable_declarations);
@ -416,6 +416,8 @@ trait PrivateMatchMethods: TNode
}
};
let mut this_style = Arc::new(this_style);
if animate_properties {
let this_opaque = self.opaque();
// Trigger any present animations if necessary.
@ -428,7 +430,7 @@ trait PrivateMatchMethods: TNode
// to its old value if it did trigger a transition.
if let Some(ref style) = style {
animations_started |=
animation::start_transitions_if_applicable::<Self::ConcreteComputedValues>(
animation::start_transitions_if_applicable::<<Self::ConcreteElement as Element>::Impl>(
&context.new_animations_sender,
this_opaque,
&**style,
@ -439,7 +441,6 @@ trait PrivateMatchMethods: TNode
}
// Calculate style difference.
let this_style = Arc::new(this_style);
let damage = Self::ConcreteRestyleDamage::compute(style.map(|s| &*s), &*this_style);
// Cache the resolved style if it was cacheable.