style: Make border-spacing serialization consistent, and move it to precomputed_type.

This commit is contained in:
Emilio Cobos Álvarez 2017-09-15 19:29:34 +02:00
parent f9c06d7932
commit 2ac1327e4b
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
21 changed files with 200 additions and 219 deletions

View file

@ -719,8 +719,8 @@ pub mod basic_shape {
/// Set this `BorderRadius` into a given `nsStyleCoord`.
pub fn set_corners(&self, other: &mut nsStyleCorners) {
let mut set_corner = |field: &BorderCornerRadius, index| {
field.0.width.to_gecko_style_coord(&mut other.data_at_mut(index));
field.0.height.to_gecko_style_coord(&mut other.data_at_mut(index + 1));
field.0.width().to_gecko_style_coord(&mut other.data_at_mut(index));
field.0.height().to_gecko_style_coord(&mut other.data_at_mut(index + 1));
};
set_corner(&self.top_left, 0);
set_corner(&self.top_right, 2);