Bug 1340322 - Part 10: Rename CSSAnimationBuilder to GeckoCSSAnimationBuilder. r=birtles
authorHiroyuki Ikezoe <hikezoe@mozilla.com>
Mon, 06 Mar 2017 09:52:20 +0900
changeset 375006 a04bbcdfda14751ed34095fd90a5b02e1574f1e1
parent 375005 7bacb513bfc1ead958300239eb00d347496f2118
child 375007 6f6d0b68ef23d3647f5fa9ad053750f47625b090
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbirtles
bugs1340322
milestone54.0a1
Bug 1340322 - Part 10: Rename CSSAnimationBuilder to GeckoCSSAnimationBuilder. r=birtles MozReview-Commit-ID: 9DV9fijsoXF
layout/style/nsAnimationManager.cpp
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -413,20 +413,20 @@ ResolvedStyleCache::Get(nsPresContext *a
     RefPtr<nsStyleContext> resultStrong = aPresContext->StyleSet()->AsGecko()->
       ResolveStyleByAddingRules(aParentStyleContext, rules);
     mCache.Put(aKeyframeDeclaration, resultStrong);
     result = resultStrong;
   }
   return result;
 }
 
-class MOZ_STACK_CLASS CSSAnimationBuilder final {
+class MOZ_STACK_CLASS GeckoCSSAnimationBuilder final {
 public:
-  CSSAnimationBuilder(nsStyleContext* aStyleContext,
-                      const NonOwningAnimationTarget& aTarget)
+  GeckoCSSAnimationBuilder(nsStyleContext* aStyleContext,
+                           const NonOwningAnimationTarget& aTarget)
     : mStyleContext(aStyleContext)
     , mTarget(aTarget)
   {
     MOZ_ASSERT(aStyleContext);
     MOZ_ASSERT(aTarget.mElement);
   }
 
   bool BuildKeyframes(nsPresContext* aPresContext,
@@ -597,19 +597,19 @@ BuildAnimation(nsPresContext* aPresConte
   } else {
     animation->PlayFromStyle();
   }
 
   return animation.forget();
 }
 
 bool
-CSSAnimationBuilder::BuildKeyframes(nsPresContext* aPresContext,
-                                    const StyleAnimation& aSrc,
-                                    nsTArray<Keyframe>& aKeyframes)
+GeckoCSSAnimationBuilder::BuildKeyframes(nsPresContext* aPresContext,
+                                         const StyleAnimation& aSrc,
+                                         nsTArray<Keyframe>& aKeyframes)
 {
   MOZ_ASSERT(aPresContext);
 
   if (aPresContext->StyleSet()->IsServo()) {
     ServoStyleSet* styleSet = aPresContext->StyleSet()->AsServo();
     MOZ_ASSERT(styleSet);
     const ServoComputedValues* computedValues =
       mStyleContext->StyleSource().AsServoComputedValues();
@@ -628,19 +628,19 @@ CSSAnimationBuilder::BuildKeyframes(nsPr
     }
     aKeyframes = BuildAnimationFrames(aPresContext, aSrc, rule);
   }
 
   return true;
 }
 
 nsTArray<Keyframe>
-CSSAnimationBuilder::BuildAnimationFrames(nsPresContext* aPresContext,
-                                          const StyleAnimation& aSrc,
-                                          const nsCSSKeyframesRule* aRule)
+GeckoCSSAnimationBuilder::BuildAnimationFrames(nsPresContext* aPresContext,
+                                               const StyleAnimation& aSrc,
+                                               const nsCSSKeyframesRule* aRule)
 {
   // Ideally we'd like to build up a set of Keyframe objects that more-or-less
   // reflect the keyframes as-specified in the @keyframes rule(s) so that
   // authors get something intuitive when they call anim.effect.getKeyframes().
   //
   // That, however, proves to be difficult because the way CSS declarations are
   // processed differs from how we are able to represent keyframes as
   // JavaScript objects in the Web Animations API.
@@ -801,17 +801,17 @@ CSSAnimationBuilder::BuildAnimationFrame
   FillInMissingKeyframeValues(aPresContext, animatedProperties,
                               propertiesSetAtStart, propertiesSetAtEnd,
                               inheritedTimingFunction, keyframes);
 
   return keyframes;
 }
 
 Maybe<ComputedTimingFunction>
-CSSAnimationBuilder::GetKeyframeTimingFunction(
+GeckoCSSAnimationBuilder::GetKeyframeTimingFunction(
     nsPresContext* aPresContext,
     nsCSSKeyframeRule* aKeyframeRule,
     const Maybe<ComputedTimingFunction>& aInheritedTimingFunction)
 {
   Maybe<ComputedTimingFunction> result;
 
   if (aKeyframeRule->Declaration() &&
       aKeyframeRule->Declaration()->HasProperty(
@@ -838,17 +838,17 @@ ConvertTimingFunction(const nsTimingFunc
     result.emplace();
     result->Init(aTimingFunction);
   }
 
   return result;
 }
 
 nsTArray<PropertyValuePair>
-CSSAnimationBuilder::GetKeyframePropertyValues(
+GeckoCSSAnimationBuilder::GetKeyframePropertyValues(
     nsPresContext* aPresContext,
     nsCSSKeyframeRule* aKeyframeRule,
     nsCSSPropertyIDSet& aAnimatedProperties)
 {
   nsTArray<PropertyValuePair> result;
   RefPtr<nsStyleContext> styleContext =
     mResolvedStyles.Get(aPresContext, mStyleContext,
                         aKeyframeRule->Declaration());
@@ -914,17 +914,17 @@ FindMatchingKeyframe(
       return true;
     }
     ++aIndex;
   }
   return false;
 }
 
 void
-CSSAnimationBuilder::FillInMissingKeyframeValues(
+GeckoCSSAnimationBuilder::FillInMissingKeyframeValues(
     nsPresContext* aPresContext,
     nsCSSPropertyIDSet aAnimatedProperties,
     nsCSSPropertyIDSet aPropertiesSetAtStart,
     nsCSSPropertyIDSet aPropertiesSetAtEnd,
     const Maybe<ComputedTimingFunction>& aInheritedTimingFunction,
     nsTArray<Keyframe>& aKeyframes)
 {
   static const size_t kNotSet = static_cast<size_t>(-1);
@@ -981,31 +981,31 @@ CSSAnimationBuilder::FillInMissingKeyfra
     }
     if (endKeyframe && !aPropertiesSetAtEnd.HasProperty(prop)) {
       AppendProperty(aPresContext, prop, endKeyframe->mPropertyValues);
     }
   }
 }
 
 void
-CSSAnimationBuilder::AppendProperty(
+GeckoCSSAnimationBuilder::AppendProperty(
     nsPresContext* aPresContext,
     nsCSSPropertyID aProperty,
     nsTArray<PropertyValuePair>& aPropertyValues)
 {
   PropertyValuePair propertyValue;
   propertyValue.mProperty = aProperty;
   propertyValue.mValue = GetComputedValue(aPresContext, aProperty);
 
   aPropertyValues.AppendElement(Move(propertyValue));
 }
 
 nsCSSValue
-CSSAnimationBuilder::GetComputedValue(nsPresContext* aPresContext,
-                                      nsCSSPropertyID aProperty)
+GeckoCSSAnimationBuilder::GetComputedValue(nsPresContext* aPresContext,
+                                           nsCSSPropertyID aProperty)
 {
   nsCSSValue result;
   StyleAnimationValue computedValue;
 
   if (!mStyleWithoutAnimation) {
     MOZ_ASSERT(aPresContext->StyleSet()->IsGecko(),
                "ServoStyleSet should not use nsAnimationManager for "
                "animations");
@@ -1081,17 +1081,17 @@ nsAnimationManager::UpdateAnimations(nsS
              "document tree");
 
   if (aStyleContext->IsInDisplayNoneSubtree()) {
     StopAnimationsForElement(aElement, aStyleContext->GetPseudoType());
     return;
   }
 
   NonOwningAnimationTarget target(aElement, aStyleContext->GetPseudoType());
-  CSSAnimationBuilder builder(aStyleContext, target);
+  GeckoCSSAnimationBuilder builder(aStyleContext, target);
 
   const nsStyleDisplay* disp = aStyleContext->StyleDisplay();
   DoUpdateAnimations(target, *disp, builder);
 }
 
 template<class BuilderType>
 void
 nsAnimationManager::DoUpdateAnimations(