зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1350754 - Add an FFI to check that a given (pseudo-) element has any type of animations or not. r=birtles,heycam
If an element has any type of animations in match_elements(), we need to call UpdateEffectProperties() to update KeyframeEffectReadOnly::mProperties. MozReview-Commit-ID: 1CDhwoM2llE --HG-- extra : rebase_source : f2c476d579019079702b01fec375f75b4594dee9
This commit is contained in:
Родитель
3161326ebd
Коммит
ea9ccbbab2
|
@ -36,6 +36,7 @@
|
|||
#include "nsTArray.h"
|
||||
|
||||
#include "mozilla/EffectCompositor.h"
|
||||
#include "mozilla/EffectSet.h"
|
||||
#include "mozilla/EventStates.h"
|
||||
#include "mozilla/Keyframe.h"
|
||||
#include "mozilla/ServoElementSnapshot.h"
|
||||
|
@ -458,6 +459,21 @@ Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement,
|
|||
}
|
||||
}
|
||||
|
||||
bool
|
||||
Gecko_ElementHasAnimations(RawGeckoElementBorrowed aElement,
|
||||
nsIAtom* aPseudoTagOrNull)
|
||||
{
|
||||
MOZ_ASSERT(!aPseudoTagOrNull ||
|
||||
aPseudoTagOrNull == nsCSSPseudoElements::before ||
|
||||
aPseudoTagOrNull == nsCSSPseudoElements::after);
|
||||
|
||||
CSSPseudoElementType pseudoType =
|
||||
nsCSSPseudoElements::GetPseudoType(aPseudoTagOrNull,
|
||||
CSSEnabledState::eForAllContent);
|
||||
|
||||
return !!EffectSet::GetEffectSet(aElement, pseudoType);
|
||||
}
|
||||
|
||||
bool
|
||||
Gecko_ElementHasCSSAnimations(RawGeckoElementBorrowed aElement,
|
||||
nsIAtom* aPseudoTagOrNull)
|
||||
|
|
|
@ -202,6 +202,8 @@ void Gecko_UpdateAnimations(RawGeckoElementBorrowed aElement,
|
|||
nsIAtom* aPseudoTagOrNull,
|
||||
ServoComputedValuesBorrowedOrNull aComputedValues,
|
||||
ServoComputedValuesBorrowedOrNull aParentComputedValues);
|
||||
bool Gecko_ElementHasAnimations(RawGeckoElementBorrowed aElement,
|
||||
nsIAtom* aPseudoTagOrNull);
|
||||
bool Gecko_ElementHasCSSAnimations(RawGeckoElementBorrowed aElement,
|
||||
nsIAtom* aPseudoTagOrNull);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче