diff options
-rw-r--r-- | components/style/gecko/selector_parser.rs | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index 0dec6ed479a..72da9346a36 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -6,7 +6,7 @@ use cssparser::{BasicParseError, BasicParseErrorKind, Parser, ToCss, Token, CowRcStr, SourceLocation}; use element_state::{DocumentState, ElementState}; -use gecko_bindings::structs::CSSPseudoClassType; +use gecko_bindings::structs::{self, CSSPseudoClassType}; use gecko_bindings::structs::RawServoSelectorList; use gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI}; use selector_parser::{Direction, SelectorParser}; @@ -333,6 +333,13 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { type Impl = SelectorImpl; type Error = StyleParseErrorKind<'i>; + fn parse_slotted(&self) -> bool { + // NOTE(emilio): Slot assignment and such works per-document, but + // getting a document around here is not trivial, and it's not worth + // anyway to handle this in a per-doc basis. + unsafe { structs::nsContentUtils_sIsWebComponentsEnabled } + } + fn pseudo_element_allows_single_colon(name: &str) -> bool { // FIXME: -moz-tree check should probably be ascii-case-insensitive. ::selectors::parser::is_css2_pseudo_element(name) || |