mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
style: Fix Geckolib build.
This commit is contained in:
parent
bcd107967b
commit
9e2977d49e
3 changed files with 9 additions and 7 deletions
|
@ -59,10 +59,12 @@ impl From<SpecifiedTimingFunction> for nsTimingFunction {
|
|||
|
||||
match function {
|
||||
SpecifiedTimingFunction::Steps(steps, StartEnd::Start) => {
|
||||
tf.set_as_step(nsTimingFunction_Type::StepStart, steps);
|
||||
debug_assert!(steps.value() >= 0);
|
||||
tf.set_as_step(nsTimingFunction_Type::StepStart, steps.value() as u32);
|
||||
},
|
||||
SpecifiedTimingFunction::Steps(steps, StartEnd::End) => {
|
||||
tf.set_as_step(nsTimingFunction_Type::StepEnd, steps);
|
||||
debug_assert!(steps.value() >= 0);
|
||||
tf.set_as_step(nsTimingFunction_Type::StepEnd, steps.value() as u32);
|
||||
},
|
||||
SpecifiedTimingFunction::CubicBezier(p1, p2) => {
|
||||
tf.set_as_cubic_bezier(Point2D::new(p1.x.value, p1.y.value),
|
||||
|
|
|
@ -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)",
|
||||
}
|
||||
%>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue