Auto merge of #16563 - nox:transition, r=hiikezoe

Use all for the default value of transition-property in transition

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16563)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2017-04-22 07:24:25 -05:00 committed by GitHub
commit 55e2caba4c
3 changed files with 10 additions and 20 deletions

View file

@ -749,6 +749,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
SpecifiedValue::parse(input)
}
pub fn get_initial_specified_value() -> SpecifiedValue {
TransitionProperty::All
}
use values::HasViewportPercentage;
no_viewport_percentage!(SpecifiedValue);

View file

@ -70,19 +70,22 @@ macro_rules! try_parse_one {
let mut ${prop} = None;
% endfor
let mut parsed = 0;
loop {
parsed += 1;
try_parse_one!(input, property, transition_property);
try_parse_one!(context, input, duration, transition_duration);
try_parse_one!(context, input, timing_function, transition_timing_function);
try_parse_one!(context, input, delay, transition_delay);
parsed -= 1;
break
}
if let Some(property) = property {
if parsed != 0 {
Ok(SingleTransition {
transition_property: property,
% for prop in "duration timing_function delay".split():
% for prop in "property duration timing_function delay".split():
transition_${prop}: ${prop}.unwrap_or_else(transition_${prop}::single_value
::get_initial_specified_value),
% endfor

View file

@ -1,17 +0,0 @@
[transition-001.htm]
type: testharness
[parse '1s']
expected: FAIL
[parse '1s 2s']
expected: FAIL
[parse '1s 2s ease-in']
expected: FAIL
[parse '1s ease-in 2s']
expected: FAIL
[parse 'ease-in 1s 2s']
expected: FAIL