Bug 1343751 - Pass transition-timing-function into gecko struct. r?emilio draft
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Fri, 03 Mar 2017 06:50:37 +0900
changeset 492183 b8a121eaac53fe22b4fa5bd9ff63a03bb09a2e31
parent 492182 70f9295e33e13fd58ea87a905315b41299a3225d
child 492184 b07f36512778ec73575a0b024052fc287aaeb5c0
push id47550
push userhikezoe@mozilla.com
push dateThu, 02 Mar 2017 21:55:07 +0000
reviewersemilio
bugs1343751
milestone54.0a1
Bug 1343751 - Pass transition-timing-function into gecko struct. r?emilio MozReview-Commit-ID: 8AmCDR2zZ7c
servo/components/style/properties/gecko.mako.rs
--- a/servo/components/style/properties/gecko.mako.rs
+++ b/servo/components/style/properties/gecko.mako.rs
@@ -617,17 +617,16 @@ impl Debug for ${style_struct.gecko_stru
     force_stub += ["list-style-type"]
 
     # These are part of shorthands so we must include them in stylo builds,
     # but we haven't implemented the stylo glue for the longhand
     # so we generate a stub
     force_stub += ["flex-basis", # position
 
                    # transition
-                   "transition-timing-function",
                    "transition-property",
                    ]
 
     # Types used with predefined_type()-defined properties that we can auto-generate.
     predefined_types = {
         "length::LengthOrAuto": impl_style_coord,
         "length::LengthOrNormal": impl_style_coord,
         "Length": impl_absolute_length,
@@ -1363,16 +1362,20 @@ fn static_assert() {
 <%def name="impl_transition_time_value(ident, gecko_ffi_name)">
     ${impl_animation_or_transition_time_value('transition', ident, gecko_ffi_name)}
 </%def>
 
 <%def name="impl_copy_animation_value(ident, gecko_ffi_name)">
     ${impl_copy_animation_or_transition_value('animation', ident, gecko_ffi_name)}
 </%def>
 
+<%def name="impl_transition_timing_function()">
+    ${impl_animation_or_transition_timing_function('transition')}
+</%def>
+
 <%def name="impl_animation_count(ident, gecko_ffi_name)">
     ${impl_animation_or_transition_count('animation', ident, gecko_ffi_name)}
 </%def>
 
 <%def name="impl_animation_time_value(ident, gecko_ffi_name)">
     ${impl_animation_or_transition_time_value('animation', ident, gecko_ffi_name)}
 </%def>
 
@@ -1416,16 +1419,17 @@ fn static_assert() {
     ${impl_copy_animation_value(ident, gecko_ffi_name)}
 </%def>
 
 <% skip_box_longhands= """display overflow-y vertical-align
                           animation-name animation-delay animation-duration
                           animation-direction animation-fill-mode animation-play-state
                           animation-iteration-count animation-timing-function
                           transition-duration transition-delay
+                          transition-timing-function
                           page-break-before page-break-after
                           scroll-snap-points-x scroll-snap-points-y transform
                           scroll-snap-type-y scroll-snap-coordinate
                           perspective-origin transform-origin""" %>
 <%self:impl_trait style_struct_name="Box" skip_longhands="${skip_box_longhands}">
 
     // We manually-implement the |display| property until we get general
     // infrastructure for preffing certain values.
@@ -1761,16 +1765,17 @@ fn static_assert() {
             result.push(servo);
             unsafe { cur = (&*cur).mNext };
         }
         computed_value::T(Some(result))
     }
 
     ${impl_transition_time_value('delay', 'Delay')}
     ${impl_transition_time_value('duration', 'Duration')}
+    ${impl_transition_timing_function()}
 
     pub fn set_animation_name(&mut self, v: longhands::animation_name::computed_value::T) {
         use nsstring::nsCString;
         unsafe { self.gecko.mAnimations.ensure_len(v.0.len()) };
 
         if v.0.len() > 0 {
             self.gecko.mAnimationNameCount = v.0.len() as u32;
             for (servo, gecko) in v.0.into_iter().zip(self.gecko.mAnimations.iter_mut()) {