mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
Use all for the default value of transition-property in transition
This commit is contained in:
parent
26fd65995d
commit
6e36a62c8c
3 changed files with 10 additions and 20 deletions
|
@ -748,6 +748,10 @@ ${helpers.single_keyword("overflow-x", "visible hidden scroll auto",
|
||||||
SpecifiedValue::parse(input)
|
SpecifiedValue::parse(input)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn get_initial_specified_value() -> SpecifiedValue {
|
||||||
|
TransitionProperty::All
|
||||||
|
}
|
||||||
|
|
||||||
use values::HasViewportPercentage;
|
use values::HasViewportPercentage;
|
||||||
no_viewport_percentage!(SpecifiedValue);
|
no_viewport_percentage!(SpecifiedValue);
|
||||||
|
|
||||||
|
|
|
@ -70,19 +70,22 @@ macro_rules! try_parse_one {
|
||||||
let mut ${prop} = None;
|
let mut ${prop} = None;
|
||||||
% endfor
|
% endfor
|
||||||
|
|
||||||
|
let mut parsed = 0;
|
||||||
loop {
|
loop {
|
||||||
|
parsed += 1;
|
||||||
|
|
||||||
try_parse_one!(input, property, transition_property);
|
try_parse_one!(input, property, transition_property);
|
||||||
try_parse_one!(context, input, duration, transition_duration);
|
try_parse_one!(context, input, duration, transition_duration);
|
||||||
try_parse_one!(context, input, timing_function, transition_timing_function);
|
try_parse_one!(context, input, timing_function, transition_timing_function);
|
||||||
try_parse_one!(context, input, delay, transition_delay);
|
try_parse_one!(context, input, delay, transition_delay);
|
||||||
|
|
||||||
|
parsed -= 1;
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(property) = property {
|
if parsed != 0 {
|
||||||
Ok(SingleTransition {
|
Ok(SingleTransition {
|
||||||
transition_property: property,
|
% for prop in "property duration timing_function delay".split():
|
||||||
% for prop in "duration timing_function delay".split():
|
|
||||||
transition_${prop}: ${prop}.unwrap_or_else(transition_${prop}::single_value
|
transition_${prop}: ${prop}.unwrap_or_else(transition_${prop}::single_value
|
||||||
::get_initial_specified_value),
|
::get_initial_specified_value),
|
||||||
% endfor
|
% endfor
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue