CSS parsing error types: flatten nested enums more still

This commit is contained in:
Simon Sapin 2017-10-09 18:15:18 +02:00
parent 1a041084ce
commit c36ac69d48
6 changed files with 49 additions and 88 deletions

View file

@ -16,7 +16,6 @@ use servo_arc::Arc;
use shared_lock::{DeepCloneParams, DeepCloneWithLock, SharedRwLock, SharedRwLockReadGuard, Locked, ToCssWithGuard};
use std::fmt;
use style_traits::{PARSING_MODE_DEFAULT, ToCss, ParseError, StyleParseErrorKind};
use style_traits::PropertyDeclarationParseErrorKind;
use stylesheets::{CssRuleType, StylesheetContents};
use stylesheets::rule_parser::VendorPrefix;
use values::{KeyframesName, serialize_percentage};
@ -591,7 +590,7 @@ impl<'a, 'b, 'i> DeclarationParser<'i> for KeyframeDeclarationParser<'a, 'b> {
let property_context = PropertyParserContext::new(self.context);
let id = PropertyId::parse(&name, Some(&property_context)).map_err(|()| {
input.new_custom_error(PropertyDeclarationParseErrorKind::UnknownProperty(name.clone()))
input.new_custom_error(StyleParseErrorKind::UnknownProperty(name.clone()))
})?;
match PropertyDeclaration::parse_into(self.declarations, id, name, self.context, input) {
Ok(()) => {