mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Get SMIL override styles from Gecko
This commit is contained in:
parent
97ce9ed5b0
commit
2c3c9d673d
2 changed files with 11 additions and 0 deletions
|
@ -38,6 +38,7 @@ use gecko_bindings::bindings::Gecko_ElementHasCSSTransitions;
|
||||||
use gecko_bindings::bindings::Gecko_GetAnimationRule;
|
use gecko_bindings::bindings::Gecko_GetAnimationRule;
|
||||||
use gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations;
|
use gecko_bindings::bindings::Gecko_GetExtraContentStyleDeclarations;
|
||||||
use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
|
use gecko_bindings::bindings::Gecko_GetHTMLPresentationAttrDeclarationBlock;
|
||||||
|
use gecko_bindings::bindings::Gecko_GetSMILOverrideDeclarationBlock;
|
||||||
use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
|
use gecko_bindings::bindings::Gecko_GetStyleAttrDeclarationBlock;
|
||||||
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
use gecko_bindings::bindings::Gecko_GetStyleContext;
|
||||||
use gecko_bindings::bindings::Gecko_IsSignificantChild;
|
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)
|
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 {
|
fn get_animation_rules(&self, pseudo: Option<&PseudoElement>) -> AnimationRules {
|
||||||
AnimationRules(self.get_animation_rule(pseudo),
|
AnimationRules(self.get_animation_rule(pseudo),
|
||||||
self.get_transition_rule(pseudo))
|
self.get_transition_rule(pseudo))
|
||||||
|
|
|
@ -623,6 +623,11 @@ extern "C" {
|
||||||
RawServoAnimationValueMapBorrowed)
|
RawServoAnimationValueMapBorrowed)
|
||||||
-> bool;
|
-> bool;
|
||||||
}
|
}
|
||||||
|
extern "C" {
|
||||||
|
pub fn Gecko_GetSMILOverrideDeclarationBlock(element:
|
||||||
|
RawGeckoElementBorrowed)
|
||||||
|
-> RawServoDeclarationBlockStrongBorrowedOrNull;
|
||||||
|
}
|
||||||
extern "C" {
|
extern "C" {
|
||||||
pub fn Gecko_StyleAnimationsEquals(arg1:
|
pub fn Gecko_StyleAnimationsEquals(arg1:
|
||||||
RawGeckoStyleAnimationListBorrowed,
|
RawGeckoStyleAnimationListBorrowed,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue