style: Use an enumerated array for per-pseudo maps.

This avoids random HashMaps.

MozReview-Commit-ID: LQeZrLsoOnl
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-08-07 19:35:08 +02:00
parent 69f02f4f7f
commit faa8646e0f
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
6 changed files with 294 additions and 155 deletions

View file

@ -14,7 +14,7 @@ use std::fmt;
use string_cache::{Atom, Namespace, WeakAtom, WeakNamespace};
use style_traits::{ParseError, StyleParseError};
pub use gecko::pseudo_element::{PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT};
pub use gecko::pseudo_element::{PseudoElement, EAGER_PSEUDOS, EAGER_PSEUDO_COUNT, SIMPLE_PSEUDO_COUNT};
pub use gecko::snapshot::SnapshotMap;
bitflags! {
@ -413,15 +413,6 @@ impl SelectorImpl {
}
#[inline]
/// Executes a function for each simple (not functional) pseudo-element.
pub fn each_simple_pseudo_element<F>(fun: F)
where F: FnMut(PseudoElement),
{
PseudoElement::each_simple(fun)
}
#[inline]
/// Returns the relevant state flag for a given non-tree-structural
/// pseudo-class.
pub fn pseudo_class_state_flag(pc: &NonTSPseudoClass) -> ElementState {