Get SMIL override styles from Gecko

This commit is contained in:
Brian Birtles 2017-04-27 12:35:43 +09:00
parent 97ce9ed5b0
commit 2c3c9d673d
2 changed files with 11 additions and 0 deletions

View file

@ -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<Locked<PropertyDeclarationBlock>>> {
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))

View file

@ -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,