diff --git a/components/style/properties/longhand/box.mako.rs b/components/style/properties/longhand/box.mako.rs index d6a7f015e50..3a02b6c656d 100644 --- a/components/style/properties/longhand/box.mako.rs +++ b/components/style/properties/longhand/box.mako.rs @@ -507,16 +507,17 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto", Ok(TransitionTimingFunction::CubicBezier(p1, p2)) }, "steps" => { - let (mut step_count, mut start_end) = (0, computed_value::StartEnd::Start); + let (mut step_count, mut start_end) = (0, computed_value::StartEnd::End); try!(input.parse_nested_block(|input| { step_count = try!(specified::parse_integer(input)); - try!(input.expect_comma()); - start_end = try!(match_ignore_ascii_case! { - try!(input.expect_ident()), - "start" => Ok(computed_value::StartEnd::Start), - "end" => Ok(computed_value::StartEnd::End), - _ => Err(()) - }); + if input.try(|input| input.expect_comma()).is_ok() { + start_end = try!(match_ignore_ascii_case! { + try!(input.expect_ident()), + "start" => Ok(computed_value::StartEnd::Start), + "end" => Ok(computed_value::StartEnd::End), + _ => Err(()) + }); + } Ok(()) })); Ok(TransitionTimingFunction::Steps(step_count as u32, start_end)) diff --git a/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-timing-function-001.htm.ini b/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-timing-function-001.htm.ini index 1d3aaf317a8..e5ec8603b1e 100644 --- a/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-timing-function-001.htm.ini +++ b/tests/wpt/metadata-css/css-transitions-1_dev/html/transition-timing-function-001.htm.ini @@ -1,8 +1,5 @@ [transition-timing-function-001.htm] type: testharness - [parse 'steps(3)'] - expected: FAIL - [parse 'cubic-bezier(-0.1, -0.2, -0.3, -0.4)'] expected: FAIL