mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Implement XUL tree pseudo style resolution for stylo.
This commit is contained in:
parent
915890af77
commit
2dc714f0ac
9 changed files with 172 additions and 10 deletions
|
@ -387,9 +387,20 @@ where
|
|||
if context.nesting_level == 0 &&
|
||||
context.matching_mode == MatchingMode::ForStatelessPseudoElement {
|
||||
// Consume the pseudo.
|
||||
let pseudo = iter.next().unwrap();
|
||||
debug_assert!(matches!(*pseudo, Component::PseudoElement(..)),
|
||||
"Used MatchingMode::ForStatelessPseudoElement in a non-pseudo selector");
|
||||
match *iter.next().unwrap() {
|
||||
Component::PseudoElement(ref pseudo) => {
|
||||
if let Some(ref f) = context.pseudo_element_matching_fn {
|
||||
if !f(pseudo) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
_ => {
|
||||
debug_assert!(false,
|
||||
"Used MatchingMode::ForStatelessPseudoElement \
|
||||
in a non-pseudo selector");
|
||||
}
|
||||
}
|
||||
|
||||
// The only other parser-allowed Component in this sequence is a state
|
||||
// class. We just don't match in that case.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue