diff --git a/components/style/gecko/selector_parser.rs b/components/style/gecko/selector_parser.rs index adb410908b9..a46068d923a 100644 --- a/components/style/gecko/selector_parser.rs +++ b/components/style/gecko/selector_parser.rs @@ -354,7 +354,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> { #[inline] fn parse_is_and_where(&self) -> bool { - static_prefs::pref!("layout.css.is-where-selectors.enabled") + self.in_user_agent_stylesheet() || static_prefs::pref!("layout.css.is-where-selectors.enabled") } #[inline]