Bug 1339332 - Part 2: Remove no longer used method. r=birtles draft
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Wed, 08 Mar 2017 10:07:08 +0900
changeset 494894 8815cc9238ea2e1f247efb9035b811e0c57c13af
parent 494893 fa05c4c47000a348bfa3f01eb2cae9b082b882f5
child 494895 5b75f1c7ebd5b53425da624a678b73c4cf1c6a97
push id48182
push userbmo:dakatsuka@mozilla.com
push dateWed, 08 Mar 2017 03:10:05 +0000
reviewersbirtles
bugs1339332
milestone55.0a1
Bug 1339332 - Part 2: Remove no longer used method. r=birtles MozReview-Commit-ID: 6kFBGP4K10Z
layout/style/nsAnimationManager.cpp
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -470,27 +470,21 @@ private:
     nsCSSKeyframeRule* aKeyframeRule,
     nsCSSPropertyIDSet& aAnimatedProperties);
   void FillInMissingKeyframeValues(
     nsCSSPropertyIDSet aAnimatedProperties,
     nsCSSPropertyIDSet aPropertiesSetAtStart,
     nsCSSPropertyIDSet aPropertiesSetAtEnd,
     const Maybe<ComputedTimingFunction>& aInheritedTimingFunction,
     nsTArray<Keyframe>& aKeyframes);
-  void AppendProperty(nsPresContext* aPresContext,
-                      nsCSSPropertyID aProperty,
-                      nsTArray<PropertyValuePair>& aPropertyValues);
-  nsCSSValue GetComputedValue(nsPresContext* aPresContext,
-                              nsCSSPropertyID aProperty);
 
   RefPtr<nsStyleContext> mStyleContext;
   NonOwningAnimationTarget mTarget;
 
   ResolvedStyleCache mResolvedStyles;
-  RefPtr<nsStyleContext> mStyleWithoutAnimation;
 };
 
 static Maybe<ComputedTimingFunction>
 ConvertTimingFunction(const nsTimingFunction& aTimingFunction);
 
 template<class BuilderType>
 static void
 UpdateOldAnimationPropertiesWithNew(
@@ -989,63 +983,16 @@ GeckoCSSAnimationBuilder::FillInMissingK
     if (endKeyframe && !aPropertiesSetAtEnd.HasProperty(prop)) {
       PropertyValuePair propertyValue;
       propertyValue.mProperty = prop;
       endKeyframe->mPropertyValues.AppendElement(Move(propertyValue));
     }
   }
 }
 
-void
-GeckoCSSAnimationBuilder::AppendProperty(
-    nsPresContext* aPresContext,
-    nsCSSPropertyID aProperty,
-    nsTArray<PropertyValuePair>& aPropertyValues)
-{
-  PropertyValuePair propertyValue;
-  propertyValue.mProperty = aProperty;
-  propertyValue.mValue = GetComputedValue(aPresContext, aProperty);
-
-  aPropertyValues.AppendElement(Move(propertyValue));
-}
-
-nsCSSValue
-GeckoCSSAnimationBuilder::GetComputedValue(nsPresContext* aPresContext,
-                                           nsCSSPropertyID aProperty)
-{
-  nsCSSValue result;
-  StyleAnimationValue computedValue;
-
-  if (!mStyleWithoutAnimation) {
-    MOZ_ASSERT(aPresContext->StyleSet()->IsGecko(),
-               "ServoStyleSet should not use nsAnimationManager for "
-               "animations");
-    mStyleWithoutAnimation = aPresContext->StyleSet()->AsGecko()->
-      ResolveStyleByRemovingAnimation(mTarget.mElement, mStyleContext,
-                                      eRestyle_AllHintsWithAnimations);
-  }
-
-  if (StyleAnimationValue::ExtractComputedValue(aProperty,
-                                                mStyleWithoutAnimation,
-                                                computedValue)) {
-    DebugOnly<bool> uncomputeResult =
-      StyleAnimationValue::UncomputeValue(aProperty, Move(computedValue),
-                                          result);
-    MOZ_ASSERT(uncomputeResult,
-               "Unable to get specified value from computed value");
-  }
-
-  // If we hit this assertion, it probably means we are fetching a value from
-  // the computed style that we don't know how to represent as
-  // a StyleAnimationValue.
-  MOZ_ASSERT(result.GetUnit() != eCSSUnit_Null, "Got null computed value");
-
-  return result;
-}
-
 template<class BuilderType>
 static nsAnimationManager::OwningCSSAnimationPtrArray
 BuildAnimations(nsPresContext* aPresContext,
                 const NonOwningAnimationTarget& aTarget,
                 const nsStyleAutoArray<StyleAnimation>& aStyleAnimations,
                 uint32_t aStyleAnimationNameCount,
                 BuilderType& aBuilder,
                 nsAnimationManager::CSSAnimationCollection* aCollection)