Bug 1223658 - Part 8: Drop nsLayoutUtils::HasActiveAnimationOfProperty. r?birtles
MozReview-Commit-ID: 3uI5wQoviqK
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -471,29 +471,16 @@ HasMatchingAnimations(const nsIFrame* aF
return true;
}
}
return false;
}
bool
-nsLayoutUtils::HasActiveAnimationOfProperty(const nsIFrame* aFrame,
- nsCSSPropertyID aProperty)
-{
- return HasMatchingAnimations(aFrame,
- [&aProperty](KeyframeEffectReadOnly& aEffect)
- {
- return aEffect.IsCurrent() && aEffect.IsInEffect() &&
- aEffect.HasEffectiveAnimationOfProperty(aProperty);
- }
- );
-}
-
-bool
nsLayoutUtils::HasCurrentTransitions(const nsIFrame* aFrame)
{
return HasMatchingAnimations(aFrame,
[](KeyframeEffectReadOnly& aEffect)
{
// Since |aEffect| is current, it must have an associated Animation
// so we don't need to null-check the result of GetAnimation().
return aEffect.IsCurrent() && aEffect.GetAnimation()->AsCSSTransition();
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -2225,23 +2225,16 @@ public:
* (void)SizeOfTextRunsForFrames(rootFrame, nullptr, true);
* total = SizeOfTextRunsForFrames(rootFrame, mallocSizeOf, false);
*/
static size_t SizeOfTextRunsForFrames(nsIFrame* aFrame,
mozilla::MallocSizeOf aMallocSizeOf,
bool clear);
/**
- * Returns true if the frame has animations or transitions that are running
- * or filling forwards for the specified property.
- */
- static bool HasActiveAnimationOfProperty(const nsIFrame* aFrame,
- nsCSSPropertyID aProperty);
-
- /**
* Returns true if the frame has any current CSS transitions.
* A current transition is any transition that has not yet finished playing
* including paused transitions.
*/
static bool HasCurrentTransitions(const nsIFrame* aFrame);
/**
* Returns true if |aFrame| has an animation of |aProperty| regardless of