diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index cabc1ab4af6..e0c8de4ac40 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -1716,6 +1716,11 @@ extern "C" { RawServoAnimationValueBorrowed) -> bool; } +extern "C" { + pub fn Servo_AnimationValue_Uncompute(value: + RawServoAnimationValueBorrowed) + -> RawServoDeclarationBlockStrong; +} extern "C" { pub fn Servo_ParseStyleAttribute(data: *const nsACString, extra_data: *mut RawGeckoURLExtraData) diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index ed24e8e68b6..c78be1a196c 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -401,6 +401,15 @@ pub extern "C" fn Servo_AnimationValue_DeepEqual(this: RawServoAnimationValueBor this_value == other_value } +#[no_mangle] +pub extern "C" fn Servo_AnimationValue_Uncompute(value: RawServoAnimationValueBorrowed) + -> RawServoDeclarationBlockStrong { + let value = AnimationValue::as_arc(&value); + let global_style_data = &*GLOBAL_STYLE_DATA; + Arc::new(global_style_data.shared_lock.wrap( + PropertyDeclarationBlock::with_one(value.uncompute(), Importance::Normal))).into_strong() +} + #[no_mangle] pub extern "C" fn Servo_StyleSet_GetBaseComputedValuesForElement(raw_data: RawServoStyleSetBorrowed, element: RawGeckoElementBorrowed,