diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index 3f1fe721076..f21f9005867 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -2618,6 +2618,10 @@ extern "C" { RawServoAnimationValueBorrowed) -> f32; } +extern "C" { + pub fn Servo_AnimationValue_Opacity(arg1: f32) + -> RawServoAnimationValueStrong; +} extern "C" { pub fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValueBorrowed, diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 901a06bfe14..169ea08d254 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -634,9 +634,9 @@ pub extern "C" fn Servo_Shorthand_AnimationValues_Serialize(shorthand_property: } #[no_mangle] -pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueBorrowed) - -> f32 -{ +pub extern "C" fn Servo_AnimationValue_GetOpacity( + value: RawServoAnimationValueBorrowed +) -> f32 { let value = AnimationValue::as_arc(&value); if let AnimationValue::Opacity(opacity) = **value { opacity @@ -645,6 +645,13 @@ pub extern "C" fn Servo_AnimationValue_GetOpacity(value: RawServoAnimationValueB } } +#[no_mangle] +pub extern "C" fn Servo_AnimationValue_Opacity( + opacity: f32 +) -> RawServoAnimationValueStrong { + Arc::new(AnimationValue::Opacity(opacity)).into_strong() +} + #[no_mangle] pub extern "C" fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValueBorrowed, list: *mut structs::RefPtr)