Bug 1488122 - Rename KeyframeEffect::mBaseStyleValuesForServo to just mBaseValues; r=hiro
authorBrian Birtles <birtles@gmail.com>
Thu, 06 Dec 2018 20:57:12 +0000
changeset 508790 716bbe3d3a1503de28839b88b6b393098158bc1e
parent 508789 872ccfbcfe6f7abab6aa425f00d28188d0b8cbc5
child 508791 174486c8cedba1a86ac4c7f643c7410e4aedd60f
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1488122
milestone65.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 1488122 - Rename KeyframeEffect::mBaseStyleValuesForServo to just mBaseValues; r=hiro Differential Revision: https://phabricator.services.mozilla.com/D13933
dom/animation/KeyframeEffect.cpp
dom/animation/KeyframeEffect.h
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -358,17 +358,17 @@ void KeyframeEffect::UpdateProperties(co
 
 void KeyframeEffect::EnsureBaseStyles(
     const ComputedStyle* aComputedValues,
     const nsTArray<AnimationProperty>& aProperties) {
   if (!mTarget) {
     return;
   }
 
-  mBaseStyleValuesForServo.Clear();
+  mBaseValues.Clear();
 
   nsPresContext* presContext =
       nsContentUtils::GetContextForContent(mTarget->mElement);
   // If |aProperties| is empty we're not going to dereference |presContext| so
   // we don't care if it is nullptr.
   //
   // We could just return early when |aProperties| is empty and save looking up
   // the pres context, but that won't save any effort normally since we don't
@@ -409,34 +409,33 @@ void KeyframeEffect::EnsureBaseStyle(
         mTarget->mElement, mTarget->mPseudoType);
     aBaseComputedStyle = aPresContext->StyleSet()->GetBaseContextForElement(
         animatingElement, aComputedStyle);
   }
   RefPtr<RawServoAnimationValue> baseValue =
       Servo_ComputedValues_ExtractAnimationValue(aBaseComputedStyle,
                                                  aProperty.mProperty)
           .Consume();
-  mBaseStyleValuesForServo.Put(aProperty.mProperty, baseValue);
+  mBaseValues.Put(aProperty.mProperty, baseValue);
 }
 
 void KeyframeEffect::WillComposeStyle() {
   ComputedTiming computedTiming = GetComputedTiming();
   mProgressOnLastCompose = computedTiming.mProgress;
   mCurrentIterationOnLastCompose = computedTiming.mCurrentIteration;
 }
 
 void KeyframeEffect::ComposeStyleRule(
     RawServoAnimationValueMap& aAnimationValues,
     const AnimationProperty& aProperty,
     const AnimationPropertySegment& aSegment,
     const ComputedTiming& aComputedTiming) {
-  Servo_AnimationCompose(&aAnimationValues, &mBaseStyleValuesForServo,
-                         aProperty.mProperty, &aSegment,
-                         &aProperty.mSegments.LastElement(), &aComputedTiming,
-                         mEffectOptions.mIterationComposite);
+  Servo_AnimationCompose(&aAnimationValues, &mBaseValues, aProperty.mProperty,
+                         &aSegment, &aProperty.mSegments.LastElement(),
+                         &aComputedTiming, mEffectOptions.mIterationComposite);
 }
 
 void KeyframeEffect::ComposeStyle(RawServoAnimationValueMap& aComposeResult,
                                   const nsCSSPropertyIDSet& aPropertiesToSkip) {
   ComputedTiming computedTiming = GetComputedTiming();
 
   // If the progress is null, we don't have fill data for the current
   // time so we shouldn't animate.
@@ -1051,17 +1050,17 @@ void KeyframeEffect::GetKeyframes(JSCont
         continue;
       }
       if (propertyValue.mServoDeclarationBlock) {
         Servo_DeclarationBlock_SerializeOneValue(
             propertyValue.mServoDeclarationBlock, propertyValue.mProperty,
             &stringValue, computedStyle, customProperties);
       } else {
         RawServoAnimationValue* value =
-            mBaseStyleValuesForServo.GetWeak(propertyValue.mProperty);
+            mBaseValues.GetWeak(propertyValue.mProperty);
 
         if (value) {
           Servo_AnimationValue_Serialize(value, propertyValue.mProperty,
                                          &stringValue);
         }
       }
 
       const char* name = nsCSSProps::PropertyIDLName(propertyValue.mProperty);
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -282,17 +282,17 @@ class KeyframeEffect : public AnimationE
   bool ContainsAnimatedScale(const nsIFrame* aFrame) const;
 
   AnimationValue BaseStyle(nsCSSPropertyID aProperty) const {
     AnimationValue result;
     bool hasProperty = false;
     // We cannot use getters_AddRefs on RawServoAnimationValue because it is
     // an incomplete type, so Get() doesn't work. Instead, use GetWeak, and
     // then assign the raw pointer to a RefPtr.
-    result.mServo = mBaseStyleValuesForServo.GetWeak(aProperty, &hasProperty);
+    result.mServo = mBaseValues.GetWeak(aProperty, &hasProperty);
     MOZ_ASSERT(hasProperty || result.IsNull());
     return result;
   }
 
   enum class MatchForCompositor {
     // This animation matches and should run on the compositor if possible.
     Yes,
     // This (not currently playing) animation matches and can be run on the
@@ -399,18 +399,17 @@ class KeyframeEffect : public AnimationE
 
   // We need to track when we go to or from being "in effect" since
   // we need to re-evaluate the cascade of animations when that changes.
   bool mInEffectOnLastAnimationTimingUpdate;
 
   // The non-animated values for properties in this effect that contain at
   // least one animation value that is composited with the underlying value
   // (i.e. it uses the additive or accumulate composite mode).
-  nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue>
-      mBaseStyleValuesForServo;
+  nsRefPtrHashtable<nsUint32HashKey, RawServoAnimationValue> mBaseValues;
 
   // True if this effect is in the EffectSet for its target element. This is
   // used as an optimization to avoid unnecessary hashmap lookups on the
   // EffectSet.
   bool mInEffectSet = false;
 
  private:
   nsChangeHint mCumulativeChangeHint;