mirror of
https://github.com/servo/servo.git
synced 2025-08-08 23:15:33 +01:00
Thread ParseError return values through CSS parsing.
This commit is contained in:
parent
58e39bfffa
commit
27ae1ef2e7
121 changed files with 2133 additions and 1505 deletions
|
@ -46,14 +46,15 @@ ${helpers.predefined_type("outline-color", "Color", "computed_value::T::currentc
|
|||
pub type T = super::SpecifiedValue;
|
||||
}
|
||||
|
||||
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
|
||||
pub fn parse<'i, 't>(context: &ParserContext, input: &mut Parser<'i, 't>)
|
||||
-> Result<SpecifiedValue, ParseError<'i>> {
|
||||
SpecifiedValue::parse(context, input)
|
||||
.and_then(|result| {
|
||||
if let Either::Second(BorderStyle::hidden) = result {
|
||||
// The outline-style property accepts the same values as
|
||||
// border-style, except that 'hidden' is not a legal outline
|
||||
// style.
|
||||
Err(())
|
||||
Err(SelectorParseError::UnexpectedIdent("hidden".into()).into())
|
||||
} else {
|
||||
Ok(result)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue