diff --git a/components/style/gecko/generated/bindings.rs b/components/style/gecko/generated/bindings.rs index b9b27518002d..a07176ee2088 100644 --- a/components/style/gecko/generated/bindings.rs +++ b/components/style/gecko/generated/bindings.rs @@ -1187,6 +1187,9 @@ extern "C" { extern "C" { pub fn Gecko_NewCSSValueSharedList(len: u32) -> *mut nsCSSValueSharedList; } +extern "C" { + pub fn Gecko_NewNoneTransform() -> *mut nsCSSValueSharedList; +} extern "C" { pub fn Gecko_CSSValue_GetArrayItem(css_value: nsCSSValueBorrowedMut, index: i32) -> nsCSSValueBorrowedMut; diff --git a/ports/geckolib/glue.rs b/ports/geckolib/glue.rs index 0cd95543ac12..479864c77ab3 100644 --- a/ports/geckolib/glue.rs +++ b/ports/geckolib/glue.rs @@ -45,6 +45,7 @@ use style::gecko_bindings::bindings::Gecko_AddPropertyToSet; use style::gecko_bindings::bindings::Gecko_GetOrCreateFinalKeyframe; use style::gecko_bindings::bindings::Gecko_GetOrCreateInitialKeyframe; use style::gecko_bindings::bindings::Gecko_GetOrCreateKeyframeAtStart; +use style::gecko_bindings::bindings::Gecko_NewNoneTransform; use style::gecko_bindings::bindings::RawGeckoAnimationPropertySegmentBorrowed; use style::gecko_bindings::bindings::RawGeckoCSSPropertyIDListBorrowed; use style::gecko_bindings::bindings::RawGeckoComputedKeyframeValuesListBorrowedMut; @@ -451,7 +452,15 @@ pub extern "C" fn Servo_AnimationValue_GetTransform(value: RawServoAnimationValu { let value = AnimationValue::as_arc(&value); if let AnimationValue::Transform(ref servo_list) = **value { - style_structs::Box::convert_transform(servo_list.0.clone().unwrap(), unsafe { &mut *list }); + let list = unsafe { &mut *list }; + match servo_list.0 { + Some(ref servo_list) => { + style_structs::Box::convert_transform(servo_list.clone(), list); + }, + None => unsafe { + list.set_move(RefPtr::from_addrefed(Gecko_NewNoneTransform())); + } + } } else { panic!("The AnimationValue should be transform"); }