mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
style: Make sure to honor parse_method in transition and animation shorthands.
Reviewed-by: birtles Bug: 1426312 MozReview-Commit-ID: HY3jtdSdaga
This commit is contained in:
parent
df0f9ad7ae
commit
cdb604ae69
1 changed files with 4 additions and 14 deletions
|
@ -97,18 +97,10 @@
|
||||||
</%helpers:shorthand>
|
</%helpers:shorthand>
|
||||||
|
|
||||||
macro_rules! try_parse_one {
|
macro_rules! try_parse_one {
|
||||||
($input: expr, $var: ident, $prop_module: ident) => {
|
|
||||||
if $var.is_none() {
|
|
||||||
if let Ok(value) = $input.try($prop_module::SingleSpecifiedValue::parse) {
|
|
||||||
$var = Some(value);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
($context: expr, $input: expr, $var: ident, $prop_module: ident) => {
|
($context: expr, $input: expr, $var: ident, $prop_module: ident) => {
|
||||||
if $var.is_none() {
|
if $var.is_none() {
|
||||||
if let Ok(value) = $input.try(|i| {
|
if let Ok(value) = $input.try(|i| {
|
||||||
$prop_module::SingleSpecifiedValue::parse($context, i)
|
$prop_module::single_value::parse($context, i)
|
||||||
}) {
|
}) {
|
||||||
$var = Some(value);
|
$var = Some(value);
|
||||||
continue;
|
continue;
|
||||||
|
@ -122,7 +114,6 @@ macro_rules! try_parse_one {
|
||||||
transition-timing-function
|
transition-timing-function
|
||||||
transition-delay"
|
transition-delay"
|
||||||
spec="https://drafts.csswg.org/css-transitions/#propdef-transition">
|
spec="https://drafts.csswg.org/css-transitions/#propdef-transition">
|
||||||
use parser::Parse;
|
|
||||||
% for prop in "delay duration property timing_function".split():
|
% for prop in "delay duration property timing_function".split():
|
||||||
use properties::longhands::transition_${prop};
|
use properties::longhands::transition_${prop};
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -265,7 +256,6 @@ macro_rules! try_parse_one {
|
||||||
props = "name duration timing_function delay iteration_count \
|
props = "name duration timing_function delay iteration_count \
|
||||||
direction fill_mode play_state".split()
|
direction fill_mode play_state".split()
|
||||||
%>
|
%>
|
||||||
use parser::Parse;
|
|
||||||
% for prop in props:
|
% for prop in props:
|
||||||
use properties::longhands::animation_${prop};
|
use properties::longhands::animation_${prop};
|
||||||
% endfor
|
% endfor
|
||||||
|
@ -296,9 +286,9 @@ macro_rules! try_parse_one {
|
||||||
try_parse_one!(context, input, timing_function, animation_timing_function);
|
try_parse_one!(context, input, timing_function, animation_timing_function);
|
||||||
try_parse_one!(context, input, delay, animation_delay);
|
try_parse_one!(context, input, delay, animation_delay);
|
||||||
try_parse_one!(context, input, iteration_count, animation_iteration_count);
|
try_parse_one!(context, input, iteration_count, animation_iteration_count);
|
||||||
try_parse_one!(input, direction, animation_direction);
|
try_parse_one!(context, input, direction, animation_direction);
|
||||||
try_parse_one!(input, fill_mode, animation_fill_mode);
|
try_parse_one!(context, input, fill_mode, animation_fill_mode);
|
||||||
try_parse_one!(input, play_state, animation_play_state);
|
try_parse_one!(context, input, play_state, animation_play_state);
|
||||||
try_parse_one!(context, input, name, animation_name);
|
try_parse_one!(context, input, name, animation_name);
|
||||||
|
|
||||||
parsed -= 1;
|
parsed -= 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue