From 6306cc7e2d75f29fec92993df41de925de85baca Mon Sep 17 00:00:00 2001 From: Xidorn Quan Date: Wed, 23 May 2018 13:58:38 +1000 Subject: [PATCH] style: Ensure modified_reset is set when {mutate,take}_reset_struct is called. Bug: 1463603 Reviewed-by: heycam MozReview-Commit-ID: 8mqVb7kl0ok --- components/style/properties/properties.mako.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/style/properties/properties.mako.rs b/components/style/properties/properties.mako.rs index f28c04e795b..ba38d9532d0 100644 --- a/components/style/properties/properties.mako.rs +++ b/components/style/properties/properties.mako.rs @@ -3199,6 +3199,7 @@ impl<'a> StyleBuilder<'a> { % endif % endif % endfor + <% del property %> /// Inherits style from the parent element, accounting for the default /// computed values that need to be provided as well. @@ -3256,7 +3257,7 @@ impl<'a> StyleBuilder<'a> { /// Gets a mutable view of the current `${style_struct.name}` style. pub fn mutate_${style_struct.name_lower}(&mut self) -> &mut style_structs::${style_struct.name} { - % if not property.style_struct.inherited: + % if not style_struct.inherited: self.modified_reset = true; % endif self.${style_struct.ident}.mutate() @@ -3264,7 +3265,7 @@ impl<'a> StyleBuilder<'a> { /// Gets a mutable view of the current `${style_struct.name}` style. pub fn take_${style_struct.name_lower}(&mut self) -> UniqueArc { - % if not property.style_struct.inherited: + % if not style_struct.inherited: self.modified_reset = true; % endif self.${style_struct.ident}.take() @@ -3288,6 +3289,7 @@ impl<'a> StyleBuilder<'a> { StyleStructRef::Borrowed(self.reset_style.${style_struct.name_lower}_arc()); } % endfor + <% del style_struct %> /// Returns whether this computed style represents a floated object. pub fn floated(&self) -> bool {