Bug 1153734 part 3 - Rename AnimationPlayer.source to AnimationPlayer.effect; r=smaug
authorBrian Birtles <birtles@gmail.com>
Wed, 15 Apr 2015 08:48:21 +0900
changeset 270547 d1b6e873a6bc52f72ebd56313c94c4ed3035cb49
parent 270546 1e58cc9b9f9213b0680f9545cae4232aeb82a676
child 270548 a4694e8ae6dd666a600bbc29156c72b50aa259b9
push id863
push userraliiev@mozilla.com
push dateMon, 03 Aug 2015 13:22:43 +0000
treeherdermozilla-release@f6321b14228d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssmaug
bugs1153734
milestone40.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 1153734 part 3 - Rename AnimationPlayer.source to AnimationPlayer.effect; r=smaug There are still some other references to "source" in AnimationPlayer such as HasInPlayerSource and UpdateSourceContent. These are renamed in a subsequent patch (that doesn't require DOM peer review).
dom/animation/AnimationPlayer.cpp
dom/animation/AnimationPlayer.h
dom/animation/test/css-animations/test_animation-player-currenttime.html
dom/animation/test/css-animations/test_animation-player-starttime.html
dom/animation/test/css-animations/test_effect-name.html
dom/animation/test/css-animations/test_effect-target.html
dom/animation/test/css-animations/test_element-get-animation-players.html
dom/animation/test/css-transitions/test_animation-player-currenttime.html
dom/animation/test/css-transitions/test_animation-player-starttime.html
dom/animation/test/css-transitions/test_effect-name.html
dom/animation/test/css-transitions/test_effect-target.html
dom/base/nsDOMMutationObserver.cpp
dom/base/nsNodeUtils.cpp
dom/webidl/AnimationPlayer.webidl
layout/base/nsDisplayList.cpp
layout/base/nsLayoutUtils.cpp
layout/style/AnimationCommon.cpp
layout/style/nsAnimationManager.cpp
layout/style/nsTransitionManager.cpp
toolkit/devtools/server/actors/animation.js
--- a/dom/animation/AnimationPlayer.cpp
+++ b/dom/animation/AnimationPlayer.cpp
@@ -13,17 +13,17 @@
 #include "nsIPresShell.h" // For nsIPresShell
 #include "nsLayoutUtils.h" // For PostRestyleEvent (remove after bug 1073336)
 #include "PendingPlayerTracker.h" // For PendingPlayerTracker
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationPlayer, mTimeline,
-                                      mSource, mReady, mFinished)
+                                      mEffect, mReady, mFinished)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AnimationPlayer)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationPlayer)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationPlayer)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
 JSObject*
@@ -261,24 +261,24 @@ AnimationPlayer::SetCurrentTimeAsDouble(
     }
     return;
   }
 
   return SetCurrentTime(TimeDuration::FromMilliseconds(aCurrentTime.Value()));
 }
 
 void
-AnimationPlayer::SetSource(KeyframeEffectReadonly* aSource)
+AnimationPlayer::SetEffect(KeyframeEffectReadonly* aEffect)
 {
-  if (mSource) {
-    mSource->SetParentTime(Nullable<TimeDuration>());
+  if (mEffect) {
+    mEffect->SetParentTime(Nullable<TimeDuration>());
   }
-  mSource = aSource;
-  if (mSource) {
-    mSource->SetParentTime(GetCurrentTime());
+  mEffect = aEffect;
+  if (mEffect) {
+    mEffect->SetParentTime(GetCurrentTime());
   }
   UpdateRelevance();
 }
 
 void
 AnimationPlayer::Tick()
 {
   // Since we are not guaranteed to get only one call per refresh driver tick,
@@ -382,19 +382,19 @@ AnimationPlayer::UpdateRelevance()
   } else if (!wasRelevant && mIsRelevant) {
     nsNodeUtils::AnimationAdded(this);
   }
 }
 
 bool
 AnimationPlayer::CanThrottle() const
 {
-  if (!mSource ||
-      mSource->IsFinishedTransition() ||
-      mSource->Properties().IsEmpty()) {
+  if (!mEffect ||
+      mEffect->IsFinishedTransition() ||
+      mEffect->Properties().IsEmpty()) {
     return true;
   }
 
   if (!mIsRunningOnCompositor) {
     return false;
   }
 
   if (PlayState() != AnimationPlayState::Finished) {
@@ -409,17 +409,17 @@ AnimationPlayer::CanThrottle() const
   return mFinishedAtLastComposeStyle;
 }
 
 void
 AnimationPlayer::ComposeStyle(nsRefPtr<css::AnimValuesStyleRule>& aStyleRule,
                               nsCSSPropertySet& aSetProperties,
                               bool& aNeedsRefreshes)
 {
-  if (!mSource || mSource->IsFinishedTransition()) {
+  if (!mEffect || mEffect->IsFinishedTransition()) {
     return;
   }
 
   AnimationPlayState playState = PlayState();
   if (playState == AnimationPlayState::Running ||
       playState == AnimationPlayState::Pending) {
     aNeedsRefreshes = true;
   }
@@ -477,17 +477,17 @@ AnimationPlayer::ComposeStyle(nsRefPtr<c
         mHoldTime.SetValue((timeToUse.Value() - mStartTime.Value())
                             .MultDouble(mPlaybackRate));
         // Push the change down to the source content
         UpdateSourceContent();
         updatedHoldTime = true;
       }
     }
 
-    mSource->ComposeStyle(aStyleRule, aSetProperties);
+    mEffect->ComposeStyle(aStyleRule, aSetProperties);
 
     if (updatedHoldTime) {
       UpdateTiming();
     }
 
     mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished);
   }
 }
@@ -703,18 +703,18 @@ AnimationPlayer::UpdateFinishedState(boo
   // We must recalculate the current time to take account of any mHoldTime
   // changes the code above made.
   mPreviousCurrentTime = GetCurrentTime();
 }
 
 void
 AnimationPlayer::UpdateSourceContent()
 {
-  if (mSource) {
-    mSource->SetParentTime(GetCurrentTime());
+  if (mEffect) {
+    mEffect->SetParentTime(GetCurrentTime());
     UpdateRelevance();
   }
 }
 
 void
 AnimationPlayer::FlushStyle() const
 {
   nsIDocument* doc = GetRenderedDocument();
@@ -820,34 +820,34 @@ AnimationPlayer::IsPossiblyOrphanedPendi
   return !tracker ||
          (!tracker->IsWaitingToPlay(*this) &&
           !tracker->IsWaitingToPause(*this));
 }
 
 StickyTimeDuration
 AnimationPlayer::SourceContentEnd() const
 {
-  if (!mSource) {
+  if (!mEffect) {
     return StickyTimeDuration(0);
   }
 
-  return mSource->Timing().mDelay
-         + mSource->GetComputedTiming().mActiveDuration;
+  return mEffect->Timing().mDelay
+         + mEffect->GetComputedTiming().mActiveDuration;
 }
 
 nsIDocument*
 AnimationPlayer::GetRenderedDocument() const
 {
-  if (!mSource) {
+  if (!mEffect) {
     return nullptr;
   }
 
   Element* targetElement;
   nsCSSPseudoElements::Type pseudoType;
-  mSource->GetTarget(targetElement, pseudoType);
+  mEffect->GetTarget(targetElement, pseudoType);
   if (!targetElement) {
     return nullptr;
   }
 
   return targetElement->GetComposedDoc();
 }
 
 nsPresContext*
@@ -866,21 +866,21 @@ AnimationPlayer::GetPresContext() const
 
 AnimationPlayerCollection*
 AnimationPlayer::GetCollection() const
 {
   css::CommonAnimationManager* manager = GetAnimationManager();
   if (!manager) {
     return nullptr;
   }
-  MOZ_ASSERT(mSource, "A player with an animation manager must have a source");
+  MOZ_ASSERT(mEffect, "A player with an animation manager must have an effect");
 
   Element* targetElement;
   nsCSSPseudoElements::Type targetPseudoType;
-  mSource->GetTarget(targetElement, targetPseudoType);
+  mEffect->GetTarget(targetElement, targetPseudoType);
   MOZ_ASSERT(targetElement,
              "A player with an animation manager must have a target");
 
   return manager->GetAnimations(targetElement, targetPseudoType, false);
 }
 
 } // namespace dom
 } // namespace mozilla
--- a/dom/animation/AnimationPlayer.h
+++ b/dom/animation/AnimationPlayer.h
@@ -75,17 +75,17 @@ public:
   // Flag to pass to DoPlay to indicate that it should not carry out finishing
   // behavior (reset the current time to the beginning of the active duration).
   enum LimitBehavior {
     AutoRewind = 0,
     Continue = 1
   };
 
   // AnimationPlayer methods
-  KeyframeEffectReadonly* GetSource() const { return mSource; }
+  KeyframeEffectReadonly* GetEffect() const { return mEffect; }
   DocumentTimeline* Timeline() const { return mTimeline; }
   Nullable<TimeDuration> GetStartTime() const { return mStartTime; }
   void SetStartTime(const Nullable<TimeDuration>& aNewStartTime);
   Nullable<TimeDuration> GetCurrentTime() const;
   void SilentlySetCurrentTime(const TimeDuration& aNewCurrentTime);
   void SetCurrentTime(const TimeDuration& aNewCurrentTime);
   double PlaybackRate() const { return mPlaybackRate; }
   void SetPlaybackRate(double aPlaybackRate);
@@ -108,17 +108,17 @@ public:
                               ErrorResult& aRv);
   virtual AnimationPlayState PlayStateFromJS() const { return PlayState(); }
   virtual void PlayFromJS() { Play(LimitBehavior::AutoRewind); }
   // PauseFromJS is currently only here for symmetry with PlayFromJS but
   // in future we will likely have to flush style in
   // CSSAnimationPlayer::PauseFromJS so we leave it for now.
   void PauseFromJS() { Pause(); }
 
-  void SetSource(KeyframeEffectReadonly* aSource);
+  void SetEffect(KeyframeEffectReadonly* aEffect);
   void Tick();
 
   /**
    * Set the time to use for starting or pausing a pending player.
    *
    * Typically, when a player is played, it does not start immediately but is
    * added to a table of pending players on the document of its source content.
    * In the meantime it sets its hold time to the time from which playback
@@ -198,36 +198,36 @@ public:
    * of those are available, it returns null.
    */
   Nullable<TimeDuration> GetCurrentOrPendingStartTime() const;
 
   void Cancel();
 
   const nsString& Name() const
   {
-    return mSource ? mSource->Name() : EmptyString();
+    return mEffect ? mEffect->Name() : EmptyString();
   }
 
   bool IsPausedOrPausing() const
   {
     return PlayState() == AnimationPlayState::Paused ||
            mPendingState == PendingState::PausePending;
   }
 
   bool HasInPlaySource() const
   {
-    return GetSource() && GetSource()->IsInPlay(*this);
+    return GetEffect() && GetEffect()->IsInPlay(*this);
   }
   bool HasCurrentSource() const
   {
-    return GetSource() && GetSource()->IsCurrent(*this);
+    return GetEffect() && GetEffect()->IsCurrent(*this);
   }
   bool HasInEffectSource() const
   {
-    return GetSource() && GetSource()->IsInEffect();
+    return GetEffect() && GetEffect()->IsInEffect();
   }
 
   /**
    * "Playing" is different to "running". An animation in its delay phase is
    * still running but we only consider it playing when it is in its active
    * interval. This definition is used for fetching the animations that are
    * are candidates for running on the compositor (since we don't ship
    * animations to the compositor when they are in their delay phase or
@@ -298,17 +298,17 @@ protected:
   StickyTimeDuration SourceContentEnd() const;
 
   nsIDocument* GetRenderedDocument() const;
   nsPresContext* GetPresContext() const;
   virtual css::CommonAnimationManager* GetAnimationManager() const = 0;
   AnimationPlayerCollection* GetCollection() const;
 
   nsRefPtr<DocumentTimeline> mTimeline;
-  nsRefPtr<KeyframeEffectReadonly> mSource;
+  nsRefPtr<KeyframeEffectReadonly> mEffect;
   // The beginning of the delay period.
   Nullable<TimeDuration> mStartTime; // Timeline timescale
   Nullable<TimeDuration> mHoldTime;  // Player timescale
   Nullable<TimeDuration> mPendingReadyTime; // Timeline timescale
   Nullable<TimeDuration> mPreviousCurrentTime; // Player timescale
   double mPlaybackRate;
 
   // A Promise that is replaced on each call to Play() (and in future Pause())
--- a/dom/animation/test/css-animations/test_animation-player-currenttime.html
+++ b/dom/animation/test/css-animations/test_animation-player-currenttime.html
@@ -203,21 +203,21 @@ function EventWatcher(watchedNode, event
 function checkStateOnSettingCurrentTimeToZero(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" at the start of ' +
     'the start delay');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" at the start of the start delay');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, UNANIMATED_POSITION,
                 'the computed value of margin-left should be unaffected ' +
                 'at the beginning of the start delay');
 }
 
 // Called when the ready Promise's callbacks should happen
 function checkStateOnReadyPromiseResolved(animation)
@@ -228,72 +228,72 @@ function checkStateOnReadyPromiseResolve
     'Animation.currentTime should be less than the local time ' +
     'equivalent of the timeline\'s currentTime on the first paint tick ' +
     'after animation creation');
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" on the first paint ' +
     'tick after animation creation');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" on the first paint tick after animation creation');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, UNANIMATED_POSITION,
                 'the computed value of margin-left should be unaffected ' +
                 'by an animation with a delay on ready Promise resolve');
 }
 
 // Called when currentTime is set to the time the active interval starts.
 function checkStateAtActiveIntervalStartTime(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" at the start of ' +
     'the active interval');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" at the start of the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_between_inclusive(marginLeft, INITIAL_POSITION, TEN_PCT_POSITION,
     'the computed value of margin-left should be close to the value at the ' +
     'beginning of the animation');
 }
 
 function checkStateAtFiftyPctOfActiveInterval(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, FIFTY_PCT_POSITION,
     'the computed value of margin-left should be half way through the ' +
     'animation at the midpoint of the active interval');
 }
 
 // Called when currentTime is set to the time the active interval ends.
 function checkStateAtActiveIntervalEndTime(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
   assert_equals(animation.playState, 'finished',
     'Animation.playState should be "finished" at the end of ' +
     'the active interval');
 
-  assert_equals(animation.source.target.style.animationPlayState, "running",
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, "running",
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"finished" at the end of the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, UNANIMATED_POSITION,
     'the computed value of margin-left should be unaffected ' +
     'by the animation at the end of the active duration when the ' +
     'animation-fill-mode is none');
 }
 
 
@@ -309,18 +309,18 @@ test(function(t)
   assert_equals(animation.currentTime, 0,
     'Animation.currentTime should be zero when an animation ' +
     'is initially created');
 
   assert_equals(animation.playState, "pending",
     'Animation.playState should be "pending" when an animation ' +
     'is initially created');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" when an animation is initially created');
 
   // XXX Ideally we would have a test to check the ready Promise is initially
   // unresolved, but currently there is no Web API to do that. Waiting for the
   // ready Promise with a timeout doesn't work because the resolved callback
   // will be called (async) regardless of whether the Promise was resolved in
   // the past or is resolved in the future.
 
--- a/dom/animation/test/css-animations/test_animation-player-starttime.html
+++ b/dom/animation/test/css-animations/test_animation-player-starttime.html
@@ -205,72 +205,72 @@ function checkStateOnReadyPromiseResolve
   assert_less_than_equal(animation.startTime, animation.timeline.currentTime,
     'Animation.startTime should be less than the timeline\'s ' +
     'currentTime on the first paint tick after animation creation');
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" on the first paint ' +
     'tick after animation creation');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" on the first paint tick after animation creation');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, UNANIMATED_POSITION,
                 'the computed value of margin-left should be unaffected ' +
                 'by an animation with a delay on ready Promise resolve');
 }
 
 // Called when startTime is set to the time the active interval starts.
 function checkStateAtActiveIntervalStartTime(animation)
 {
   // We don't test animation.startTime since our caller just set it.
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" at the start of ' +
     'the active interval');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" at the start of the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_between_inclusive(marginLeft, INITIAL_POSITION, TEN_PCT_POSITION,
     'the computed value of margin-left should be close to the value at the ' +
     'beginning of the animation');
 }
 
 function checkStateAtFiftyPctOfActiveInterval(animation)
 {
   // We don't test animation.startTime since our caller just set it.
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, FIFTY_PCT_POSITION,
     'the computed value of margin-left should be half way through the ' +
     'animation at the midpoint of the active interval');
 }
 
 // Called when startTime is set to the time the active interval ends.
 function checkStateAtActiveIntervalEndTime(animation)
 {
   // We don't test animation.startTime since our caller just set it.
 
   assert_equals(animation.playState, 'finished',
     'Animation.playState should be "finished" at the end of ' +
     'the active interval');
 
-  assert_equals(animation.source.target.style.animationPlayState, "running",
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, "running",
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"finished" at the end of the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, UNANIMATED_POSITION,
     'the computed value of margin-left should be unaffected ' +
     'by the animation at the end of the active duration when the ' +
     'animation-fill-mode is none');
 }
 
 test(function(t)
--- a/dom/animation/test/css-animations/test_effect-name.html
+++ b/dom/animation/test/css-animations/test_effect-name.html
@@ -10,28 +10,28 @@
 }
 </style>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'xyz 100s';
-  assert_equals(div.getAnimations()[0].source.name, 'xyz',
+  assert_equals(div.getAnimations()[0].effect.name, 'xyz',
                 'Animation effect name matches keyframes rule name');
 }, 'Effect name makes keyframe rule');
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'x\\yz 100s';
-  assert_equals(div.getAnimations()[0].source.name, 'xyz',
+  assert_equals(div.getAnimations()[0].effect.name, 'xyz',
                 'Escaped animation effect name matches keyframes rule name');
 }, 'Escaped animation name');
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'x\\79 z 100s';
-  assert_equals(div.getAnimations()[0].source.name, 'xyz',
+  assert_equals(div.getAnimations()[0].effect.name, 'xyz',
                 'Hex-escaped animation name matches keyframes rule'
                 + ' name');
 }, 'Animation name with hex-escape');
 
 </script>
--- a/dom/animation/test/css-animations/test_effect-target.html
+++ b/dom/animation/test/css-animations/test_effect-target.html
@@ -9,13 +9,13 @@
 </style>
 <script>
 'use strict';
 
 test(function(t) {
   var div = addDiv(t);
   div.style.animation = 'anim 100s';
   var animation = div.getAnimations()[0];
-  assert_equals(animation.source.target, div,
+  assert_equals(animation.effect.target, div,
     'Animation.target is the animatable div');
 }, 'Returned CSS animations have the correct Animation.target');
 
 </script>
--- a/dom/animation/test/css-animations/test_element-get-animation-players.html
+++ b/dom/animation/test/css-animations/test_element-get-animation-players.html
@@ -238,16 +238,16 @@ test(function(t) {
                 'animation\'s play state is updated');
   assert_equals(originalAnimation, pendingAnimation,
                 'getAnimations returns the same objects even when their'
                 + ' play state changes');
 
   // Update duration (an Animation change)
   div.style.animationDuration = '200s';
   var extendedAnimation = div.getAnimations()[0];
-  // FIXME: Check extendedAnimation.source.timing.duration has changed once the
+  // FIXME: Check extendedAnimation.effect.timing.duration has changed once the
   // API is available
   assert_equals(originalAnimation, extendedAnimation,
                 'getAnimations returns the same objects even when their'
                 + ' duration changes');
 }, 'getAnimations returns objects with the same identity');
 
 </script>
--- a/dom/animation/test/css-transitions/test_animation-player-currenttime.html
+++ b/dom/animation/test/css-transitions/test_animation-player-currenttime.html
@@ -189,21 +189,21 @@ function EventWatcher(watchedNode, event
 function checkStateOnSettingCurrentTimeToZero(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" at the start of ' +
     'the start delay');
 
-  assert_equals(animation.source.target.style.animationPlayState, 'running',
-    'Animation.source.target.style.animationPlayState should be ' +
+  assert_equals(animation.effect.target.style.animationPlayState, 'running',
+    'Animation.effect.target.style.animationPlayState should be ' +
     '"running" at the start of the start delay');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, UNANIMATED_POSITION,
                 'the computed value of margin-left should be unaffected ' +
                 'at the beginning of the start delay');
 }
 
 // Called when the ready Promise's callbacks should happen
 function checkStateOnReadyPromiseResolved(animation)
@@ -214,60 +214,60 @@ function checkStateOnReadyPromiseResolve
     'Animation.currentTime should be less than the local time ' +
     'equivalent of the timeline\'s currentTime on the first paint tick ' +
     'after animation creation');
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" on the first paint ' +
     'tick after animation creation');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, INITIAL_POSITION,
                 'the computed value of margin-left should be unaffected ' +
                 'by an animation with a delay on ready Promise resolve');
 }
 
 // Called when currentTime is set to the time the active interval starts.
 function checkStateAtActiveIntervalStartTime(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" at the start of ' +
     'the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_between_inclusive(marginLeft, INITIAL_POSITION, TEN_PCT_POSITION,
     'the computed value of margin-left should be close to the value at the ' +
     'beginning of the animation');
 }
 
 function checkStateAtFiftyPctOfActiveInterval(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, FIFTY_PCT_POSITION,
     'the computed value of margin-left should be half way through the ' +
     'animation at the midpoint of the active interval');
 }
 
 // Called when currentTime is set to the time the active interval ends.
 function checkStateAtActiveIntervalEndTime(animation)
 {
   // We don't test animation.currentTime since our caller just set it.
 
   assert_equals(animation.playState, 'finished',
     'Animation.playState should be "finished" at the end of ' +
     'the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, END_POSITION,
     'the computed value of margin-left should be the final transitioned-to ' +
     'value at the end of the active duration');
 }
 
 test(function(t)
 {
--- a/dom/animation/test/css-transitions/test_animation-player-starttime.html
+++ b/dom/animation/test/css-transitions/test_animation-player-starttime.html
@@ -195,60 +195,60 @@ function checkStateOnReadyPromiseResolve
   assert_less_than_equal(animation.startTime, animation.timeline.currentTime,
     'Animation.startTime should be less than the timeline\'s ' +
     'currentTime on the first paint tick after animation creation');
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" on the first paint ' +
     'tick after animation creation');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, INITIAL_POSITION,
                 'the computed value of margin-left should be unaffected ' +
                 'by an animation with a delay on ready Promise resolve');
 }
 
 // Called when startTime is set to the time the active interval starts.
 function checkStateAtActiveIntervalStartTime(animation)
 {
   // We don't test animation.startTime since our caller just set it.
 
   assert_equals(animation.playState, 'running',
     'Animation.playState should be "running" at the start of ' +
     'the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_between_inclusive(marginLeft, INITIAL_POSITION, TEN_PCT_POSITION,
     'the computed value of margin-left should be close to the value at the ' +
     'beginning of the animation');
 }
 
 function checkStateAtFiftyPctOfActiveInterval(animation)
 {
   // We don't test animation.startTime since our caller just set it.
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, FIFTY_PCT_POSITION,
     'the computed value of margin-left should be half way through the ' +
     'animation at the midpoint of the active interval');
 }
 
 // Called when startTime is set to the time the active interval ends.
 function checkStateAtActiveIntervalEndTime(animation)
 {
   // We don't test animation.startTime since our caller just set it.
 
   assert_equals(animation.playState, 'finished',
     'Animation.playState should be "finished" at the end of ' +
     'the active interval');
 
-  var div = animation.source.target;
+  var div = animation.effect.target;
   var marginLeft = parseFloat(getComputedStyle(div).marginLeft);
   assert_equals(marginLeft, END_POSITION,
     'the computed value of margin-left should be the final transitioned-to ' +
     'value at the end of the active duration');
 }
 
 test(function(t)
 {
--- a/dom/animation/test/css-transitions/test_effect-name.html
+++ b/dom/animation/test/css-transitions/test_effect-name.html
@@ -11,14 +11,14 @@ test(function(t) {
   var div = addDiv(t);
 
   // Add a transition
   div.style.left = '0px';
   window.getComputedStyle(div).transitionProperty;
   div.style.transition = 'all 100s';
   div.style.left = '100px';
 
-  assert_equals(div.getAnimations()[0].source.name, 'left',
+  assert_equals(div.getAnimations()[0].effect.name, 'left',
                 'The name for the transitions corresponds to the property ' +
                 'being transitioned');
 }, 'Effect name for transitions');
 
 </script>
--- a/dom/animation/test/css-transitions/test_effect-target.html
+++ b/dom/animation/test/css-transitions/test_effect-target.html
@@ -11,13 +11,13 @@ test(function(t) {
   var div = addDiv(t);
 
   div.style.left = '0px';
   window.getComputedStyle(div).transitionProperty;
   div.style.transition = 'left 100s';
   div.style.left = '100px';
 
   var animation = div.getAnimations()[0];
-  assert_equals(animation.source.target, div,
+  assert_equals(animation.effect.target, div,
     'Animation.target is the animatable div');
 }, 'Returned CSS transitions have the correct Animation.target');
 
 </script>
--- a/dom/base/nsDOMMutationObserver.cpp
+++ b/dom/base/nsDOMMutationObserver.cpp
@@ -323,17 +323,17 @@ void nsMutationReceiver::NodeWillBeDestr
   NS_ASSERTION(!mParent, "Shouldn't have mParent here!");
   Disconnect(true);
 }
 
 void
 nsAnimationReceiver::RecordAnimationMutation(AnimationPlayer* aPlayer,
                                              AnimationMutation aMutationType)
 {
-  KeyframeEffectReadonly* effect = aPlayer->GetSource();
+  KeyframeEffectReadonly* effect = aPlayer->GetEffect();
   if (!effect) {
     return;
   }
 
   Element* animationTarget = effect->GetTarget();
   if (!animationTarget) {
     return;
   }
--- a/dom/base/nsNodeUtils.cpp
+++ b/dom/base/nsNodeUtils.cpp
@@ -213,17 +213,17 @@ nsNodeUtils::ContentRemoved(nsINode* aCo
   IMPL_MUTATION_NOTIFICATION(ContentRemoved, aContainer,
                              (document, container, aChild, aIndexInContainer,
                               aPreviousSibling));
 }
 
 static inline Element*
 GetTarget(AnimationPlayer* aPlayer)
 {
-  KeyframeEffectReadonly* effect = aPlayer->GetSource();
+  KeyframeEffectReadonly* effect = aPlayer->GetEffect();
   if (!effect) {
     return nullptr;
   }
 
   Element* target;
   nsCSSPseudoElements::Type pseudoType;
   effect->GetTarget(target, pseudoType);
 
--- a/dom/webidl/AnimationPlayer.webidl
+++ b/dom/webidl/AnimationPlayer.webidl
@@ -9,21 +9,21 @@
  * Copyright © 2014 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
  * liability, trademark and document use rules apply.
  */
 
 enum AnimationPlayState { "idle", "pending", "running", "paused", "finished" };
 
 [Func="nsDocument::IsWebAnimationsEnabled"]
 interface AnimationPlayer {
-  // Bug 1049975: Make 'source' writeable
+  // Bug 1049975: Make 'effect' writeable
   // FIXME: In a later patch in this series we'll rename KeyframeEffectReadonly
   // with AnimationEffectReadonly
   [Pure]
-  readonly attribute KeyframeEffectReadonly? source;
+  readonly attribute KeyframeEffectReadonly? effect;
   readonly attribute AnimationTimeline timeline;
   [BinaryName="startTimeAsDouble"]
   attribute double? startTime;
   [SetterThrows, BinaryName="currentTimeAsDouble"]
   attribute double? currentTime;
 
            attribute double             playbackRate;
   [BinaryName="playStateFromJS"]
--- a/layout/base/nsDisplayList.cpp
+++ b/layout/base/nsDisplayList.cpp
@@ -347,29 +347,29 @@ ToTimingFunction(const ComputedTimingFun
 }
 
 static void
 AddAnimationForProperty(nsIFrame* aFrame, const AnimationProperty& aProperty,
                         AnimationPlayer* aPlayer, Layer* aLayer,
                         AnimationData& aData, bool aPending)
 {
   MOZ_ASSERT(aLayer->AsContainerLayer(), "Should only animate ContainerLayer");
-  MOZ_ASSERT(aPlayer->GetSource(),
+  MOZ_ASSERT(aPlayer->GetEffect(),
              "Should not be adding an animation for a player without"
-             " an animation");
+             " an effect");
   nsStyleContext* styleContext = aFrame->StyleContext();
   nsPresContext* presContext = aFrame->PresContext();
   nsRect bounds = nsDisplayTransform::GetFrameBoundsForTransform(aFrame);
 
   layers::Animation* animation =
     aPending ?
     aLayer->AddAnimationForNextTransaction() :
     aLayer->AddAnimation();
 
-  const AnimationTiming& timing = aPlayer->GetSource()->Timing();
+  const AnimationTiming& timing = aPlayer->GetEffect()->Timing();
   Nullable<TimeDuration> startTime = aPlayer->GetCurrentOrPendingStartTime();
   animation->startTime() = startTime.IsNull()
                            ? TimeStamp()
                            : aPlayer->Timeline()->ToTimeStamp(
                               startTime.Value() + timing.mDelay);
   animation->initialCurrentTime() = aPlayer->GetCurrentTime().Value()
                                     - timing.mDelay;
   animation->duration() = timing.mIterationDuration;
@@ -416,17 +416,17 @@ AddAnimationsForProperty(nsIFrame* aFram
              "inconsistent property flags");
 
   // Add from first to last (since last overrides)
   for (size_t playerIdx = 0; playerIdx < aPlayers.Length(); playerIdx++) {
     AnimationPlayer* player = aPlayers[playerIdx];
     if (!player->IsPlaying()) {
       continue;
     }
-    dom::KeyframeEffectReadonly* effect = player->GetSource();
+    dom::KeyframeEffectReadonly* effect = player->GetEffect();
     MOZ_ASSERT(effect, "A playing player should have a target effect");
     const AnimationProperty* property =
       effect->GetAnimationOfProperty(aProperty);
     if (!property) {
       continue;
     }
 
     // Note that if mWinsInCascade on property was  false,
--- a/layout/base/nsLayoutUtils.cpp
+++ b/layout/base/nsLayoutUtils.cpp
@@ -497,20 +497,20 @@ GetSuitableScale(float aMaxScale, float 
 static void
 GetMinAndMaxScaleForAnimationProperty(nsIContent* aContent,
                                       AnimationPlayerCollection* aPlayers,
                                       gfxSize& aMaxScale,
                                       gfxSize& aMinScale)
 {
   for (size_t playerIdx = aPlayers->mPlayers.Length(); playerIdx-- != 0; ) {
     AnimationPlayer* player = aPlayers->mPlayers[playerIdx];
-    if (!player->GetSource() || player->GetSource()->IsFinishedTransition()) {
+    if (!player->GetEffect() || player->GetEffect()->IsFinishedTransition()) {
       continue;
     }
-    dom::KeyframeEffectReadonly* effect = player->GetSource();
+    dom::KeyframeEffectReadonly* effect = player->GetEffect();
     for (size_t propIdx = effect->Properties().Length(); propIdx-- != 0; ) {
       AnimationProperty& prop = effect->Properties()[propIdx];
       if (prop.mProperty == eCSSProperty_transform) {
         for (uint32_t segIdx = prop.mSegments.Length(); segIdx-- != 0; ) {
           AnimationPropertySegment& segment = prop.mSegments[segIdx];
           gfxSize from = GetScaleForValue(segment.mFromValue,
                                           aContent->GetPrimaryFrame());
           aMaxScale.width = std::max<float>(aMaxScale.width, from.width);
--- a/layout/style/AnimationCommon.cpp
+++ b/layout/style/AnimationCommon.cpp
@@ -601,17 +601,17 @@ AnimationPlayerCollection::CanPerformOnC
   }
 
   for (size_t playerIdx = mPlayers.Length(); playerIdx-- != 0; ) {
     const AnimationPlayer* player = mPlayers[playerIdx];
     if (!player->IsPlaying()) {
       continue;
     }
 
-    const KeyframeEffectReadonly* effect = player->GetSource();
+    const KeyframeEffectReadonly* effect = player->GetEffect();
     MOZ_ASSERT(effect, "A playing player should have an effect");
 
     for (size_t propIdx = 0, propEnd = effect->Properties().Length();
          propIdx != propEnd; ++propIdx) {
       if (IsGeometricProperty(effect->Properties()[propIdx].mProperty)) {
         aFlags = CanAnimateFlags(aFlags | CanAnimate_HasGeometricProperty);
         break;
       }
@@ -620,17 +620,17 @@ AnimationPlayerCollection::CanPerformOnC
 
   bool existsProperty = false;
   for (size_t playerIdx = mPlayers.Length(); playerIdx-- != 0; ) {
     const AnimationPlayer* player = mPlayers[playerIdx];
     if (!player->IsPlaying()) {
       continue;
     }
 
-    const KeyframeEffectReadonly* effect = player->GetSource();
+    const KeyframeEffectReadonly* effect = player->GetEffect();
     MOZ_ASSERT(effect, "A playing player should have an effect");
 
     existsProperty = existsProperty || effect->Properties().Length() > 0;
 
     for (size_t propIdx = 0, propEnd = effect->Properties().Length();
          propIdx != propEnd; ++propIdx) {
       const AnimationProperty& prop = effect->Properties()[propIdx];
       if (!CanAnimatePropertyOnCompositor(mElement,
@@ -650,17 +650,17 @@ AnimationPlayerCollection::CanPerformOnC
   return true;
 }
 
 void
 AnimationPlayerCollection::PostUpdateLayerAnimations()
 {
   nsCSSPropertySet propsHandled;
   for (size_t playerIdx = mPlayers.Length(); playerIdx-- != 0; ) {
-    const auto& properties = mPlayers[playerIdx]->GetSource()->Properties();
+    const auto& properties = mPlayers[playerIdx]->GetEffect()->Properties();
     for (size_t propIdx = properties.Length(); propIdx-- != 0; ) {
       nsCSSProperty prop = properties[propIdx].mProperty;
       if (nsCSSProps::PropHasFlags(prop,
                                    CSS_PROPERTY_CAN_ANIMATE_ON_COMPOSITOR) &&
           !propsHandled.HasProperty(prop)) {
         propsHandled.AddProperty(prop);
         nsChangeHint changeHint = css::CommonAnimationManager::
           LayerAnimationRecordFor(prop)->mChangeHint;
@@ -674,17 +674,17 @@ AnimationPlayerCollection::PostUpdateLay
   }
 }
 
 bool
 AnimationPlayerCollection::HasAnimationOfProperty(
   nsCSSProperty aProperty) const
 {
   for (size_t playerIdx = mPlayers.Length(); playerIdx-- != 0; ) {
-    const KeyframeEffectReadonly* effect = mPlayers[playerIdx]->GetSource();
+    const KeyframeEffectReadonly* effect = mPlayers[playerIdx]->GetEffect();
     if (effect && effect->HasAnimationOfProperty(aProperty) &&
         !effect->IsFinishedTransition()) {
       return true;
     }
   }
   return false;
 }
 
@@ -924,17 +924,17 @@ AnimationPlayerCollection::HasCurrentAni
 
 bool
 AnimationPlayerCollection::HasCurrentAnimationsForProperties(
                               const nsCSSProperty* aProperties,
                               size_t aPropertyCount) const
 {
   for (size_t playerIdx = mPlayers.Length(); playerIdx-- != 0; ) {
     const AnimationPlayer& player = *mPlayers[playerIdx];
-    const KeyframeEffectReadonly* effect = player.GetSource();
+    const KeyframeEffectReadonly* effect = player.GetEffect();
     if (effect &&
         effect->IsCurrent(player) &&
         effect->HasAnimationOfProperties(aProperties, aPropertyCount)) {
       return true;
     }
   }
 
   return false;
--- a/layout/style/nsAnimationManager.cpp
+++ b/layout/style/nsAnimationManager.cpp
@@ -86,21 +86,21 @@ CSSAnimationPlayer::PauseFromStyle()
 
   mIsStylePaused = true;
   DoPause();
 }
 
 void
 CSSAnimationPlayer::QueueEvents(EventArray& aEventsToDispatch)
 {
-  if (!mSource) {
+  if (!mEffect) {
     return;
   }
 
-  ComputedTiming computedTiming = mSource->GetComputedTiming();
+  ComputedTiming computedTiming = mEffect->GetComputedTiming();
 
   if (computedTiming.mPhase == ComputedTiming::AnimationPhase_Null) {
     return; // do nothing
   }
 
   // Note that script can change the start time, so we have to handle moving
   // backwards through the animation as well as forwards. An 'animationstart'
   // is dispatched if we enter the active phase (regardless if that is from
@@ -128,50 +128,50 @@ CSSAnimationPlayer::QueueEvents(EventArr
   } else if (computedTiming.mPhase == ComputedTiming::AnimationPhase_Active) {
     mPreviousPhaseOrIteration = computedTiming.mCurrentIteration;
   } else if (computedTiming.mPhase == ComputedTiming::AnimationPhase_After) {
     mPreviousPhaseOrIteration = PREVIOUS_PHASE_AFTER;
   }
 
   dom::Element* target;
   nsCSSPseudoElements::Type targetPseudoType;
-  mSource->GetTarget(target, targetPseudoType);
+  mEffect->GetTarget(target, targetPseudoType);
 
   uint32_t message;
 
   if (!wasActive && isActive) {
     message = NS_ANIMATION_START;
   } else if (wasActive && !isActive) {
     message = NS_ANIMATION_END;
   } else if (wasActive && isActive && !isSameIteration) {
     message = NS_ANIMATION_ITERATION;
   } else if (skippedActivePhase) {
     // First notifying for start of 0th iteration by appending an
     // 'animationstart':
     StickyTimeDuration elapsedTime =
-      std::min(StickyTimeDuration(mSource->InitialAdvance()),
+      std::min(StickyTimeDuration(mEffect->InitialAdvance()),
                computedTiming.mActiveDuration);
     AnimationEventInfo ei(target, Name(), NS_ANIMATION_START,
                           elapsedTime,
                           PseudoTypeAsString(targetPseudoType));
     aEventsToDispatch.AppendElement(ei);
     // Then have the shared code below append an 'animationend':
     message = NS_ANIMATION_END;
   } else {
     return; // No events need to be sent
   }
 
   StickyTimeDuration elapsedTime;
 
   if (message == NS_ANIMATION_START ||
       message == NS_ANIMATION_ITERATION) {
-    TimeDuration iterationStart = mSource->Timing().mIterationDuration *
+    TimeDuration iterationStart = mEffect->Timing().mIterationDuration *
                                     computedTiming.mCurrentIteration;
     elapsedTime = StickyTimeDuration(std::max(iterationStart,
-                                              mSource->InitialAdvance()));
+                                              mEffect->InitialAdvance()));
   } else {
     MOZ_ASSERT(message == NS_ANIMATION_END);
     elapsedTime = computedTiming.mActiveDuration;
   }
 
   AnimationEventInfo ei(target, Name(), message, elapsedTime,
                         PseudoTypeAsString(targetPseudoType));
   aEventsToDispatch.AppendElement(ei);
@@ -350,19 +350,19 @@ nsAnimationManager::CheckAnimationRule(n
         if (!oldPlayer) {
           continue;
         }
 
         bool animationChanged = false;
 
         // Update the old from the new so we can keep the original object
         // identity (and any expando properties attached to it).
-        if (oldPlayer->GetSource() && newPlayer->GetSource()) {
-          KeyframeEffectReadonly* oldEffect = oldPlayer->GetSource();
-          KeyframeEffectReadonly* newEffect = newPlayer->GetSource();
+        if (oldPlayer->GetEffect() && newPlayer->GetEffect()) {
+          KeyframeEffectReadonly* oldEffect = oldPlayer->GetEffect();
+          KeyframeEffectReadonly* newEffect = newPlayer->GetEffect();
           animationChanged =
             oldEffect->Timing() != newEffect->Timing() ||
             oldEffect->Properties() != newEffect->Properties();
           oldEffect->Timing() = newEffect->Timing();
           oldEffect->Properties() = newEffect->Properties();
         }
 
         // Reset compositor state so animation will be re-synchronized.
@@ -527,17 +527,17 @@ nsAnimationManager::BuildAnimations(nsSt
     timing.mIterationCount = src.GetIterationCount();
     timing.mDirection = src.GetDirection();
     timing.mFillMode = src.GetFillMode();
 
     nsRefPtr<KeyframeEffectReadonly> destEffect =
       new KeyframeEffectReadonly(mPresContext->Document(), aTarget,
                                  aStyleContext->GetPseudoType(), timing,
                                  src.GetName());
-    dest->SetSource(destEffect);
+    dest->SetEffect(destEffect);
 
     // Even in the case where we call PauseFromStyle below, we still need to
     // call PlayFromStyle first. This is because a newly-created player is idle
     // and has no effect until it is played (or otherwise given a start time).
     dest->PlayFromStyle();
 
     if (src.GetPlayState() == NS_STYLE_ANIMATION_PLAY_STATE_PAUSED) {
       dest->PauseFromStyle();
@@ -750,17 +750,17 @@ nsAnimationManager::UpdateCascadeResults
   nsAutoTArray<nsCSSProperty, 2> propertiesToTrack;
 
   {
     nsCSSPropertySet propertiesToTrackAsSet;
 
     for (size_t playerIdx = aElementAnimations->mPlayers.Length();
          playerIdx-- != 0; ) {
       const AnimationPlayer* player = aElementAnimations->mPlayers[playerIdx];
-      const KeyframeEffectReadonly* effect = player->GetSource();
+      const KeyframeEffectReadonly* effect = player->GetEffect();
       if (!effect) {
         continue;
       }
 
       for (size_t propIdx = 0, propEnd = effect->Properties().Length();
            propIdx != propEnd; ++propIdx) {
         const AnimationProperty& prop = effect->Properties()[propIdx];
         // We only bother setting mWinsInCascade for properties that we
@@ -799,17 +799,17 @@ nsAnimationManager::UpdateCascadeResults
    * currently in effect.
    */
 
   bool changed = false;
   for (size_t playerIdx = aElementAnimations->mPlayers.Length();
        playerIdx-- != 0; ) {
     CSSAnimationPlayer* player =
       aElementAnimations->mPlayers[playerIdx]->AsCSSAnimationPlayer();
-    KeyframeEffectReadonly* effect = player->GetSource();
+    KeyframeEffectReadonly* effect = player->GetEffect();
 
     player->mInEffectForCascadeResults = player->HasInEffectSource();
 
     if (!effect) {
       continue;
     }
 
     for (size_t propIdx = 0, propEnd = effect->Properties().Length();
--- a/layout/style/nsTransitionManager.cpp
+++ b/layout/style/nsTransitionManager.cpp
@@ -316,17 +316,17 @@ nsTransitionManager::StyleContextChanged
 
     AnimationPlayerPtrArray& players = collection->mPlayers;
     size_t i = players.Length();
     MOZ_ASSERT(i != 0, "empty transitions list?");
     StyleAnimationValue currentValue;
     do {
       --i;
       AnimationPlayer* player = players[i];
-      dom::KeyframeEffectReadonly* effect = player->GetSource();
+      dom::KeyframeEffectReadonly* effect = player->GetEffect();
       MOZ_ASSERT(effect && effect->Properties().Length() == 1,
                  "Should have one animation property for a transition");
       MOZ_ASSERT(effect && effect->Properties()[0].mSegments.Length() == 1,
                  "Animation property should have one segment for a transition");
       const AnimationProperty& prop = effect->Properties()[0];
       const AnimationPropertySegment& segment = prop.mSegments[0];
           // properties no longer in 'transition-property'
       if ((checkProperties &&
@@ -335,17 +335,17 @@ nsTransitionManager::StyleContextChanged
           // did not start a new transition (because delay and
           // duration are both zero, or because the new value is not
           // interpolable); a new transition would have segment.mToValue
           // matching currentValue
           !ExtractComputedValueForTransition(prop.mProperty, afterChangeStyle,
                                              currentValue) ||
           currentValue != segment.mToValue) {
         // stop the transition
-        if (!player->GetSource()->IsFinishedTransition()) {
+        if (!player->GetEffect()->IsFinishedTransition()) {
           player->Cancel();
           collection->UpdateAnimationGeneration(mPresContext);
         }
         players.RemoveElementAt(i);
       }
     } while (i != 0);
 
     if (players.IsEmpty()) {
@@ -431,17 +431,17 @@ nsTransitionManager::ConsiderStartingTra
 
   bool haveCurrentTransition = false;
   size_t currentIndex = nsTArray<ElementPropertyTransition>::NoIndex;
   const ElementPropertyTransition *oldPT = nullptr;
   if (aElementTransitions) {
     AnimationPlayerPtrArray& players = aElementTransitions->mPlayers;
     for (size_t i = 0, i_end = players.Length(); i < i_end; ++i) {
       const ElementPropertyTransition *iPt =
-        players[i]->GetSource()->AsTransition();
+        players[i]->GetEffect()->AsTransition();
       if (iPt->TransitionProperty() == aProperty) {
         haveCurrentTransition = true;
         currentIndex = i;
         oldPT = iPt;
         break;
       }
     }
   }
@@ -563,38 +563,38 @@ nsTransitionManager::ConsiderStartingTra
   segment.mFromValue = startValue;
   segment.mToValue = endValue;
   segment.mFromKey = 0;
   segment.mToKey = 1;
   segment.mTimingFunction.Init(tf);
 
   nsRefPtr<CSSTransitionPlayer> player = new CSSTransitionPlayer(timeline);
   // The order of the following two calls is important since PlayFromStyle
-  // will add the player to the PendingPlayerTracker of its source content's
-  // document. When we come to make source writeable (bug 1049975) we should
-  // remove this dependency.
-  player->SetSource(pt);
+  // will add the player to the PendingPlayerTracker of its effect's document.
+  // When we come to make effect writeable (bug 1049975) we should remove this
+  // dependency.
+  player->SetEffect(pt);
   player->PlayFromStyle();
 
   if (!aElementTransitions) {
     aElementTransitions =
       GetAnimations(aElement, aNewStyleContext->GetPseudoType(), true);
     if (!aElementTransitions) {
       NS_WARNING("allocating CommonAnimationManager failed");
       return;
     }
   }
 
   AnimationPlayerPtrArray& players = aElementTransitions->mPlayers;
 #ifdef DEBUG
   for (size_t i = 0, i_end = players.Length(); i < i_end; ++i) {
     MOZ_ASSERT(
       i == currentIndex ||
-      (players[i]->GetSource() &&
-       players[i]->GetSource()->AsTransition()->TransitionProperty()
+      (players[i]->GetEffect() &&
+       players[i]->GetEffect()->AsTransition()->TransitionProperty()
          != aProperty),
       "duplicate transitions for property");
   }
 #endif
   if (haveCurrentTransition) {
     players[currentIndex]->Cancel();
     oldPT = nullptr; // Clear pointer so it doesn't dangle
     players[currentIndex] = player;
@@ -676,20 +676,20 @@ nsTransitionManager::UpdateCascadeResult
   }
 
   // Since we should never have more than one transition for the same
   // property, it doesn't matter what order we iterate the transitions.
   // But let's go the same way as animations.
   bool changed = false;
   AnimationPlayerPtrArray& players = aTransitions->mPlayers;
   for (size_t playerIdx = players.Length(); playerIdx-- != 0; ) {
-    MOZ_ASSERT(players[playerIdx]->GetSource() &&
-               players[playerIdx]->GetSource()->Properties().Length() == 1,
+    MOZ_ASSERT(players[playerIdx]->GetEffect() &&
+               players[playerIdx]->GetEffect()->Properties().Length() == 1,
                "Should have one animation property for a transition");
-    AnimationProperty& prop = players[playerIdx]->GetSource()->Properties()[0];
+    AnimationProperty& prop = players[playerIdx]->GetEffect()->Properties()[0];
     bool newWinsInCascade = !propertiesUsed.HasProperty(prop.mProperty);
     if (prop.mWinsInCascade != newWinsInCascade) {
       changed = true;
     }
     prop.mWinsInCascade = newWinsInCascade;
     // assert that we don't need to bother adding the transitioned
     // properties into propertiesUsed
 #ifdef DEBUG
@@ -804,39 +804,39 @@ nsTransitionManager::FlushTransitions(Fl
                  "destroyed the element transitions object");
 
       size_t i = collection->mPlayers.Length();
       MOZ_ASSERT(i != 0, "empty transitions list?");
       bool transitionStartedOrEnded = false;
       do {
         --i;
         AnimationPlayer* player = collection->mPlayers[i];
-        if (!player->GetSource()->IsFinishedTransition()) {
-          MOZ_ASSERT(player->GetSource(),
-                     "Transitions should have source content");
+        if (!player->GetEffect()->IsFinishedTransition()) {
+          MOZ_ASSERT(player->GetEffect(),
+                     "Transitions should have an effect");
           ComputedTiming computedTiming =
-            player->GetSource()->GetComputedTiming();
+            player->GetEffect()->GetComputedTiming();
           if (computedTiming.mPhase == ComputedTiming::AnimationPhase_After) {
             nsCSSProperty prop =
-              player->GetSource()->AsTransition()->TransitionProperty();
+              player->GetEffect()->AsTransition()->TransitionProperty();
             TimeDuration duration =
-              player->GetSource()->Timing().mIterationDuration;
+              player->GetEffect()->Timing().mIterationDuration;
             events.AppendElement(
               TransitionEventInfo(collection->mElement, prop,
                                   duration,
                                   collection->PseudoElement()));
 
             // Leave this transition in the list for one more refresh
             // cycle, since we haven't yet processed its style change, and
             // if we also have (already, or will have from processing
             // transitionend events or other refresh driver notifications)
             // a non-animation style change that would affect it, we need
             // to know not to start a new transition for the transition
             // from the almost-completed value to the final value.
-            player->GetSource()->SetIsFinishedTransition();
+            player->GetEffect()->SetIsFinishedTransition();
             collection->UpdateAnimationGeneration(mPresContext);
             transitionStartedOrEnded = true;
           } else if ((computedTiming.mPhase ==
                       ComputedTiming::AnimationPhase_Active) &&
                      canThrottleTick &&
                      !player->IsRunningOnCompositor()) {
             // Start a transition with a delay where we should start the
             // transition proper.
--- a/toolkit/devtools/server/actors/animation.js
+++ b/toolkit/devtools/server/actors/animation.js
@@ -54,17 +54,17 @@ let AnimationPlayerActor = ActorClass({
    * iteration count from computed-style rather than from waapi. This is needed
    * to know which duration to get, in case there are multiple css animations
    * applied to the same node.
    */
   initialize: function(animationsActor, player, playerIndex) {
     Actor.prototype.initialize.call(this, animationsActor.conn);
 
     this.player = player;
-    this.node = player.source.target;
+    this.node = player.effect.target;
     this.playerIndex = playerIndex;
     this.styles = this.node.ownerDocument.defaultView.getComputedStyle(this.node);
   },
 
   destroy: function() {
     this.player = this.node = this.styles = null;
     Actor.prototype.destroy.call(this);
   },
@@ -110,17 +110,17 @@ let AnimationPlayerActor = ActorClass({
     if (names.contains(",") === -1) {
       return 0;
     }
 
     // If there are several names, retrieve the index of the animation name in
     // the list.
     names = names.split(",").map(n => n.trim());
     for (let i = 0; i < names.length; i ++) {
-      if (names[i] === this.player.source.name) {
+      if (names[i] === this.player.effect.name) {
         return i;
       }
     }
   },
 
   /**
    * Get the animation duration from this player, in milliseconds.
    * Note that the Web Animations API doesn't yet offer a way to retrieve this
@@ -202,17 +202,17 @@ let AnimationPlayerActor = ActorClass({
     // add the corresponding property in the AnimationPlayerFront' initialState
     // getter.
     let newState = {
       // startTime is null whenever the animation is paused or waiting to start.
       startTime: this.player.startTime,
       currentTime: this.player.currentTime,
       playState: this.player.playState,
       playbackRate: this.player.playbackRate,
-      name: this.player.source.name,
+      name: this.player.effect.name,
       duration: this.getDuration(),
       delay: this.getDelay(),
       iterationCount: this.getIterationCount(),
       // isRunningOnCompositor is important for developers to know if their
       // animation is hitting the fast path or not. Currently only true for
       // Firefox OS (where we have compositor animations enabled).
       // Returns false whenever the animation is paused as it is taken off the
       // compositor then.
@@ -547,17 +547,17 @@ let AnimationsActor = exports.Animations
 
       for (let player of addedAnimations) {
         // If the added player already exists, it means we previously filtered
         // it out when it was reported as removed. So filter it out here too.
         if (this.actors.find(a => a.player === player)) {
           continue;
         }
         let actor = AnimationPlayerActor(
-          this, player, player.source.target.getAnimations().indexOf(player));
+          this, player, player.effect.target.getAnimations().indexOf(player));
         this.actors.push(actor);
         eventData.push({
           type: "added",
           player: actor
         });
       }
     }