Bug 1287725 - Drop KeyframeEffectReadOnly::HasAnimationOfProperties and nsLayoutUtils::HasCurrentAnimationsForProperties. r=birtles
authorHiroyuki Ikezoe <hiikezoe@mozilla-japan.org>
Tue, 26 Jul 2016 06:44:11 +0900
changeset 346563 5125ae09224aa5358f923b792a84f3f0e0a6c256
parent 346562 bbc13c4c59289416fe99a38a1d379fb9feafe15c
child 346564 5c6a56bb4a6cb28028b4206bcb3f2cb86baa0528
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1287725
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1287725 - Drop KeyframeEffectReadOnly::HasAnimationOfProperties and nsLayoutUtils::HasCurrentAnimationsForProperties. r=birtles MozReview-Commit-ID: K33ga7KpLIo
dom/animation/KeyframeEffect.cpp
dom/animation/KeyframeEffect.h
layout/base/ActiveLayerTracker.cpp
layout/base/nsLayoutUtils.cpp
layout/base/nsLayoutUtils.h
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -502,29 +502,16 @@ KeyframeEffectReadOnly::GetAnimationOfPr
         result = nullptr;
       }
       return result;
     }
   }
   return nullptr;
 }
 
-bool
-KeyframeEffectReadOnly::HasAnimationOfProperties(
-                          const nsCSSProperty* aProperties,
-                          size_t aPropertyCount) const
-{
-  for (size_t i = 0; i < aPropertyCount; i++) {
-    if (HasAnimationOfProperty(aProperties[i])) {
-      return true;
-    }
-  }
-  return false;
-}
-
 #ifdef DEBUG
 bool
 SpecifiedKeyframeArraysAreEqual(const nsTArray<Keyframe>& aA,
                                 const nsTArray<Keyframe>& aB)
 {
   if (aA.Length() != aB.Length()) {
     return false;
   }
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -289,18 +289,16 @@ public:
                     ErrorResult& aRv);
   void SetKeyframes(nsTArray<Keyframe>&& aKeyframes,
                     nsStyleContext* aStyleContext);
   const AnimationProperty*
   GetAnimationOfProperty(nsCSSProperty aProperty) const;
   bool HasAnimationOfProperty(nsCSSProperty aProperty) const {
     return GetAnimationOfProperty(aProperty) != nullptr;
   }
-  bool HasAnimationOfProperties(const nsCSSProperty* aProperties,
-                                size_t aPropertyCount) const;
   const InfallibleTArray<AnimationProperty>& Properties() const {
     return mProperties;
   }
   InfallibleTArray<AnimationProperty>& Properties() {
     return mProperties;
   }
 
   // Update |mProperties| by recalculating from |mKeyframes| using
--- a/layout/base/ActiveLayerTracker.cpp
+++ b/layout/base/ActiveLayerTracker.cpp
@@ -441,17 +441,17 @@ ActiveLayerTracker::IsStyleAnimated(nsDi
     }
     if (CheckScrollInducedActivity(layerActivity, activityIndex, aBuilder)) {
       return true;
     }
   }
   if (aProperty == eCSSProperty_transform && aFrame->Combines3DTransformWithAncestors()) {
     return IsStyleAnimated(aBuilder, aFrame->GetParent(), aProperty);
   }
-  return nsLayoutUtils::HasCurrentAnimationsForProperties(aFrame, &aProperty, 1);
+  return nsLayoutUtils::HasCurrentAnimationOfProperty(aFrame, aProperty);
 }
 
 /* static */ bool
 ActiveLayerTracker::IsOffsetOrMarginStyleAnimated(nsIFrame* aFrame)
 {
   LayerActivity* layerActivity = GetLayerActivity(aFrame);
   if (layerActivity) {
     if (layerActivity->mRestyleCounts[LayerActivity::ACTIVITY_LEFT] >= 2 ||
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -491,30 +491,16 @@ nsLayoutUtils::HasCurrentTransitions(con
       // 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();
     }
   );
 }
 
 bool
-nsLayoutUtils::HasCurrentAnimationsForProperties(const nsIFrame* aFrame,
-                                                 const nsCSSProperty* aProperties,
-                                                 size_t aPropertyCount)
-{
-  return HasMatchingAnimations(aFrame,
-    [&aProperties, &aPropertyCount](KeyframeEffectReadOnly& aEffect)
-    {
-      return aEffect.IsCurrent() &&
-        aEffect.HasAnimationOfProperties(aProperties, aPropertyCount);
-    }
-  );
-}
-
-bool
 nsLayoutUtils::HasRelevantAnimationOfProperty(const nsIFrame* aFrame,
                                               nsCSSProperty aProperty)
 {
   return HasMatchingAnimations(aFrame,
     [&aProperty](KeyframeEffectReadOnly& aEffect)
     {
       return (aEffect.IsInEffect() || aEffect.IsCurrent()) &&
              aEffect.HasAnimationOfProperty(aProperty);
--- a/layout/base/nsLayoutUtils.h
+++ b/layout/base/nsLayoutUtils.h
@@ -2241,24 +2241,16 @@ public:
   /**
    * 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 the frame has any current animations or transitions
-   * for any of the specified properties.
-   */
-  static bool HasCurrentAnimationsForProperties(const nsIFrame* aFrame,
-                                                const nsCSSProperty* aProperties,
-                                                size_t aPropertyCount);
-
-  /**
    * Returns true if the frame has current or in-effect (i.e. in before phase,
    * running or filling) animations or transitions for the
    * property.
    */
   static bool HasRelevantAnimationOfProperty(const nsIFrame* aFrame,
                                              nsCSSProperty aProperty);
 
   /**