Bug 1339332 - Part 2: Remove no longer used method. r=birtles draft
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Sat, 25 Feb 2017 22:10:33 +0900
changeset 489660 ee6303a577e1ee2aba59591bced85944b610d4ee
parent 489659 6cde22c1661d766116d4a69dac06512c94508497
child 547051 8ad391225da2b95df99007001a40c7f8d82b651f
push id46874
push userbmo:dakatsuka@mozilla.com
push dateSat, 25 Feb 2017 13:11:03 +0000
reviewersbirtles
bugs1339332
milestone54.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
@@ -557,18 +557,16 @@ private:
   void FillInMissingKeyframeValues(
     nsCSSPropertyIDSet aAnimatedProperties,
     nsCSSPropertyIDSet aPropertiesSetAtStart,
     nsCSSPropertyIDSet aPropertiesSetAtEnd,
     const Maybe<ComputedTimingFunction>& aInheritedTimingFunction,
     nsTArray<Keyframe>& aKeyframes);
   void AppendProperty(nsCSSPropertyID aProperty,
                       nsTArray<PropertyValuePair>& aPropertyValues);
-  nsCSSValue GetComputedValue(nsPresContext* aPresContext,
-                              nsCSSPropertyID aProperty);
 
   static TimingParams TimingParamsFrom(
     const StyleAnimation& aStyleAnimation)
   {
     TimingParams timing;
 
     timing.mDuration.emplace(StickyTimeDuration::FromMilliseconds(
                                aStyleAnimation.GetDuration()));
@@ -1038,50 +1036,16 @@ CSSAnimationBuilder::AppendProperty(
     nsTArray<PropertyValuePair>& aPropertyValues)
 {
   PropertyValuePair propertyValue;
   propertyValue.mProperty = aProperty;
 
   aPropertyValues.AppendElement(Move(propertyValue));
 }
 
-nsCSSValue
-CSSAnimationBuilder::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, 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;
-}
-
 void
 nsAnimationManager::BuildAnimations(nsStyleContext* aStyleContext,
                                     dom::Element* aTarget,
                                     CSSAnimationCollection* aCollection,
                                     OwningCSSAnimationPtrArray& aAnimations)
 {
   MOZ_ASSERT(aAnimations.IsEmpty(), "expect empty array");