mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Cherry-pick some parts of the cssparser update.
This commit is contained in:
parent
f7c5df5703
commit
7513bc293e
3 changed files with 8 additions and 8 deletions
|
@ -193,18 +193,18 @@ impl PseudoElement {
|
|||
% for pseudo in SIMPLE_PSEUDOS:
|
||||
"${pseudo.value[1:]}" => {
|
||||
return Some(${pseudo_element_variant(pseudo)})
|
||||
}
|
||||
},
|
||||
% endfor
|
||||
// Alias some legacy prefixed pseudos to their standardized name at parse time:
|
||||
"-moz-selection" => {
|
||||
return Some(PseudoElement::Selection);
|
||||
}
|
||||
},
|
||||
"-moz-placeholder" => {
|
||||
return Some(PseudoElement::Placeholder);
|
||||
}
|
||||
},
|
||||
"-moz-list-bullet" | "-moz-list-number" => {
|
||||
return Some(PseudoElement::Marker);
|
||||
}
|
||||
},
|
||||
_ => {
|
||||
if starts_with_ignore_ascii_case(name, "-moz-tree-") {
|
||||
return PseudoElement::tree_pseudo_element(name, Box::new([]))
|
||||
|
|
|
@ -396,7 +396,7 @@ impl<'a, 'i> ::selectors::Parser<'i> for SelectorParser<'a> {
|
|||
parser,
|
||||
)?.into()
|
||||
)
|
||||
}
|
||||
},
|
||||
_ => return Err(parser.new_custom_error(
|
||||
SelectorParseErrorKind::UnsupportedPseudoClassOrElement(name.clone())
|
||||
))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue