style: Standardize different methods to inherit and reset properties.

This avoids special-casing justify-items.

MozReview-Commit-ID: FoEs2IHC1t6
Signed-off-by: Emilio Cobos Álvarez <emilio@crisal.io>
This commit is contained in:
Emilio Cobos Álvarez 2017-07-27 15:42:05 +02:00
parent 2d9255bff1
commit 0e4c7c3722
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 266 additions and 15 deletions

View file

@ -917,6 +917,15 @@
</%def>
</%self:logical_setter_helper>
}
/// Copy the appropriate physical property from another struct for ${name}
/// given a writing mode.
pub fn reset_${to_rust_ident(name)}(&mut self,
other: &Self,
wm: WritingMode) {
self.copy_${to_rust_ident(name)}_from(other, wm)
}
% if need_clone:
/// Get the computed value for the appropriate physical property for
/// ${name} given a writing mode.