mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
selectors: Never match ::slotted on <slot>s.
This fixes the test from https://github.com/w3c/web-platform-tests/pull/9212 in Gecko.
This commit is contained in:
parent
bc7dd644f6
commit
61e60a87e5
7 changed files with 36 additions and 7 deletions
|
@ -416,6 +416,7 @@ where
|
|||
element.parent_element()
|
||||
}
|
||||
Combinator::SlotAssignment => {
|
||||
debug_assert!(element.assigned_slot().map_or(true, |s| s.is_html_slot_element()));
|
||||
element.assigned_slot()
|
||||
}
|
||||
Combinator::PseudoElement => {
|
||||
|
@ -631,6 +632,8 @@ where
|
|||
Component::Combinator(_) => unreachable!(),
|
||||
Component::Slotted(ref selector) => {
|
||||
context.shared.nest(|context| {
|
||||
// <slots> are never flattened tree slottables.
|
||||
!element.is_html_slot_element() &&
|
||||
element.assigned_slot().is_some() &&
|
||||
matches_complex_selector(
|
||||
selector.iter(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue