mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
style: Remove PropertyId::name.
It's only used for the error path in property parsing, so most of the time is not useful. Use the just-introduced NonCustomPropertyId::name to preserve the alias name, which we were doing by passing the name around. Bug: 1466645 Reviewed-by: xidorn MozReview-Commit-ID: 46xxZKCoeBB
This commit is contained in:
parent
7529788375
commit
915c8725ae
5 changed files with 47 additions and 42 deletions
|
@ -177,7 +177,11 @@ pub enum ValueParseErrorKind<'i> {
|
|||
|
||||
impl<'i> StyleParseErrorKind<'i> {
|
||||
/// Create an InvalidValue parse error
|
||||
pub fn new_invalid(name: CowRcStr<'i>, value_error: ParseError<'i>) -> ParseError<'i> {
|
||||
pub fn new_invalid<S>(name: S, value_error: ParseError<'i>) -> ParseError<'i>
|
||||
where
|
||||
S: Into<CowRcStr<'i>>,
|
||||
{
|
||||
let name = name.into();
|
||||
let variant = match value_error.kind {
|
||||
cssparser::ParseErrorKind::Custom(StyleParseErrorKind::ValueError(e)) => {
|
||||
match e {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue