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:
Emilio Cobos Álvarez 2018-06-04 20:57:49 +02:00
parent 7529788375
commit 915c8725ae
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
5 changed files with 47 additions and 42 deletions

View file

@ -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 {