diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index c84ca64587d..b28183c6ab3 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -1394,7 +1394,7 @@ extern "C" { pub fn Servo_StyleSet_FillKeyframesForName(set: RawServoStyleSetBorrowed, property: *const nsACString, timing_function: - *const nsTimingFunction, + nsTimingFunctionBorrowed, computed_values: ServoComputedValuesBorrowed, keyframe_list: diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index b36d5fc67eb..3216b65acdb 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -48,6 +48,7 @@ use style::gecko_bindings::bindings::RawServoAnimationValueStrong; use style::gecko_bindings::bindings::RawServoImportRuleBorrowed; use style::gecko_bindings::bindings::ServoComputedValuesBorrowedOrNull; use style::gecko_bindings::bindings::nsTArrayBorrowed_uintptr_t; +use style::gecko_bindings::bindings::nsTimingFunctionBorrowed; use style::gecko_bindings::bindings::nsTimingFunctionBorrowedMut; use style::gecko_bindings::structs; use style::gecko_bindings::structs::{SheetParsingMode, nsIAtom, nsCSSPropertyID}; @@ -57,7 +58,6 @@ use style::gecko_bindings::structs::Loader; use style::gecko_bindings::structs::RawGeckoPresContextOwned; use style::gecko_bindings::structs::ServoStyleSheet; use style::gecko_bindings::structs::nsCSSValueSharedList; -use style::gecko_bindings::structs::nsTimingFunction; use style::gecko_bindings::structs::nsresult; use style::gecko_bindings::sugar::ownership::{FFIArcHelpers, HasArcFFI, HasBoxFFI}; use style::gecko_bindings::sugar::ownership::{HasSimpleFFI, Strong}; @@ -1639,7 +1639,7 @@ pub extern "C" fn Servo_AssertTreeIsClean(root: RawGeckoElementBorrowed) { #[no_mangle] pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSetBorrowed, name: *const nsACString, - timing_function: *const nsTimingFunction, + timing_function: nsTimingFunctionBorrowed, style: ServoComputedValuesBorrowed, keyframes: RawGeckoKeyframeListBorrowedMut) -> bool { use style::gecko_bindings::structs::Keyframe; @@ -1648,7 +1648,6 @@ pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSet let data = PerDocumentStyleData::from_ffi(raw_data).borrow(); let name = unsafe { Atom::from(name.as_ref().unwrap().as_str_unchecked()) }; - let style_timing_function = unsafe { timing_function.as_ref().unwrap() }; let style = ComputedValues::as_arc(&style); if let Some(ref animation) = data.stylist.animations().get(&name) { @@ -1659,13 +1658,13 @@ pub extern "C" fn Servo_StyleSet_FillKeyframesForName(raw_data: RawServoStyleSet let timing_function = if let Some(val) = step.get_animation_timing_function(&guard) { val.into() } else { - *style_timing_function + *timing_function }; let keyframe = unsafe { - Gecko_AnimationAppendKeyframe(keyframes, - step.start_percentage.0 as f32, - &timing_function) + Gecko_AnimationAppendKeyframe(keyframes, + step.start_percentage.0 as f32, + &timing_function) }; fn add_computed_property_value(keyframe: *mut Keyframe,