Bug 1401256 - Update inherited prop state for animation. r=heycam draft
authorJ. Ryan Stinnett <jryans@gmail.com>
Wed, 20 Sep 2017 14:21:21 -0500
changeset 667794 508bf8b13bd4b9856e90483ca8182576a19cc5fc
parent 667793 41dfdf9a2586571c49609c38666e5a6fc53e3d95
child 732514 845ff71acf0bfac09fa7b9c17f77e9124192339d
push id80850
push userbmo:jryans@gmail.com
push dateWed, 20 Sep 2017 19:30:52 +0000
reviewersheycam
bugs1401256
milestone57.0a1
Bug 1401256 - Update inherited prop state for animation. r=heycam `AnimationValue` has its own path for conversion to computed values, so we need to update `for_non_inherited_property` in the context to match the property being converted. I didn't notice any other generic conversions, so hopefully this is the only missing path. MozReview-Commit-ID: HskrpMctmYE
servo/components/style/properties/helpers/animated_properties.mako.rs
--- a/servo/components/style/properties/helpers/animated_properties.mako.rs
+++ b/servo/components/style/properties/helpers/animated_properties.mako.rs
@@ -571,16 +571,22 @@ impl AnimationValue {
         initial: &ComputedValues
     ) -> Option<Self> {
         use properties::LonghandId;
 
         match *decl {
             % for prop in data.longhands:
             % if prop.animatable:
             PropertyDeclaration::${prop.camel_case}(ref val) => {
+                context.for_non_inherited_property =
+                    % if prop.style_struct.inherited:
+                        None;
+                    % else:
+                        Some(LonghandId::${prop.camel_case});
+                    % endif
             % if prop.ident in SYSTEM_FONT_LONGHANDS and product == "gecko":
                 if let Some(sf) = val.get_system() {
                     longhands::system_font::resolve_system_font(sf, context);
                 }
             % endif
             % if prop.boxed:
             let computed = (**val).to_computed_value(context);
             % else: