text-overflow accepts only valid values for the second part of value

Fixes: https://github.com/servo/servo/issues/15491
This commit is contained in:
Abhishek Kumar 2017-03-12 03:58:51 +05:30
parent 2f8cf6afc3
commit c7ed931276
2 changed files with 11 additions and 1 deletions

View file

@ -51,7 +51,7 @@
}
pub fn parse(context: &ParserContext, input: &mut Parser) -> Result<SpecifiedValue, ()> {
let first = try!(Side::parse(context, input));
let second = Side::parse(context, input).ok();
let second = input.try(|input| Side::parse(context, input)).ok();
Ok(SpecifiedValue {
first: first,
second: second,