mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 01:35:35 +00:00
Bug 1355348 - Add FFI for getting SMIL override styles; r=heycam
MozReview-Commit-ID: 7grK3meDOZD --HG-- extra : rebase_source : 2abaf2f99b5850f3b1a07c667e9801c8dc14b30b
This commit is contained in:
parent
00e718c4d4
commit
f8eabbbd4d
@ -358,10 +358,15 @@ Gecko_DropElementSnapshot(ServoElementSnapshotOwned aSnapshot)
|
||||
}
|
||||
}
|
||||
|
||||
RawServoDeclarationBlockStrongBorrowedOrNull
|
||||
Gecko_GetStyleAttrDeclarationBlock(RawGeckoElementBorrowed aElement)
|
||||
typedef DeclarationBlock*(*DeclarationBlockGetter)(RawGeckoElementBorrowed);
|
||||
|
||||
static RawServoDeclarationBlockStrongBorrowedOrNull
|
||||
UnwrapDeclarationBlock(RawGeckoElementBorrowed aElement,
|
||||
DeclarationBlockGetter aGetterFunc)
|
||||
{
|
||||
DeclarationBlock* decl = aElement->GetInlineStyleDeclaration();
|
||||
MOZ_ASSERT(aElement, "Invalid GeckoElement");
|
||||
|
||||
DeclarationBlock* decl = aGetterFunc(aElement);
|
||||
if (!decl) {
|
||||
return nullptr;
|
||||
}
|
||||
@ -374,6 +379,22 @@ Gecko_GetStyleAttrDeclarationBlock(RawGeckoElementBorrowed aElement)
|
||||
return decl->AsServo()->RefRawStrong();
|
||||
}
|
||||
|
||||
RawServoDeclarationBlockStrongBorrowedOrNull
|
||||
Gecko_GetStyleAttrDeclarationBlock(RawGeckoElementBorrowed aElement)
|
||||
{
|
||||
return UnwrapDeclarationBlock(aElement, [](RawGeckoElementBorrowed elem) {
|
||||
return elem->GetInlineStyleDeclaration();
|
||||
});
|
||||
}
|
||||
|
||||
RawServoDeclarationBlockStrongBorrowedOrNull
|
||||
Gecko_GetSMILOverrideDeclarationBlock(RawGeckoElementBorrowed aElement)
|
||||
{
|
||||
return UnwrapDeclarationBlock(aElement, [](RawGeckoElementBorrowed elem) {
|
||||
return const_cast<dom::Element*>(elem)->GetSMILOverrideStyleDeclaration();
|
||||
});
|
||||
}
|
||||
|
||||
RawServoDeclarationBlockStrongBorrowedOrNull
|
||||
Gecko_GetHTMLPresentationAttrDeclarationBlock(RawGeckoElementBorrowed aElement)
|
||||
{
|
||||
|
@ -195,6 +195,8 @@ Gecko_GetAnimationRule(RawGeckoElementBorrowed aElement,
|
||||
nsIAtom* aPseudoTag,
|
||||
mozilla::EffectCompositor::CascadeLevel aCascadeLevel,
|
||||
RawServoAnimationValueMapBorrowed aAnimationValues);
|
||||
RawServoDeclarationBlockStrongBorrowedOrNull
|
||||
Gecko_GetSMILOverrideDeclarationBlock(RawGeckoElementBorrowed element);
|
||||
bool Gecko_StyleAnimationsEquals(RawGeckoStyleAnimationListBorrowed,
|
||||
RawGeckoStyleAnimationListBorrowed);
|
||||
void Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement,
|
||||
|
Loading…
Reference in New Issue
Block a user