Store COW strings in CSS parser errors when possible.

This commit is contained in:
Josh Matthews 2017-07-19 12:57:07 -04:00
parent 2bb4f65100
commit bbf3280fef
3 changed files with 3 additions and 3 deletions

View file

@ -1478,7 +1478,7 @@ impl PropertyDeclaration {
Ok(keyword) => DeclaredValueOwned::CSSWideKeyword(keyword),
Err(_) => match ::custom_properties::SpecifiedValue::parse(context, input) {
Ok(value) => DeclaredValueOwned::Value(value),
Err(_) => return Err(PropertyDeclarationParseError::InvalidValue(name.to_string())),
Err(_) => return Err(PropertyDeclarationParseError::InvalidValue(name.to_string().into())),
}
};
declarations.push(PropertyDeclaration::Custom(name, value));