mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Add support for :scope pseudo-class
This commit is contained in:
parent
715fc9cea6
commit
ab46a0bbe0
4 changed files with 25 additions and 1 deletions
|
@ -724,6 +724,12 @@ fn matches_simple_selector<E, F>(
|
|||
flags_setter(element, HAS_EMPTY_SELECTOR);
|
||||
element.is_empty()
|
||||
}
|
||||
Component::Scope => {
|
||||
match context.shared.scope_element {
|
||||
Some(ref scope_element) => element.opaque() == *scope_element,
|
||||
None => element.is_root(),
|
||||
}
|
||||
}
|
||||
Component::NthChild(a, b) => {
|
||||
matches_generic_nth_child(element, context, a, b, false, false, flags_setter)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue