style: Atomize animation names.

This commit is contained in:
Emilio Cobos Álvarez 2016-06-19 16:51:02 +02:00
parent 0077eb147c
commit 5b27e46d04
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
4 changed files with 12 additions and 9 deletions

View file

@ -589,9 +589,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
pub mod computed_value {
use cssparser::ToCss;
use std::fmt;
use string_cache::Atom;
#[derive(Debug, Clone, PartialEq, HeapSizeOf)]
pub struct T(pub Vec<String>);
pub struct T(pub Vec<Atom>);
impl ToCss for T {
fn to_css<W>(&self, dest: &mut W) -> fmt::Result where W: fmt::Write {
@ -603,7 +604,8 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
if i != 0 {
try!(dest.write_str(", "));
}
try!(dest.write_str(&name));
// NB: to_string() needed due to geckolib backend.
try!(dest.write_str(&*name.to_string()));
}
Ok(())
}
@ -620,7 +622,7 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", need_clone=
pub fn parse(_: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue,()> {
use std::borrow::Cow;
Ok(SpecifiedValue(try!(input.parse_comma_separated(|input| {
input.expect_ident().map(Cow::into_owned)
input.expect_ident().map(Atom::from)
}))))
}