mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Accept argument-less tree pseudo-element selector.
This commit is contained in:
parent
a2182f8dc3
commit
b743d68ccd
3 changed files with 46 additions and 20 deletions
|
@ -379,6 +379,13 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
fn parse_pseudo_element(&self, location: SourceLocation, name: CowRcStr<'i>)
|
||||
-> Result<PseudoElement, ParseError<'i>> {
|
||||
PseudoElement::from_slice(&name, self.in_user_agent_stylesheet())
|
||||
.or_else(|| {
|
||||
if name.starts_with("-moz-tree-") {
|
||||
PseudoElement::tree_pseudo_element(&name, Box::new([]))
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.ok_or(location.new_custom_error(SelectorParseErrorKind::UnsupportedPseudoClassOrElement(name.clone())))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue