Use CustomIdent for animation-name and @keyframes

This commit is contained in:
Simon Sapin 2017-04-14 05:26:51 +02:00
parent 4993a80074
commit d9c2d1a9fb
8 changed files with 35 additions and 43 deletions

View file

@ -470,8 +470,8 @@ pub fn maybe_start_animations(context: &SharedStyleContext,
continue
}
if let Some(ref anim) = context.stylist.animations().get(&name.0) {
debug!("maybe_start_animations: animation {} found", name);
if let Some(ref anim) = context.stylist.animations().get(&name.0 .0) {
debug!("maybe_start_animations: animation {} found", name.0 .0);
// If this animation doesn't have any keyframe, we can just continue
// without submitting it to the compositor, since both the first and
@ -506,7 +506,7 @@ pub fn maybe_start_animations(context: &SharedStyleContext,
new_animations_sender
.send(Animation::Keyframes(node, name.0.clone(), KeyframesAnimationState {
.send(Animation::Keyframes(node, name.0 .0.clone(), KeyframesAnimationState {
started_at: animation_start,
duration: duration as f64,
delay: delay as f64,
@ -586,7 +586,7 @@ pub fn update_style_for_animation(context: &SharedStyleContext,
let maybe_index = style.get_box()
.animation_name_iter()
.position(|animation_name| *name == animation_name.0);
.position(|animation_name| *name == animation_name.0 .0);
let index = match maybe_index {
Some(index) => index,