diff --git a/components/style/gecko/boxed_types.rs b/components/style/gecko/boxed_types.rs index b61c7708b2a..47fc4fe57dc 100644 --- a/components/style/gecko/boxed_types.rs +++ b/components/style/gecko/boxed_types.rs @@ -5,12 +5,22 @@ //! FFI implementations for types listed in ServoBoxedTypeList.h. use crate::gecko_bindings::sugar::ownership::{HasBoxFFI, HasFFI, HasSimpleFFI}; +use crate::properties::animated_properties::AnimationValueMap; use to_shmem::SharedMemoryBuilder; // TODO(heycam): The FFI impls for most of the types in ServoBoxedTypeList.h are spread across // various files at the moment, but should probably all move here, and use macros to define // them more succinctly, like we do in arc_types.rs. +#[cfg(feature = "gecko")] +unsafe impl HasFFI for AnimationValueMap { + type FFIType = crate::gecko_bindings::bindings::RawServoAnimationValueMap; +} +#[cfg(feature = "gecko")] +unsafe impl HasSimpleFFI for AnimationValueMap {} +#[cfg(feature = "gecko")] +unsafe impl HasBoxFFI for AnimationValueMap {} + #[cfg(feature = "gecko")] unsafe impl HasFFI for SharedMemoryBuilder { type FFIType = crate::gecko_bindings::bindings::RawServoSharedMemoryBuilder; diff --git a/components/style/properties/helpers/animated_properties.mako.rs b/components/style/properties/helpers/animated_properties.mako.rs index 1b536d24e8b..d3b3ecd11e4 100644 --- a/components/style/properties/helpers/animated_properties.mako.rs +++ b/components/style/properties/helpers/animated_properties.mako.rs @@ -9,9 +9,7 @@ from itertools import groupby %> -#[cfg(feature = "gecko")] use crate::gecko_bindings::structs::RawServoAnimationValueMap; #[cfg(feature = "gecko")] use crate::gecko_bindings::structs::nsCSSPropertyID; -#[cfg(feature = "gecko")] use crate::gecko_bindings::sugar::ownership::{HasFFI, HasSimpleFFI}; use itertools::{EitherOrBoth, Itertools}; use crate::properties::{CSSWideKeyword, PropertyDeclaration}; use crate::properties::longhands; @@ -190,13 +188,6 @@ impl AnimatedProperty { /// composed for each TransitionProperty. pub type AnimationValueMap = FxHashMap; -#[cfg(feature = "gecko")] -unsafe impl HasFFI for AnimationValueMap { - type FFIType = RawServoAnimationValueMap; -} -#[cfg(feature = "gecko")] -unsafe impl HasSimpleFFI for AnimationValueMap {} - /// An enum to represent a single computed value belonging to an animated /// property in order to be interpolated with another one. When interpolating, /// both values need to belong to the same property.