mirror of
https://github.com/servo/servo.git
synced 2025-08-09 23:45:35 +01:00
style: Atomize animation names.
This commit is contained in:
parent
0077eb147c
commit
5b27e46d04
4 changed files with 12 additions and 9 deletions
|
@ -69,7 +69,7 @@ pub enum CSSRule<Impl: SelectorImpl> {
|
|||
|
||||
#[derive(Debug, HeapSizeOf, PartialEq)]
|
||||
pub struct KeyframesRule {
|
||||
pub name: String,
|
||||
pub name: Atom,
|
||||
pub keyframes: Vec<Keyframe>,
|
||||
}
|
||||
|
||||
|
@ -405,7 +405,7 @@ enum AtRulePrelude {
|
|||
/// A @viewport rule prelude.
|
||||
Viewport,
|
||||
/// A @keyframes rule, with its animation name.
|
||||
Keyframes(String),
|
||||
Keyframes(Atom),
|
||||
}
|
||||
|
||||
|
||||
|
@ -507,7 +507,7 @@ impl<'a, 'b, Impl: SelectorImpl> AtRuleParser for NestedRuleParser<'a, 'b, Impl>
|
|||
},
|
||||
"keyframes" => {
|
||||
let name = try!(input.expect_ident());
|
||||
Ok(AtRuleType::WithBlock(AtRulePrelude::Keyframes(name.into_owned())))
|
||||
Ok(AtRuleType::WithBlock(AtRulePrelude::Keyframes(Atom::from(name))))
|
||||
},
|
||||
_ => Err(())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue