Bug 1223658 - Part 8: Drop nsLayoutUtils::HasActiveAnimationOfProperty. r?birtles draft
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Fri, 14 Oct 2016 19:14:12 +0900
changeset 425237 5448fb6a0049a982996c521b772d8b26a9d10ccc
parent 425236 207721d0f6adb1170f19cc1c333aeac45312c3c8
child 533869 2a11620a688885aec38cec067cf47a62457763ec
push id32372
push userbmo:hiikezoe@mozilla-japan.org
push dateFri, 14 Oct 2016 10:51:45 +0000
reviewersbirtles
bugs1223658
milestone52.0a1
Bug 1223658 - Part 8: Drop nsLayoutUtils::HasActiveAnimationOfProperty. r?birtles MozReview-Commit-ID: 3uI5wQoviqK
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
--- 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