Skip to content

Commit bedab74

Browse files
authored
servo: Add support for parsing :is() and :where() (#80)
Stylo supports these and they just need to be turned on. Signed-off-by: Martin Robinson <[email protected]>
1 parent 1c069c5 commit bedab74

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

style/servo/selector_parser.rs

+25
Original file line numberDiff line numberDiff line change
@@ -494,6 +494,31 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
494494
type Impl = SelectorImpl;
495495
type Error = StyleParseErrorKind<'i>;
496496

497+
#[inline]
498+
fn parse_nth_child_of(&self) -> bool {
499+
false
500+
}
501+
502+
#[inline]
503+
fn parse_is_and_where(&self) -> bool {
504+
true
505+
}
506+
507+
#[inline]
508+
fn parse_has(&self) -> bool {
509+
false
510+
}
511+
512+
#[inline]
513+
fn parse_parent_selector(&self) -> bool {
514+
false
515+
}
516+
517+
#[inline]
518+
fn allow_forgiving_selectors(&self) -> bool {
519+
!self.for_supports_rule
520+
}
521+
497522
fn parse_non_ts_pseudo_class(
498523
&self,
499524
location: SourceLocation,

0 commit comments

Comments
 (0)