Bug 1273784 - Part 3: Implement KeyframeEffect(ReadOnly) copy constructor API. r=hiro
authorBoris Chiou <boris.chiou@gmail.com>
Tue, 01 Nov 2016 18:39:06 +0800
changeset 435606 f71551aae1c61dbb6b38d03adf874b8ec8d4dd69
parent 435605 90787e3bbb8d85f53e4003f6b7a84a63c9c0dee6
child 435607 c543f2472f40a7f8c18f92087857034f7bed9aa7
push id35078
push usermbrubeck@mozilla.com
push dateTue, 08 Nov 2016 22:02:54 +0000
reviewershiro
bugs1273784
milestone52.0a1
Bug 1273784 - Part 3: Implement KeyframeEffect(ReadOnly) copy constructor API. r=hiro MozReview-Commit-ID: 9ju9jeJ8cvq
dom/animation/KeyframeEffect.cpp
dom/animation/KeyframeEffectReadOnly.cpp
--- a/dom/animation/KeyframeEffect.cpp
+++ b/dom/animation/KeyframeEffect.cpp
@@ -46,18 +46,17 @@ KeyframeEffect::Constructor(
                                                  aOptions, aRv);
 }
 
 /* static */ already_AddRefed<KeyframeEffect>
 KeyframeEffect::Constructor(const GlobalObject& aGlobal,
                             KeyframeEffectReadOnly& aSource,
                             ErrorResult& aRv)
 {
-  // TODO: Implement this in the later patches.
-  return nullptr;
+  return ConstructKeyframeEffect<KeyframeEffect>(aGlobal, aSource, aRv);
 }
 
 /* static */ already_AddRefed<KeyframeEffect>
 KeyframeEffect::Constructor(
     const GlobalObject& aGlobal,
     const Nullable<ElementOrCSSPseudoElement>& aTarget,
     JS::Handle<JSObject*> aKeyframes,
     const UnrestrictedDoubleOrKeyframeAnimationOptions& aOptions,
--- a/dom/animation/KeyframeEffectReadOnly.cpp
+++ b/dom/animation/KeyframeEffectReadOnly.cpp
@@ -752,18 +752,17 @@ KeyframeEffectReadOnly::Constructor(
                                                          aRv);
 }
 
 /* static */ already_AddRefed<KeyframeEffectReadOnly>
 KeyframeEffectReadOnly::Constructor(const GlobalObject& aGlobal,
                                     KeyframeEffectReadOnly& aSource,
                                     ErrorResult& aRv)
 {
-  // TODO: Implement this in the later patches.
-  return nullptr;
+  return ConstructKeyframeEffect<KeyframeEffectReadOnly>(aGlobal, aSource, aRv);
 }
 
 void
 KeyframeEffectReadOnly::GetTarget(
     Nullable<OwningElementOrCSSPseudoElement>& aRv) const
 {
   if (!mTarget) {
     aRv.SetNull();