style: Fix Geckolib build.

This commit is contained in:
Emilio Cobos Álvarez 2017-03-27 04:05:15 +02:00
parent bcd107967b
commit 9e2977d49e
No known key found for this signature in database
GPG key ID: 056B727BB9C1027C
3 changed files with 9 additions and 7 deletions

View file

@ -1355,8 +1355,8 @@ fn static_assert() {
#[allow(non_snake_case)]
pub fn ${type}_${ident}_at(&self, index: usize)
-> longhands::${type}_${ident}::computed_value::SingleComputedValue {
use values::specified::Time;
Time(self.gecko.m${type.capitalize()}s[index].m${gecko_ffi_name} / 1000.)
use values::computed::Time;
Time::from_seconds(self.gecko.m${type.capitalize()}s[index].m${gecko_ffi_name} / 1000.)
}
${impl_animation_or_transition_count(type, ident, gecko_ffi_name)}
${impl_copy_animation_or_transition_value(type, ident, gecko_ffi_name)}
@ -1664,7 +1664,7 @@ fn static_assert() {
"length" : "bindings::Gecko_CSSValue_SetAbsoluteLength(%s, %s.0)",
"percentage" : "bindings::Gecko_CSSValue_SetPercentage(%s, %s)",
"lop" : "%s.set_lop(%s)",
"angle" : "bindings::Gecko_CSSValue_SetAngle(%s, %s.0)",
"angle" : "bindings::Gecko_CSSValue_SetAngle(%s, %s.radians())",
"number" : "bindings::Gecko_CSSValue_SetNumber(%s, %s)",
}
%>
@ -1738,7 +1738,7 @@ fn static_assert() {
css_value_getters = {
"length" : "Au(bindings::Gecko_CSSValue_GetAbsoluteLength(%s))",
"lop" : "%s.get_lop()",
"angle" : "Angle(bindings::Gecko_CSSValue_GetAngle(%s))",
"angle" : "Angle::from_radians(bindings::Gecko_CSSValue_GetAngle(%s))",
"number" : "bindings::Gecko_CSSValue_GetNumber(%s)",
}
%>