mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
style: Disallow forgiving selector-parsing in @supports
As per spec, see https://github.com/w3c/csswg-drafts/issues/7280 Differential Revision: https://phabricator.services.mozilla.com/D156468
This commit is contained in:
parent
ab36c8a39b
commit
9f6341b83a
6 changed files with 25 additions and 23 deletions
|
@ -320,6 +320,11 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
function.eq_ignore_ascii_case("-moz-any")
|
||||
}
|
||||
|
||||
#[inline]
|
||||
fn allow_forgiving_selectors(&self) -> bool {
|
||||
!self.for_supports_rule
|
||||
}
|
||||
|
||||
fn parse_non_ts_pseudo_class(
|
||||
&self,
|
||||
location: SourceLocation,
|
||||
|
@ -373,7 +378,8 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
location: SourceLocation,
|
||||
name: CowRcStr<'i>,
|
||||
) -> Result<PseudoElement, ParseError<'i>> {
|
||||
if let Some(pseudo) = PseudoElement::from_slice(&name) {
|
||||
let allow_unkown_webkit = !self.for_supports_rule;
|
||||
if let Some(pseudo) = PseudoElement::from_slice(&name, allow_unkown_webkit) {
|
||||
if self.is_pseudo_element_enabled(&pseudo) {
|
||||
return Ok(pseudo);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue