Add gecko_enum_prefix for animation-direction and animation-fill-mode. r?heycam draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Fri, 06 Jan 2017 19:06:53 +0900
changeset 456839 d72bfa93b092b6c54d999dde9b429503574c5da6
parent 456838 90bed2e59e5f9958ce238ef4e37414c84a582f8f
child 456840 1fd28a9fecb37f0c09fe2fc51a471f0cd8f6b7dd
push id40619
push userhiikezoe@mozilla-japan.org
push dateFri, 06 Jan 2017 10:07:41 +0000
reviewersheycam
milestone53.0a1
Add gecko_enum_prefix for animation-direction and animation-fill-mode. r?heycam MozReview-Commit-ID: DQ21i1o5TC9
servo/components/style/properties/longhand/box.mako.rs
--- a/servo/components/style/properties/longhand/box.mako.rs
+++ b/servo/components/style/properties/longhand/box.mako.rs
@@ -832,21 +832,24 @@
     #[inline]
     pub fn get_initial_value() -> computed_value::T {
         computed_value::T(vec![get_initial_single_value()])
     }
 
     impl ComputedValueAsSpecified for SpecifiedValue {}
 </%helpers:longhand>
 
+<% animation_direction_custom_consts = { "alternate-reverse": "Alternate_reverse" } %>
 ${helpers.single_keyword("animation-direction",
                          "normal reverse alternate alternate-reverse",
                          need_index=True,
                          animatable=False,
                          vector=True,
+                         gecko_enum_prefix="PlaybackDirection",
+                         custom_consts=animation_direction_custom_consts,
                          allowed_in_keyframe_block=False)}
 
 // animation-play-state is the exception to the rule for allowed_in_keyframe_block:
 // https://drafts.csswg.org/css-animations/#keyframes
 ${helpers.single_keyword("animation-play-state",
                          "running paused",
                          need_clone=True,
                          need_index=True,
@@ -854,16 +857,17 @@
                          vector=True,
                          allowed_in_keyframe_block=True)}
 
 ${helpers.single_keyword("animation-fill-mode",
                          "none forwards backwards both",
                          need_index=True,
                          animatable=False,
                          vector=True,
+                         gecko_enum_prefix="FillMode",
                          allowed_in_keyframe_block=False)}
 
 <%helpers:longhand name="animation-delay"
                    need_index="True"
                    animatable="False",
                    allowed_in_keyframe_block="False">
     pub use super::transition_duration::computed_value;
     pub use super::transition_duration::{get_initial_value, get_initial_single_value, parse};