mirror of
https://github.com/servo/servo.git
synced 2025-08-12 08:55:32 +01:00
Auto merge of #18525 - emilio:border-spacing, r=nox
style: various serialization fixes This should close https://github.com/servo/servo/pull/18458, and fix https://bugzilla.mozilla.org/show_bug.cgi?id=1397619. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/18525) <!-- Reviewable:end -->
This commit is contained in:
commit
f95da332a3
31 changed files with 346 additions and 289 deletions
|
@ -943,8 +943,8 @@ def set_gecko_property(ffi_name, expr):
|
|||
<%def name="impl_corner_style_coord(ident, gecko_ffi_name, x_index, y_index)">
|
||||
#[allow(non_snake_case)]
|
||||
pub fn set_${ident}(&mut self, v: longhands::${ident}::computed_value::T) {
|
||||
v.0.width.to_gecko_style_coord(&mut self.gecko.${gecko_ffi_name}.data_at_mut(${x_index}));
|
||||
v.0.height.to_gecko_style_coord(&mut self.gecko.${gecko_ffi_name}.data_at_mut(${y_index}));
|
||||
v.0.width().to_gecko_style_coord(&mut self.gecko.${gecko_ffi_name}.data_at_mut(${x_index}));
|
||||
v.0.height().to_gecko_style_coord(&mut self.gecko.${gecko_ffi_name}.data_at_mut(${y_index}));
|
||||
}
|
||||
#[allow(non_snake_case)]
|
||||
pub fn copy_${ident}_from(&mut self, other: &Self) {
|
||||
|
@ -4503,8 +4503,8 @@ fn static_assert() {
|
|||
skip_longhands="border-spacing">
|
||||
|
||||
pub fn set_border_spacing(&mut self, v: longhands::border_spacing::computed_value::T) {
|
||||
self.gecko.mBorderSpacingCol = v.horizontal.0.to_i32_au();
|
||||
self.gecko.mBorderSpacingRow = v.vertical.0.to_i32_au();
|
||||
self.gecko.mBorderSpacingCol = v.horizontal().0;
|
||||
self.gecko.mBorderSpacingRow = v.vertical().0;
|
||||
}
|
||||
|
||||
pub fn copy_border_spacing_from(&mut self, other: &Self) {
|
||||
|
@ -4517,10 +4517,10 @@ fn static_assert() {
|
|||
}
|
||||
|
||||
pub fn clone_border_spacing(&self) -> longhands::border_spacing::computed_value::T {
|
||||
longhands::border_spacing::computed_value::T {
|
||||
horizontal: Au(self.gecko.mBorderSpacingCol).into(),
|
||||
vertical: Au(self.gecko.mBorderSpacingRow).into()
|
||||
}
|
||||
longhands::border_spacing::computed_value::T::new(
|
||||
Au(self.gecko.mBorderSpacingCol).into(),
|
||||
Au(self.gecko.mBorderSpacingRow).into()
|
||||
)
|
||||
}
|
||||
</%self:impl_trait>
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue