Skip to content

Commit

Permalink
stylo: call update_border_foo when inheriting borders too
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed Jul 26, 2017
1 parent 020188f commit 68d67ef
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions components/style/properties/gecko.mako.rs
Expand Up @@ -378,10 +378,13 @@ impl ${style_struct.gecko_struct_name} {
}
</%def>

<%def name="impl_simple_copy(ident, gecko_ffi_name, *kwargs)">
<%def name="impl_simple_copy(ident, gecko_ffi_name, on_set=None, *kwargs)">
#[allow(non_snake_case)]
pub fn copy_${ident}_from(&mut self, other: &Self) {
self.gecko.${gecko_ffi_name} = other.gecko.${gecko_ffi_name};
% if on_set:
self.${on_set}();
% endif
}
</%def>

Expand Down Expand Up @@ -478,7 +481,7 @@ def set_gecko_property(ffi_name, expr):

<%def name="impl_keyword(ident, gecko_ffi_name, keyword, need_clone, cast_type='u8', **kwargs)">
<%call expr="impl_keyword_setter(ident, gecko_ffi_name, keyword, cast_type, **kwargs)"></%call>
<%call expr="impl_simple_copy(ident, gecko_ffi_name)"></%call>
<%call expr="impl_simple_copy(ident, gecko_ffi_name, **kwargs)"></%call>
%if need_clone:
<%call expr="impl_keyword_clone(ident, gecko_ffi_name, keyword, cast_type)"></%call>
% endif
Expand Down

0 comments on commit 68d67ef

Please sign in to comment.