Ancestor hashes for the bloom filter. We precompute these and store them
inline with selectors to optimize cache performance during matching.
This matters a lot.
An iterator over all simple selectors belonging to ancestors.
Composition of combinators in a given selector, not traversing selectors of pseudoclasses.
An iterator over all combinators in a selector. Does not traverse selectors within psuedoclasses.
What kind of selectors potentially matching featureless shawdow host are present.
The properties that comprise an :nth- pseudoclass as of Selectors 4 (e.g.,
nth-child(An+B [of S]?)).
https://www.w3.org/TR/selectors-4/#nth-child-pseudo
The properties that comprise an :nth- pseudoclass as of Selectors 3 (e.g.,
nth-child(An+B)).
https://www.w3.org/TR/selectors-3/#nth-child-pseudo
Storage for a relative selector.
Count of combinators in a given relative selector, not traversing selectors of pseudoclasses.
A Selector stores a sequence of simple selectors and combinators. The
iterator classes allow callers to iterate at either the raw sequence level or
at the level of sequences of simple selectors separated by combinators. Most
callers want the higher-level iterator.
Uniquely identify a selector based on its components, which is behind ThinArc and
is therefore stable.
A selector list is a tagged pointer with either a single selector, or a ThinArc<()> of multiple
selectors.
Flags that indicate at which point of parsing a selector are we.
Returns whether the name corresponds to a CSS2 pseudo-element that
can be specified with the single colon syntax (in addition to the
double-colon syntax, which can be used for all pseudo-elements).
simple_selector_sequence
: [ type_selector | universal ] [ HASH | class | attrib | pseudo | negation ]*
| [ HASH | class | attrib | pseudo | negation ]+
Parses one compound selector suitable for nested stuff like :-moz-any, etc.
Level 3: Parse one simple_selector. (Though we might insert a second
implied β|*β type selector.)
Parse a simple selector other than a type selector.
Err(())
: Invalid selector, abortOk(None(token))
: Not a simple selector, could be something else. input
was not consumed,
but the token is still returned.Ok(Some(namespace, local_name))
: None
for the local name means a *
universal selector
Build up a Selector.
selector : simple_selector_sequence [ combinator simple_selector_sequence ]* ;
Err(())
: Invalid selector, abortOk(false)
: Not a type selector, could be something else. input
was not consumed.Ok(true)
: Length 0 (*|*
), 1 (*|E
or ns|*
) or 2 (|E
or ns|E
)
Returns a Cow::Borrowed if s
is already ASCII lowercase, and a
Cow::Owned if s
had to be converted into ASCII lowercase.