Use generics for border-image-slice property

This commit is contained in:
Anthony Ramine 2017-05-23 10:56:03 +02:00
parent c8eb277ca5
commit 078d4ed40c
8 changed files with 77 additions and 157 deletions

View file

@ -1020,9 +1020,9 @@ fn static_assert() {
pub fn set_border_image_slice(&mut self, v: longhands::border_image_slice::computed_value::T) {
use gecko_bindings::structs::{NS_STYLE_BORDER_IMAGE_SLICE_NOFILL, NS_STYLE_BORDER_IMAGE_SLICE_FILL};
for (i, corner) in v.corners.iter().enumerate() {
corner.to_gecko_style_coord(&mut self.gecko.mBorderImageSlice.data_at_mut(i));
}
% for side in SIDES:
v.offsets.${side.ident}.to_gecko_style_coord(&mut self.gecko.mBorderImageSlice.data_at_mut(${side.index}));
% endfor
let fill = if v.fill {
NS_STYLE_BORDER_IMAGE_SLICE_FILL