diff --git a/components/style/build_gecko.rs b/components/style/build_gecko.rs index e29d111723e..8c3e87097a6 100644 --- a/components/style/build_gecko.rs +++ b/components/style/build_gecko.rs @@ -539,6 +539,7 @@ mod bindings { "RawServoDeclarationBlock", "RawGeckoPresContext", "RawGeckoPresContextOwned", + "RawGeckoStyleAnimationList", "GeckoParserExtraData", "RefPtr", "ThreadSafeURIHolder", @@ -636,6 +637,7 @@ mod bindings { "RawGeckoDocument", "RawServoDeclarationBlockStrong", "RawGeckoPresContext", + "RawGeckoStyleAnimationList", ]; let servo_borrow_types = [ "nsCSSValue", diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index 13617160f9a..c3234d04543 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -14,6 +14,7 @@ use gecko_bindings::structs::RawServoAnimationValue; use gecko_bindings::structs::RawServoDeclarationBlock; use gecko_bindings::structs::RawGeckoPresContext; use gecko_bindings::structs::RawGeckoPresContextOwned; +use gecko_bindings::structs::RawGeckoStyleAnimationList; use gecko_bindings::structs::GeckoParserExtraData; use gecko_bindings::structs::RefPtr; use gecko_bindings::structs::ThreadSafeURIHolder; @@ -232,6 +233,8 @@ pub type RawServoDeclarationBlockStrongBorrowed<'a> = &'a RawServoDeclarationBlo pub type RawServoDeclarationBlockStrongBorrowedOrNull<'a> = Option<&'a RawServoDeclarationBlockStrong>; pub type RawGeckoPresContextBorrowed<'a> = &'a RawGeckoPresContext; pub type RawGeckoPresContextBorrowedOrNull<'a> = Option<&'a RawGeckoPresContext>; +pub type RawGeckoStyleAnimationListBorrowed<'a> = &'a RawGeckoStyleAnimationList; +pub type RawGeckoStyleAnimationListBorrowedOrNull<'a> = Option<&'a RawGeckoStyleAnimationList>; pub type nsCSSValueBorrowed<'a> = &'a nsCSSValue; pub type nsCSSValueBorrowedOrNull<'a> = Option<&'a nsCSSValue>; pub type nsCSSValueBorrowedMut<'a> = &'a mut nsCSSValue; @@ -531,6 +534,13 @@ extern "C" { EffectCompositor_CascadeLevel) -> RawServoDeclarationBlockStrong; } +extern "C" { + pub fn Gecko_StyleAnimationsEquals(arg1: + RawGeckoStyleAnimationListBorrowed, + arg2: + RawGeckoStyleAnimationListBorrowed) + -> bool; +} extern "C" { pub fn Gecko_Atomize(aString: *const ::std::os::raw::c_char, aLength: u32) -> *mut nsIAtom; diff --git a/components/style/gecko_bindings/structs_debug.rs b/components/style/gecko_bindings/structs_debug.rs index 9a75e0c9f5d..fbd1b2f6f3f 100644 --- a/components/style/gecko_bindings/structs_debug.rs +++ b/components/style/gecko_bindings/structs_debug.rs @@ -25490,6 +25490,8 @@ pub mod root { root::nsTArray; pub type RawServoAnimationValueBorrowedList = root::nsTArray<*const root::RawServoAnimationValue>; + pub type RawGeckoStyleAnimationList = + root::nsStyleAutoArray; pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode; pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode; pub type RawGeckoElementBorrowed = *const root::RawGeckoElement; @@ -25508,6 +25510,8 @@ pub mod root { pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList; pub type RawGeckoComputedKeyframeValuesListBorrowedMut = *mut root::RawGeckoComputedKeyframeValuesList; + pub type RawGeckoStyleAnimationListBorrowed = + *const root::RawGeckoStyleAnimationList; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ElementRuleProcessorData([u8; 0]); diff --git a/components/style/gecko_bindings/structs_release.rs b/components/style/gecko_bindings/structs_release.rs index e75f3db8e29..341b80b8518 100644 --- a/components/style/gecko_bindings/structs_release.rs +++ b/components/style/gecko_bindings/structs_release.rs @@ -24848,6 +24848,8 @@ pub mod root { root::nsTArray; pub type RawServoAnimationValueBorrowedList = root::nsTArray<*const root::RawServoAnimationValue>; + pub type RawGeckoStyleAnimationList = + root::nsStyleAutoArray; pub type RawGeckoNodeBorrowed = *const root::RawGeckoNode; pub type RawGeckoNodeBorrowedOrNull = *const root::RawGeckoNode; pub type RawGeckoElementBorrowed = *const root::RawGeckoElement; @@ -24866,6 +24868,8 @@ pub mod root { pub type RawGeckoKeyframeListBorrowed = *const root::RawGeckoKeyframeList; pub type RawGeckoComputedKeyframeValuesListBorrowedMut = *mut root::RawGeckoComputedKeyframeValuesList; + pub type RawGeckoStyleAnimationListBorrowed = + *const root::RawGeckoStyleAnimationList; #[repr(C)] #[derive(Debug, Copy, Clone)] pub struct ElementRuleProcessorData([u8; 0]); diff --git a/components/style/properties/gecko.mako.rs b/components/style/properties/gecko.mako.rs index 8e52d9d739c..95d1a6671e0 100644 --- a/components/style/properties/gecko.mako.rs +++ b/components/style/properties/gecko.mako.rs @@ -1801,6 +1801,10 @@ fn static_assert() { } ${impl_transition_count('property', 'Property')} + pub fn animations_equals(&self, other: &Self) -> bool { + unsafe { bindings::Gecko_StyleAnimationsEquals(&self.gecko.mAnimations, &other.gecko.mAnimations) } + } + pub fn set_animation_name(&mut self, v: longhands::animation_name::computed_value::T) { use nsstring::nsCString;