mirror of
https://github.com/servo/servo.git
synced 2025-08-07 22:45:34 +01:00
implements nsStyleBorder type properties animatable
This commit is contained in:
parent
0555977c66
commit
699ec02e8b
2 changed files with 25 additions and 1 deletions
|
@ -1020,6 +1020,30 @@ fn static_assert() {
|
|||
structs::Side::eSide${to_camel_case(side.ident)});
|
||||
}
|
||||
}
|
||||
|
||||
#[allow(non_snake_case)]
|
||||
pub fn clone__moz_border_${side.ident}_colors(&self)
|
||||
-> longhands::_moz_border_${side.ident}_colors::computed_value::T {
|
||||
use self::longhands::_moz_border_${side.ident}_colors::computed_value::T;
|
||||
|
||||
let mut gecko_colors =
|
||||
unsafe { bindings::Gecko_GetMozBorderColors(&self.gecko,
|
||||
structs::Side::eSide${to_camel_case(side.ident)}) };
|
||||
|
||||
if gecko_colors.is_null() {
|
||||
return T(None);
|
||||
}
|
||||
|
||||
let mut colors = Vec::new();
|
||||
loop {
|
||||
unsafe {
|
||||
colors.push(convert_nscolor_to_rgba((*gecko_colors).mColor));
|
||||
if (*gecko_colors).mNext.is_null() { break; }
|
||||
gecko_colors = (*gecko_colors).mNext;
|
||||
}
|
||||
}
|
||||
T(Some(colors))
|
||||
}
|
||||
% endfor
|
||||
|
||||
% for corner in CORNERS:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue