mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Make Rect<T> a struct tuple
It makes no sense to have named fields in some cases, notably to reuse Rect<T> in BorderRadius<T>.
This commit is contained in:
parent
4ec2e8b4c5
commit
4144dc74db
5 changed files with 41 additions and 55 deletions
|
@ -964,7 +964,7 @@ fn static_assert() {
|
|||
|
||||
pub fn set_border_image_outset(&mut self, v: longhands::border_image_outset::computed_value::T) {
|
||||
% for side in SIDES:
|
||||
v.${side.ident}.to_gecko_style_coord(&mut self.gecko.mBorderImageOutset.data_at_mut(${side.index}));
|
||||
v.${side.index}.to_gecko_style_coord(&mut self.gecko.mBorderImageOutset.data_at_mut(${side.index}));
|
||||
% endfor
|
||||
}
|
||||
|
||||
|
@ -1001,7 +1001,7 @@ fn static_assert() {
|
|||
use values::generics::border::BorderImageWidthSide;
|
||||
|
||||
% for side in SIDES:
|
||||
match v.${side.ident} {
|
||||
match v.${side.index} {
|
||||
BorderImageWidthSide::Auto => {
|
||||
self.gecko.mBorderImageWidth.data_at_mut(${side.index}).set_value(CoordDataValue::Auto)
|
||||
},
|
||||
|
@ -1026,7 +1026,7 @@ fn static_assert() {
|
|||
use gecko_bindings::structs::{NS_STYLE_BORDER_IMAGE_SLICE_NOFILL, NS_STYLE_BORDER_IMAGE_SLICE_FILL};
|
||||
|
||||
% for side in SIDES:
|
||||
v.offsets.${side.ident}.to_gecko_style_coord(&mut self.gecko.mBorderImageSlice.data_at_mut(${side.index}));
|
||||
v.offsets.${side.index}.to_gecko_style_coord(&mut self.gecko.mBorderImageSlice.data_at_mut(${side.index}));
|
||||
% endfor
|
||||
|
||||
let fill = if v.fill {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue