mirror of
https://github.com/servo/servo.git
synced 2025-08-03 12:40:06 +01:00
PropertyDeclarationParseResult -> Result<(), PropertyDeclarationParseError>
This commit is contained in:
parent
da6316fbe3
commit
7455ad5eb4
5 changed files with 30 additions and 45 deletions
|
@ -205,7 +205,6 @@ impl Declaration {
|
|||
///
|
||||
/// https://drafts.csswg.org/css-conditional-3/#support-definition
|
||||
pub fn eval(&self, cx: &ParserContext) -> bool {
|
||||
use properties::PropertyDeclarationParseResult::*;
|
||||
let id = if let Ok(id) = PropertyId::parse((&*self.prop).into()) {
|
||||
id
|
||||
} else {
|
||||
|
@ -219,13 +218,6 @@ impl Declaration {
|
|||
if !input.is_exhausted() {
|
||||
return false;
|
||||
}
|
||||
match res {
|
||||
UnknownProperty => false,
|
||||
ExperimentalProperty => false, // only happens for experimental props
|
||||
// that haven't been enabled
|
||||
InvalidValue => false,
|
||||
AnimationPropertyInKeyframeBlock => unreachable!(),
|
||||
ValidOrIgnoredDeclaration => true,
|
||||
}
|
||||
res.is_ok()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue