mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
style: Properly handle exhaustive matches in animation keywords to avoid a warning.
Need to do the gecko_inexhaustive thing because those animation properties have an EndGuard_ generated by IPDL I suspect.
This commit is contained in:
parent
67fae7a2ce
commit
20d9a076d4
2 changed files with 4 additions and 0 deletions
|
@ -3000,7 +3000,9 @@ fn static_assert() {
|
||||||
% for value in keyword.gecko_values():
|
% for value in keyword.gecko_values():
|
||||||
structs::${keyword.gecko_constant(value)} => Keyword::${to_camel_case(value)},
|
structs::${keyword.gecko_constant(value)} => Keyword::${to_camel_case(value)},
|
||||||
% endfor
|
% endfor
|
||||||
|
% if keyword.gecko_inexhaustive:
|
||||||
_ => panic!("Found unexpected value for animation-${ident}"),
|
_ => panic!("Found unexpected value for animation-${ident}"),
|
||||||
|
% endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
${impl_animation_count(ident, gecko_ffi_name)}
|
${impl_animation_count(ident, gecko_ffi_name)}
|
||||||
|
|
|
@ -247,6 +247,7 @@ ${helpers.single_keyword(
|
||||||
gecko_enum_prefix="PlaybackDirection",
|
gecko_enum_prefix="PlaybackDirection",
|
||||||
custom_consts=animation_direction_custom_consts,
|
custom_consts=animation_direction_custom_consts,
|
||||||
extra_prefixes=animation_extra_prefixes,
|
extra_prefixes=animation_extra_prefixes,
|
||||||
|
gecko_inexhaustive=True,
|
||||||
spec="https://drafts.csswg.org/css-animations/#propdef-animation-direction",
|
spec="https://drafts.csswg.org/css-animations/#propdef-animation-direction",
|
||||||
allowed_in_keyframe_block=False,
|
allowed_in_keyframe_block=False,
|
||||||
)}
|
)}
|
||||||
|
@ -271,6 +272,7 @@ ${helpers.single_keyword(
|
||||||
vector=True,
|
vector=True,
|
||||||
gecko_enum_prefix="FillMode",
|
gecko_enum_prefix="FillMode",
|
||||||
extra_prefixes=animation_extra_prefixes,
|
extra_prefixes=animation_extra_prefixes,
|
||||||
|
gecko_inexhaustive=True,
|
||||||
spec="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode",
|
spec="https://drafts.csswg.org/css-animations/#propdef-animation-fill-mode",
|
||||||
allowed_in_keyframe_block=False,
|
allowed_in_keyframe_block=False,
|
||||||
)}
|
)}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue