Skip to content
Permalink
Browse files

Cherry-pick some parts of the cssparser update.

  • Loading branch information
emilio committed Dec 16, 2019
1 parent f7c5df5 commit 7513bc293e0e515dd4e9e56b8ede32b68b8c8186
@@ -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())
))
@@ -691,11 +691,11 @@ fn parse_baseline<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignFlags, Pars
"first" => {
input.expect_ident_matching("baseline")?;
Ok(AlignFlags::BASELINE)
}
},
"last" => {
input.expect_ident_matching("baseline")?;
Ok(AlignFlags::LAST_BASELINE)
}
},
}
}

@@ -794,7 +794,7 @@ fn parse_legacy<'i, 't>(input: &mut Parser<'i, 't>) -> Result<AlignFlags, ParseE
.unwrap_or(AlignFlags::empty());

return Ok(AlignFlags::LEGACY | flags)
}
},
"left" => AlignFlags::LEFT,
"right" => AlignFlags::RIGHT,
"center" => AlignFlags::CENTER,

0 comments on commit 7513bc2

Please sign in to comment.
You can’t perform that action at this time.