mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
Use atom for animation-name property
This commit is contained in:
parent
2cd9dcebee
commit
e0ef378b20
3 changed files with 24 additions and 22 deletions
|
@ -146,6 +146,17 @@ impl KeyframesName {
|
|||
}
|
||||
}
|
||||
|
||||
/// Create a new KeyframesName from Atom.
|
||||
#[cfg(feature = "gecko")]
|
||||
pub fn from_atom(atom: Atom) -> Self {
|
||||
debug_assert_ne!(atom, atom!(""));
|
||||
|
||||
// FIXME: We might want to preserve <string>, but currently Gecko
|
||||
// stores both of <custom-ident> and <string> into nsAtom, so
|
||||
// we can't tell it.
|
||||
KeyframesName::Ident(CustomIdent(atom))
|
||||
}
|
||||
|
||||
/// The name as an Atom
|
||||
pub fn as_atom(&self) -> &Atom {
|
||||
match *self {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue