diff --git a/components/style/gecko_bindings/sugar/ns_timing_function.rs b/components/style/gecko_bindings/sugar/ns_timing_function.rs index 35419821e08..840879b4d08 100644 --- a/components/style/gecko_bindings/sugar/ns_timing_function.rs +++ b/components/style/gecko_bindings/sugar/ns_timing_function.rs @@ -59,10 +59,12 @@ impl From 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), diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 892c4471632..0700559fde3 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -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)", } %> diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 272d4d2302b..955259a94cd 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -1188,7 +1188,7 @@ pub extern "C" fn Servo_DeclarationBlock_SetPixelValue(declarations: BorderSpacing => Box::new( BorderSpacing { horizontal: nocalc.into(), - vertical: nocalc.into(), + vertical: None, } ), };