mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Added a bloom filter to CSS selector matching.
This commit is contained in:
parent
d161d0ad47
commit
acd83ff47b
20 changed files with 817 additions and 78 deletions
|
@ -31,7 +31,7 @@ pub struct Selector {
|
|||
pub specificity: u32,
|
||||
}
|
||||
|
||||
#[deriving(PartialEq, Clone)]
|
||||
#[deriving(Eq, PartialEq, Clone, Hash)]
|
||||
pub enum PseudoElement {
|
||||
Before,
|
||||
After,
|
||||
|
@ -54,7 +54,7 @@ pub enum Combinator {
|
|||
LaterSibling, // ~
|
||||
}
|
||||
|
||||
#[deriving(PartialEq, Clone)]
|
||||
#[deriving(Eq, PartialEq, Clone, Hash)]
|
||||
pub enum SimpleSelector {
|
||||
IDSelector(Atom),
|
||||
ClassSelector(Atom),
|
||||
|
@ -92,20 +92,20 @@ pub enum SimpleSelector {
|
|||
// ...
|
||||
}
|
||||
|
||||
#[deriving(PartialEq, Clone)]
|
||||
#[deriving(Eq, PartialEq, Clone, Hash)]
|
||||
pub struct LocalNameSelector {
|
||||
pub name: Atom,
|
||||
pub lower_name: Atom,
|
||||
}
|
||||
|
||||
#[deriving(PartialEq, Clone)]
|
||||
#[deriving(Eq, PartialEq, Clone, Hash)]
|
||||
pub struct AttrSelector {
|
||||
pub name: String,
|
||||
pub lower_name: String,
|
||||
pub namespace: NamespaceConstraint,
|
||||
}
|
||||
|
||||
#[deriving(PartialEq, Clone)]
|
||||
#[deriving(Eq, PartialEq, Clone, Hash)]
|
||||
pub enum NamespaceConstraint {
|
||||
AnyNamespace,
|
||||
SpecificNamespace(Namespace),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue