mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +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
|
@ -76,11 +76,12 @@ ${helpers.single_keyword("-moz-window-shadow", "none default menu tooltip sheet"
|
|||
|
||||
impl ComputedValueAsSpecified for 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>> {
|
||||
match try!(input.expect_integer()) {
|
||||
0 => Ok(computed_value::T(false)),
|
||||
1 => Ok(computed_value::T(true)),
|
||||
_ => Err(()),
|
||||
_ => Err(StyleParseError::UnspecifiedError.into()),
|
||||
}
|
||||
}
|
||||
</%helpers:longhand>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue