style: Add parsing support for ::part().

Disabled for now of course. This should be pretty uncontroversial I'd think.

Differential Revision: https://phabricator.services.mozilla.com/D28060
This commit is contained in:
Emilio Cobos Álvarez 2019-05-01 17:25:13 +00:00
parent 9f73576f6a
commit a23ad3be50
10 changed files with 106 additions and 17 deletions

View file

@ -450,6 +450,7 @@ where
element.containing_shadow_host()
},
Combinator::Part => element.containing_shadow_host(),
Combinator::SlotAssignment => {
debug_assert!(
context.current_host.is_some(),
@ -517,6 +518,7 @@ where
Combinator::Child |
Combinator::Descendant |
Combinator::SlotAssignment |
Combinator::Part |
Combinator::PseudoElement => SelectorMatchingResult::NotMatchedGlobally,
};
@ -671,6 +673,7 @@ where
match *selector {
Component::Combinator(_) => unreachable!(),
Component::Part(ref part) => element.is_part(part),
Component::Slotted(ref selector) => {
// <slots> are never flattened tree slottables.
!element.is_html_slot_element() &&