Bug 1456394 - Drop AnimationEffectTiming(ReadOnly) interfaces; r=bz,hiro
authorBrian Birtles <birtles@gmail.com>
Mon, 07 May 2018 12:58:37 +0900
changeset 417853 99694c74c0f497cd1384484e22e78d260eaf92e6
parent 417852 e85f004907be985e577e78ccba72d5cb5253e137
child 417854 8e9a4a323f0cfce20c7fae76d15c252693a65536
push id33980
push userebalazs@mozilla.com
push dateFri, 11 May 2018 09:35:12 +0000
treeherdermozilla-central@8e9a4a323f0c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbz, hiro
bugs1456394
milestone62.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 1456394 - Drop AnimationEffectTiming(ReadOnly) interfaces; r=bz,hiro MozReview-Commit-ID: KKqAWemDXwv
dom/animation/AnimationEffect.cpp
dom/animation/AnimationEffect.h
dom/animation/AnimationEffectTiming.cpp
dom/animation/AnimationEffectTiming.h
dom/animation/AnimationEffectTimingReadOnly.cpp
dom/animation/AnimationEffectTimingReadOnly.h
dom/animation/KeyframeEffect.cpp
dom/animation/KeyframeEffect.h
dom/animation/moz.build
dom/animation/test/css-transitions/test_event-dispatch.html
dom/tests/mochitest/general/test_interfaces.js
dom/webidl/AnimationEffect.webidl
dom/webidl/AnimationEffectTiming.webidl
dom/webidl/AnimationEffectTimingReadOnly.webidl
dom/webidl/moz.build
--- a/dom/animation/AnimationEffect.cpp
+++ b/dom/animation/AnimationEffect.cpp
@@ -12,45 +12,34 @@
 #include "mozilla/AnimationUtils.h"
 #include "mozilla/FloatingPoint.h"
 
 namespace mozilla {
 namespace dom {
 
 NS_IMPL_CYCLE_COLLECTION_CLASS(AnimationEffect)
 NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(AnimationEffect)
-  if (tmp->mTiming) {
-    tmp->mTiming->Unlink();
-  }
-  NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocument, mTiming, mAnimation)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK(mDocument, mAnimation)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_PRESERVED_WRAPPER
 NS_IMPL_CYCLE_COLLECTION_UNLINK_END
 
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(AnimationEffect)
-  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocument, mTiming, mAnimation)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE(mDocument, mAnimation)
 NS_IMPL_CYCLE_COLLECTION_TRAVERSE_END
 
 NS_IMPL_CYCLE_COLLECTION_TRACE_WRAPPERCACHE(AnimationEffect)
 
 NS_IMPL_CYCLE_COLLECTING_ADDREF(AnimationEffect)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(AnimationEffect)
 
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(AnimationEffect)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
-AnimationEffect::AnimationEffect(
-  nsIDocument* aDocument, AnimationEffectTimingReadOnly* aTiming)
-  : mDocument(aDocument)
-  , mTiming(aTiming)
-{
-  MOZ_ASSERT(aTiming);
-}
-
 // https://drafts.csswg.org/web-animations/#current
 bool
 AnimationEffect::IsCurrent() const
 {
   if (!mAnimation || mAnimation->PlayState() == AnimationPlayState::Finished) {
     return false;
   }
 
@@ -62,30 +51,25 @@ AnimationEffect::IsCurrent() const
 // https://drafts.csswg.org/web-animations/#in-effect
 bool
 AnimationEffect::IsInEffect() const
 {
   ComputedTiming computedTiming = GetComputedTiming();
   return !computedTiming.mProgress.IsNull();
 }
 
-already_AddRefed<AnimationEffectTimingReadOnly>
-AnimationEffect::Timing()
-{
-  RefPtr<AnimationEffectTimingReadOnly> temp(mTiming);
-  return temp.forget();
-}
-
 void
 AnimationEffect::SetSpecifiedTiming(const TimingParams& aTiming)
 {
-  if (mTiming->AsTimingParams() == aTiming) {
+  if (mTiming == aTiming) {
     return;
   }
-  mTiming->SetTimingParams(aTiming);
+
+  mTiming = aTiming;
+
   if (mAnimation) {
     Maybe<nsAutoAnimationMutationBatch> mb;
     if (AsKeyframeEffect() && AsKeyframeEffect()->GetTarget()) {
       mb.emplace(AsKeyframeEffect()->GetTarget()->mElement->OwnerDoc());
     }
 
     mAnimation->NotifyEffectTimingUpdated();
 
@@ -338,34 +322,25 @@ AnimationEffect::GetComputedTimingAsDict
     aRetVal.mCurrentIteration.SetValue(iteration);
   }
 }
 
 void
 AnimationEffect::UpdateTiming(const OptionalEffectTiming& aTiming,
                               ErrorResult& aRv)
 {
-  TimingParams timing = TimingParams::MergeOptionalEffectTiming(
-    mTiming->AsTimingParams(), aTiming, mDocument, aRv);
+  TimingParams timing =
+    TimingParams::MergeOptionalEffectTiming(mTiming, aTiming, mDocument, aRv);
   if (aRv.Failed()) {
     return;
   }
 
   SetSpecifiedTiming(timing);
 }
 
-AnimationEffect::~AnimationEffect()
-{
-  // mTiming is cycle collected, so we have to do null check first even though
-  // mTiming shouldn't be null during the lifetime of KeyframeEffect.
-  if (mTiming) {
-    mTiming->Unlink();
-  }
-}
-
 Nullable<TimeDuration>
 AnimationEffect::GetLocalTime() const
 {
   // Since the *animation* start time is currently always zero, the local
   // time is equal to the parent time.
   Nullable<TimeDuration> result;
   if (mAnimation) {
     result = mAnimation->GetCurrentTime();
--- a/dom/animation/AnimationEffect.h
+++ b/dom/animation/AnimationEffect.h
@@ -3,46 +3,47 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_AnimationEffect_h
 #define mozilla_dom_AnimationEffect_h
 
 #include "mozilla/ComputedTiming.h"
-#include "mozilla/dom/AnimationEffectTimingReadOnly.h"
 #include "mozilla/dom/BindingDeclarations.h"
 #include "mozilla/dom/Nullable.h"
 #include "mozilla/Maybe.h"
 #include "mozilla/StickyTimeDuration.h"
 #include "mozilla/TimeStamp.h"
 #include "mozilla/TimingParams.h"
 #include "nsCycleCollectionParticipant.h"
 #include "nsWrapperCache.h"
 
 namespace mozilla {
 
 struct ElementPropertyTransition;
 
 namespace dom {
 
 class Animation;
-class AnimationEffectTimingReadOnly;
 class KeyframeEffect;
 struct ComputedEffectTiming;
 
 class AnimationEffect : public nsISupports,
                         public nsWrapperCache
 {
 public:
   NS_DECL_CYCLE_COLLECTING_ISUPPORTS
   NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_CLASS(AnimationEffect)
 
-  AnimationEffect(nsIDocument* aDocument,
-                  AnimationEffectTimingReadOnly* aTiming);
+  AnimationEffect(nsIDocument* aDocument, const TimingParams& aTiming)
+    : mDocument(aDocument)
+    , mTiming(aTiming)
+  {
+  }
 
   virtual KeyframeEffect* AsKeyframeEffect() { return nullptr; }
 
   virtual ElementPropertyTransition* AsTransition() { return nullptr; }
   virtual const ElementPropertyTransition* AsTransition() const
   {
     return nullptr;
   }
@@ -56,21 +57,17 @@ public:
     return SpecifiedTiming().ActiveDuration() != TimeDuration::Forever();
   }
 
   // AnimationEffect interface
   void GetTiming(EffectTiming& aRetVal) const;
   void GetComputedTimingAsDict(ComputedEffectTiming& aRetVal) const;
   void UpdateTiming(const OptionalEffectTiming& aTiming, ErrorResult& aRv);
 
-  already_AddRefed<AnimationEffectTimingReadOnly> Timing();
-  const TimingParams& SpecifiedTiming() const
-  {
-    return mTiming->AsTimingParams();
-  }
+  const TimingParams& SpecifiedTiming() const { return mTiming; }
   void SetSpecifiedTiming(const TimingParams& aTiming);
 
   // This function takes as input the timing parameters of an animation and
   // returns the computed timing at the specified local time.
   //
   // The local time may be null in which case only static parameters such as the
   // active duration are calculated. All other members of the returned object
   // are given a null/initial value.
@@ -93,22 +90,22 @@ public:
    * Returns true if this effect animates one of the properties we consider
    * geometric properties, e.g. properties such as 'width' or 'margin-left'
    * that we try to synchronize with transform animations, on a valid target
    * element.
    */
   virtual bool AffectsGeometry() const = 0;
 
 protected:
-  virtual ~AnimationEffect();
+  virtual ~AnimationEffect() = default;
 
   Nullable<TimeDuration> GetLocalTime() const;
 
 protected:
   RefPtr<nsIDocument> mDocument;
-  RefPtr<AnimationEffectTimingReadOnly> mTiming;
   RefPtr<Animation> mAnimation;
+  TimingParams mTiming;
 };
 
 } // namespace dom
 } // namespace mozilla
 
 #endif // mozilla_dom_AnimationEffect_h
deleted file mode 100644
--- a/dom/animation/AnimationEffectTiming.cpp
+++ /dev/null
@@ -1,152 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/dom/AnimationEffectTiming.h"
-
-#include "mozilla/dom/AnimatableBinding.h"
-#include "mozilla/dom/AnimationEffectTimingBinding.h"
-#include "mozilla/dom/KeyframeEffect.h"
-#include "mozilla/TimingParams.h"
-#include "nsAString.h"
-
-namespace mozilla {
-namespace dom {
-
-JSObject*
-AnimationEffectTiming::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return AnimationEffectTimingBinding::Wrap(aCx, this, aGivenProto);
-}
-
-static inline void
-PostSpecifiedTimingUpdated(KeyframeEffect* aEffect)
-{
-  if (aEffect) {
-    aEffect->NotifySpecifiedTimingUpdated();
-  }
-}
-
-void
-AnimationEffectTiming::SetDelay(double aDelay)
-{
-  TimeDuration delay = TimeDuration::FromMilliseconds(aDelay);
-  if (mTiming.Delay() == delay) {
-    return;
-  }
-  mTiming.SetDelay(delay);
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetEndDelay(double aEndDelay)
-{
-  TimeDuration endDelay = TimeDuration::FromMilliseconds(aEndDelay);
-  if (mTiming.EndDelay() == endDelay) {
-    return;
-  }
-  mTiming.SetEndDelay(endDelay);
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetFill(const FillMode& aFill)
-{
-  if (mTiming.Fill() == aFill) {
-    return;
-  }
-  mTiming.SetFill(aFill);
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetIterationStart(double aIterationStart,
-                                         ErrorResult& aRv)
-{
-  if (mTiming.IterationStart() == aIterationStart) {
-    return;
-  }
-
-  TimingParams::ValidateIterationStart(aIterationStart, aRv);
-  if (aRv.Failed()) {
-    return;
-  }
-
-  mTiming.SetIterationStart(aIterationStart);
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetIterations(double aIterations, ErrorResult& aRv)
-{
-  if (mTiming.Iterations() == aIterations) {
-    return;
-  }
-
-  TimingParams::ValidateIterations(aIterations, aRv);
-  if (aRv.Failed()) {
-    return;
-  }
-
-  mTiming.SetIterations(aIterations);
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetDuration(const UnrestrictedDoubleOrString& aDuration,
-                                   ErrorResult& aRv)
-{
-  Maybe<StickyTimeDuration> newDuration =
-    TimingParams::ParseDuration(aDuration, aRv);
-  if (aRv.Failed()) {
-    return;
-  }
-
-  if (mTiming.Duration() == newDuration) {
-    return;
-  }
-
-  mTiming.SetDuration(Move(newDuration));
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetDirection(const PlaybackDirection& aDirection)
-{
-  if (mTiming.Direction() == aDirection) {
-    return;
-  }
-
-  mTiming.SetDirection(aDirection);
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-void
-AnimationEffectTiming::SetEasing(const nsAString& aEasing, ErrorResult& aRv)
-{
-  Maybe<ComputedTimingFunction> newFunction =
-    TimingParams::ParseEasing(aEasing, mDocument, aRv);
-  if (aRv.Failed()) {
-    return;
-  }
-
-  if (mTiming.TimingFunction() == newFunction) {
-    return;
-  }
-
-  mTiming.SetTimingFunction(Move(newFunction));
-
-  PostSpecifiedTimingUpdated(mEffect);
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/animation/AnimationEffectTiming.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_AnimationEffectTiming_h
-#define mozilla_dom_AnimationEffectTiming_h
-
-#include "mozilla/dom/AnimationEffectTimingReadOnly.h"
-#include "mozilla/Attributes.h" // For MOZ_NON_OWNING_REF
-#include "nsStringFwd.h"
-
-namespace mozilla {
-namespace dom {
-
-class KeyframeEffect;
-
-class AnimationEffectTiming : public AnimationEffectTimingReadOnly
-{
-public:
-  AnimationEffectTiming(nsIDocument* aDocument,
-                        const TimingParams& aTiming,
-                        KeyframeEffect* aEffect)
-    : AnimationEffectTimingReadOnly(aDocument, aTiming)
-    , mEffect(aEffect) { }
-
-  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  void Unlink() override { mEffect = nullptr; }
-
-  void SetDelay(double aDelay);
-  void SetEndDelay(double aEndDelay);
-  void SetFill(const FillMode& aFill);
-  void SetIterationStart(double aIterationStart, ErrorResult& aRv);
-  void SetIterations(double aIterations, ErrorResult& aRv);
-  void SetDuration(const UnrestrictedDoubleOrString& aDuration,
-                   ErrorResult& aRv);
-  void SetDirection(const PlaybackDirection& aDirection);
-  void SetEasing(const nsAString& aEasing, ErrorResult& aRv);
-
-private:
-  KeyframeEffect* MOZ_NON_OWNING_REF mEffect;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_AnimationEffectTiming_h
deleted file mode 100644
--- a/dom/animation/AnimationEffectTimingReadOnly.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#include "mozilla/dom/AnimationEffectTimingReadOnly.h"
-
-#include "mozilla/AnimationUtils.h"
-#include "mozilla/dom/AnimatableBinding.h"
-#include "mozilla/dom/AnimationEffectTimingReadOnlyBinding.h"
-#include "mozilla/dom/CSSPseudoElement.h"
-#include "mozilla/dom/KeyframeEffectBinding.h"
-
-namespace mozilla {
-namespace dom {
-
-NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(AnimationEffectTimingReadOnly, mDocument)
-
-NS_IMPL_CYCLE_COLLECTION_ROOT_NATIVE(AnimationEffectTimingReadOnly, AddRef)
-NS_IMPL_CYCLE_COLLECTION_UNROOT_NATIVE(AnimationEffectTimingReadOnly, Release)
-
-JSObject*
-AnimationEffectTimingReadOnly::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)
-{
-  return AnimationEffectTimingReadOnlyBinding::Wrap(aCx, this, aGivenProto);
-}
-
-void
-AnimationEffectTimingReadOnly::GetDuration(
-    OwningUnrestrictedDoubleOrString& aRetVal) const
-{
-  if (mTiming.Duration()) {
-    aRetVal.SetAsUnrestrictedDouble() = mTiming.Duration()->ToMilliseconds();
-  } else {
-    aRetVal.SetAsString().AssignLiteral("auto");
-  }
-}
-
-void
-AnimationEffectTimingReadOnly::GetEasing(nsString& aRetVal) const
-{
-  if (mTiming.TimingFunction()) {
-    mTiming.TimingFunction()->AppendToString(aRetVal);
-  } else {
-    aRetVal.AssignLiteral("linear");
-  }
-}
-
-} // namespace dom
-} // namespace mozilla
deleted file mode 100644
--- a/dom/animation/AnimationEffectTimingReadOnly.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* vim: set ts=8 sts=2 et sw=2 tw=80: */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-#ifndef mozilla_dom_AnimationEffectTimingReadOnly_h
-#define mozilla_dom_AnimationEffectTimingReadOnly_h
-
-#include "js/TypeDecls.h"
-#include "mozilla/Attributes.h"
-#include "mozilla/ErrorResult.h"
-#include "mozilla/TimingParams.h"
-#include "mozilla/dom/BindingDeclarations.h"
-#include "mozilla/dom/UnionTypes.h"
-#include "nsCycleCollectionParticipant.h"
-#include "nsWrapperCache.h"
-
-namespace mozilla {
-namespace dom {
-
-class AnimationEffectTimingReadOnly : public nsWrapperCache
-{
-public:
-  AnimationEffectTimingReadOnly() = default;
-  AnimationEffectTimingReadOnly(nsIDocument* aDocument,
-                                const TimingParams& aTiming)
-    : mDocument(aDocument)
-    , mTiming(aTiming) { }
-
-  NS_INLINE_DECL_CYCLE_COLLECTING_NATIVE_REFCOUNTING(AnimationEffectTimingReadOnly)
-  NS_DECL_CYCLE_COLLECTION_SCRIPT_HOLDER_NATIVE_CLASS(AnimationEffectTimingReadOnly)
-
-protected:
-  virtual ~AnimationEffectTimingReadOnly() = default;
-
-public:
-  nsISupports* GetParentObject() const { return mDocument; }
-  JSObject* WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto) override;
-
-  double Delay() const { return mTiming.Delay().ToMilliseconds(); }
-  double EndDelay() const { return mTiming.EndDelay().ToMilliseconds(); }
-  FillMode Fill() const { return mTiming.Fill(); }
-  double IterationStart() const { return mTiming.IterationStart(); }
-  double Iterations() const { return mTiming.Iterations(); }
-  void GetDuration(OwningUnrestrictedDoubleOrString& aRetVal) const;
-  PlaybackDirection Direction() const { return mTiming.Direction(); }
-  void GetEasing(nsString& aRetVal) const;
-
-  const TimingParams& AsTimingParams() const { return mTiming; }
-  void SetTimingParams(const TimingParams& aTiming) { mTiming = aTiming; }
-
-  virtual void Unlink() { }
-
-protected:
-  RefPtr<nsIDocument> mDocument;
-  TimingParams mTiming;
-};
-
-} // namespace dom
-} // namespace mozilla
-
-#endif // mozilla_dom_AnimationEffectTimingReadOnly_h
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -68,27 +68,16 @@ NS_INTERFACE_MAP_END_INHERITING(Animatio
 NS_IMPL_ADDREF_INHERITED(KeyframeEffect, AnimationEffect)
 NS_IMPL_RELEASE_INHERITED(KeyframeEffect, AnimationEffect)
 
 KeyframeEffect::KeyframeEffect(
   nsIDocument* aDocument,
   const Maybe<OwningAnimationTarget>& aTarget,
   const TimingParams& aTiming,
   const KeyframeEffectParams& aOptions)
-  : KeyframeEffect(aDocument, aTarget,
-                   new AnimationEffectTiming(aDocument, aTiming, this),
-                   aOptions)
-{
-}
-
-KeyframeEffect::KeyframeEffect(
-  nsIDocument* aDocument,
-  const Maybe<OwningAnimationTarget>& aTarget,
-  AnimationEffectTimingReadOnly* aTiming,
-  const KeyframeEffectParams& aOptions)
   : AnimationEffect(aDocument, aTiming)
   , mTarget(aTarget)
   , mEffectOptions(aOptions)
   , mInEffectOnLastAnimationTimingUpdate(false)
   , mCumulativeChangeHint(nsChangeHint(0))
 {
 }
 
@@ -699,17 +688,17 @@ KeyframeEffect::ConstructKeyframeEffect(
   nsIDocument* doc = AnimationUtils::GetCurrentRealmDocument(aGlobal.Context());
   if (!doc) {
     aRv.Throw(NS_ERROR_FAILURE);
     return nullptr;
   }
 
   // Create a new KeyframeEffect object with aSource's target,
   // iteration composite operation, composite operation, and spacing mode.
-  // The constructor creates a new AnimationEffectTiming object by
+  // The constructor creates a new AnimationEffect object by
   // aSource's TimingParams.
   // Note: we don't need to re-throw exceptions since the value specified on
   //       aSource's timing object can be assumed valid.
   RefPtr<KeyframeEffectType> effect =
     new KeyframeEffectType(doc,
                            aSource.mTarget,
                            aSource.SpecifiedTiming(),
                            aSource.mEffectOptions);
--- a/dom/animation/KeyframeEffect.h
+++ b/dom/animation/KeyframeEffect.h
@@ -295,21 +295,16 @@ public:
 
   static bool HasComputedTimingChanged(
     const ComputedTiming& aComputedTiming,
     IterationCompositeOperation aIterationComposite,
     const Nullable<double>& aProgressOnLastCompose,
     uint64_t aCurrentIterationOnLastCompose);
 
 protected:
-  KeyframeEffect(nsIDocument* aDocument,
-                 const Maybe<OwningAnimationTarget>& aTarget,
-                 AnimationEffectTimingReadOnly* aTiming,
-                 const KeyframeEffectParams& aOptions);
-
   ~KeyframeEffect() override = default;
 
   static Maybe<OwningAnimationTarget>
   ConvertTarget(const Nullable<ElementOrCSSPseudoElement>& aTarget);
 
   template<class KeyframeEffectType, class OptionsType>
   static already_AddRefed<KeyframeEffectType>
   ConstructKeyframeEffect(const GlobalObject& aGlobal,
--- a/dom/animation/moz.build
+++ b/dom/animation/moz.build
@@ -8,18 +8,16 @@ with Files("**"):
     BUG_COMPONENT = ("Core", "DOM: Animation")
 
 MOCHITEST_MANIFESTS += ['test/mochitest.ini']
 MOCHITEST_CHROME_MANIFESTS += ['test/chrome.ini']
 
 EXPORTS.mozilla.dom += [
     'Animation.h',
     'AnimationEffect.h',
-    'AnimationEffectTiming.h',
-    'AnimationEffectTimingReadOnly.h',
     'AnimationTimeline.h',
     'CSSPseudoElement.h',
     'DocumentTimeline.h',
     'KeyframeEffect.h',
 ]
 
 EXPORTS.mozilla += [
     'AnimationComparator.h',
@@ -38,18 +36,16 @@ EXPORTS.mozilla += [
     'PendingAnimationTracker.h',
     'PseudoElementHashEntry.h',
     'TimingParams.h',
 ]
 
 UNIFIED_SOURCES += [
     'Animation.cpp',
     'AnimationEffect.cpp',
-    'AnimationEffectTiming.cpp',
-    'AnimationEffectTimingReadOnly.cpp',
     'AnimationEventDispatcher.cpp',
     'AnimationPerformanceWarning.cpp',
     'AnimationTimeline.cpp',
     'AnimationUtils.cpp',
     'ComputedTimingFunction.cpp',
     'CSSPseudoElement.cpp',
     'DocumentTimeline.cpp',
     'EffectCompositor.cpp',
--- a/dom/animation/test/css-transitions/test_event-dispatch.html
+++ b/dom/animation/test/css-transitions/test_event-dispatch.html
@@ -345,18 +345,18 @@ promise_test(t => {
   });
 }, 'Calculating the interval start and end time with negative start delay.');
 
 promise_test(t => {
   const { transition, watcher, div, handler } =
     setupTransition(t, 'margin-left 100s 100s');
 
   return watcher.wait_for('transitionrun').then(evt => {
-    // We can't set the end delay via generated effect timing.
-    // Because CSS-Transition use the AnimationEffectTimingReadOnly.
+    // We can't set the end delay via generated effect timing
+    // because mutating CSS transitions is not specced yet.
     transition.effect = new KeyframeEffect(div,
                                            { marginleft: [ '0px', '100px' ]},
                                            { duration: 100 * MS_PER_SEC,
                                              endDelay: -50 * MS_PER_SEC });
     // Seek to Before and play.
     transition.cancel();
     transition.play();
     return watcher.wait_for([ 'transitioncancel',
--- a/dom/tests/mochitest/general/test_interfaces.js
+++ b/dom/tests/mochitest/general/test_interfaces.js
@@ -122,20 +122,16 @@ var interfaceNamesInGlobalScope =
     {name: "AbortSignal", insecureContext: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "AnalyserNode", insecureContext: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "Animation", insecureContext: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "AnimationEffect", insecureContext: true, release: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
-    {name: "AnimationEffectTiming", insecureContext: true, release: false},
-// IMPORTANT: Do not change this list without review from a DOM peer!
-    {name: "AnimationEffectTimingReadOnly", insecureContext: true, release: false},
-// IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "AnimationEvent", insecureContext: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "AnimationPlaybackEvent", insecureContext: true, release: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "AnimationTimeline", insecureContext: true, release: false},
 // IMPORTANT: Do not change this list without review from a DOM peer!
     {name: "Attr", insecureContext: true},
 // IMPORTANT: Do not change this list without review from a DOM peer!
--- a/dom/webidl/AnimationEffect.webidl
+++ b/dom/webidl/AnimationEffect.webidl
@@ -52,16 +52,14 @@ dictionary ComputedEffectTiming : Effect
   unrestricted double   activeDuration = 0.0;
   double?               localTime = null;
   double?               progress = null;
   unrestricted double?  currentIteration = null;
 };
 
 [Func="nsDocument::IsWebAnimationsEnabled"]
 interface AnimationEffect {
-  [Cached, Constant]
-  readonly attribute AnimationEffectTimingReadOnly timing;
   EffectTiming getTiming();
   [BinaryName="getComputedTimingAsDict"]
   ComputedEffectTiming getComputedTiming();
   [Throws]
   void updateTiming(optional OptionalEffectTiming timing);
 };
deleted file mode 100644
--- a/dom/webidl/AnimationEffectTiming.webidl
+++ /dev/null
@@ -1,27 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#animationeffecttiming
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
-
-[Func="nsDocument::IsWebAnimationsEnabled"]
-interface AnimationEffectTiming : AnimationEffectTimingReadOnly {
-  inherit attribute double                             delay;
-  inherit attribute double                             endDelay;
-  inherit attribute FillMode                           fill;
-  [SetterThrows]
-  inherit attribute double                             iterationStart;
-  [SetterThrows]
-  inherit attribute unrestricted double                iterations;
-  [SetterThrows]
-  inherit attribute (unrestricted double or DOMString) duration;
-  inherit attribute PlaybackDirection                  direction;
-  [SetterThrows]
-  inherit attribute DOMString                          easing;
-};
deleted file mode 100644
--- a/dom/webidl/AnimationEffectTimingReadOnly.webidl
+++ /dev/null
@@ -1,23 +0,0 @@
-/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * The origin of this IDL file is
- * https://drafts.csswg.org/web-animations/#animationeffecttimingreadonly
- *
- * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C
- * liability, trademark and document use rules apply.
- */
-
-[Func="nsDocument::IsWebAnimationsEnabled"]
-interface AnimationEffectTimingReadOnly {
-  readonly attribute double                             delay;
-  readonly attribute double                             endDelay;
-  readonly attribute FillMode                           fill;
-  readonly attribute double                             iterationStart;
-  readonly attribute unrestricted double                iterations;
-  readonly attribute (unrestricted double or DOMString) duration;
-  readonly attribute PlaybackDirection                  direction;
-  readonly attribute DOMString                          easing;
-};
--- a/dom/webidl/moz.build
+++ b/dom/webidl/moz.build
@@ -360,18 +360,16 @@ WEBIDL_FILES = [
     'AbortSignal.webidl',
     'AboutCapabilities.webidl',
     'AbstractWorker.webidl',
     'AddonManager.webidl',
     'AnalyserNode.webidl',
     'Animatable.webidl',
     'Animation.webidl',
     'AnimationEffect.webidl',
-    'AnimationEffectTiming.webidl',
-    'AnimationEffectTimingReadOnly.webidl',
     'AnimationEvent.webidl',
     'AnimationTimeline.webidl',
     'AnonymousContent.webidl',
     'AppInfo.webidl',
     'AppNotificationServiceOptions.webidl',
     'APZTestData.webidl',
     'Attr.webidl',
     'AudioBuffer.webidl',