diff --git a/components/style/gecko/wrapper.rs b/components/style/gecko/wrapper.rs index 948a87d4cf6..30b9d7b7846 100644 --- a/components/style/gecko/wrapper.rs +++ b/components/style/gecko/wrapper.rs @@ -38,6 +38,7 @@ use gecko_bindings::bindings::Gecko_ElementHasCSSTransitions; use gecko_bindings::bindings::Gecko_GetAnimationRule; use gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations; use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock; +use gecko_bindings::bindings::Gecko_GetSMILOverrideDeclarationBlock; use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock; use gecko_bindings::bindings::Gecko_GetStyleContext; use gecko_bindings::bindings::Gecko_IsSignificantChild; @@ -525,6 +526,11 @@ impl<'le> TElement for GeckoElement<'le> { declarations.map(|s| s.as_arc_opt()).unwrap_or(None) } + fn get_smil_override(&self) -> Option<&Arc>> { + let declarations = unsafe { Gecko_GetSMILOverrideDeclarationBlock(self.0) }; + declarations.map(|s| s.as_arc_opt()).unwrap_or(None) + } + fn get_animation_rules(&self, pseudo: Option<&PseudoElement>) -> AnimationRules { AnimationRules(self.get_animation_rule(pseudo), self.get_transition_rule(pseudo)) diff --git a/components/style/gecko_bindings/bindings.rs b/components/style/gecko_bindings/bindings.rs index f4d1a515d4b..bb8dd04c19f 100644 --- a/components/style/gecko_bindings/bindings.rs +++ b/components/style/gecko_bindings/bindings.rs @@ -623,6 +623,11 @@ extern "C" { RawServoAnimationValueMapBorrowed) -> bool; } +extern "C" { + pub fn Gecko_GetSMILOverrideDeclarationBlock(element: + RawGeckoElementBorrowed) + -> RawServoDeclarationBlockStrongBorrowedOrNull; +} extern "C" { pub fn Gecko_StyleAnimationsEquals(arg1: RawGeckoStyleAnimationListBorrowed,