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

@ -24,6 +24,7 @@ use std::collections::HashMap;
use std::hash::BuildHasherDefault;
use std::process;
use std::sync::Arc;
use string_cache::Atom;
use style_traits::viewport::ViewportConstraints;
use stylesheets::{CSSRule, CSSRuleIteratorExt, Origin, Stylesheet};
use url::Url;
@ -129,7 +130,7 @@ pub struct Stylist<Impl: SelectorImplExt> {
BuildHasherDefault<::fnv::FnvHasher>>,
/// A map with all the animations indexed by name.
animations: HashMap<String, KeyframesAnimation>,
animations: HashMap<Atom, KeyframesAnimation>,
/// Applicable declarations for a given non-eagerly cascaded pseudo-element.
/// These are eagerly computed once, and then used to resolve the new
@ -461,7 +462,7 @@ impl<Impl: SelectorImplExt> Stylist<Impl> {
}
#[inline]
pub fn animations(&self) -> &HashMap<String, KeyframesAnimation> {
pub fn animations(&self) -> &HashMap<Atom, KeyframesAnimation> {
&self.animations
}
}