mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +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 {
|
match function {
|
||||||
SpecifiedTimingFunction::Steps(steps, StartEnd::Start) => {
|
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) => {
|
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) => {
|
SpecifiedTimingFunction::CubicBezier(p1, p2) => {
|
||||||
tf.set_as_cubic_bezier(Point2D::new(p1.x.value, p1.y.value),
|
tf.set_as_cubic_bezier(Point2D::new(p1.x.value, p1.y.value),
|
||||||
|
|
|
@ -1355,8 +1355,8 @@ fn static_assert() {
|
||||||
#[allow(non_snake_case)]
|
#[allow(non_snake_case)]
|
||||||
pub fn ${type}_${ident}_at(&self, index: usize)
|
pub fn ${type}_${ident}_at(&self, index: usize)
|
||||||
-> longhands::${type}_${ident}::computed_value::SingleComputedValue {
|
-> longhands::${type}_${ident}::computed_value::SingleComputedValue {
|
||||||
use values::specified::Time;
|
use values::computed::Time;
|
||||||
Time(self.gecko.m${type.capitalize()}s[index].m${gecko_ffi_name} / 1000.)
|
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_animation_or_transition_count(type, ident, gecko_ffi_name)}
|
||||||
${impl_copy_animation_or_transition_value(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)",
|
"length" : "bindings::Gecko_CSSValue_SetAbsoluteLength(%s, %s.0)",
|
||||||
"percentage" : "bindings::Gecko_CSSValue_SetPercentage(%s, %s)",
|
"percentage" : "bindings::Gecko_CSSValue_SetPercentage(%s, %s)",
|
||||||
"lop" : "%s.set_lop(%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)",
|
"number" : "bindings::Gecko_CSSValue_SetNumber(%s, %s)",
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
@ -1738,7 +1738,7 @@ fn static_assert() {
|
||||||
css_value_getters = {
|
css_value_getters = {
|
||||||
"length" : "Au(bindings::Gecko_CSSValue_GetAbsoluteLength(%s))",
|
"length" : "Au(bindings::Gecko_CSSValue_GetAbsoluteLength(%s))",
|
||||||
"lop" : "%s.get_lop()",
|
"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)",
|
"number" : "bindings::Gecko_CSSValue_GetNumber(%s)",
|
||||||
}
|
}
|
||||||
%>
|
%>
|
||||||
|
|
|
@ -1188,7 +1188,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(declarations:
|
||||||
BorderSpacing => Box::new(
|
BorderSpacing => Box::new(
|
||||||
BorderSpacing {
|
BorderSpacing {
|
||||||
horizontal: nocalc.into(),
|
horizontal: nocalc.into(),
|
||||||
vertical: nocalc.into(),
|
vertical: None,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue