mirror of
https://github.com/servo/servo.git
synced 2025-08-15 10:25:32 +01:00
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:
parent
2d9255bff1
commit
0e4c7c3722
3 changed files with 266 additions and 15 deletions
|
@ -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.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue