diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 79b0c2ecefa8..82973c07c8c5 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -2091,5 +2091,12 @@ KeyframeEffectReadOnly::ShouldBlockCompositorAnimations(const nsIFrame* return false; } +JSObject* +KeyframeEffect::WrapObject(JSContext* aCx, + JS::Handle aGivenProto) +{ + return KeyframeEffectBinding::Wrap(aCx, this, aGivenProto); +} + } // namespace dom } // namespace mozilla diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index 5a4a52b5f292..64a92b042a60 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -384,6 +384,19 @@ private: static const TimeDuration OverflowRegionRefreshInterval(); }; +class KeyframeEffect : public KeyframeEffectReadOnly +{ +public: + KeyframeEffect(nsIDocument* aDocument, + Element* aTarget, + nsCSSPseudoElements::Type aPseudoType, + const TimingParams& aTiming) + : KeyframeEffectReadOnly(aDocument, aTarget, aPseudoType, aTiming) { } + + JSObject* WrapObject(JSContext* aCx, + JS::Handle aGivenProto) override; +}; + } // namespace dom } // namespace mozilla diff --git a/dom/tests/mochitest/general/test_interfaces.html b/dom/tests/mochitest/general/test_interfaces.html index 2ea01c169ce9..173f4a47d0c9 100644 --- a/dom/tests/mochitest/general/test_interfaces.html +++ b/dom/tests/mochitest/general/test_interfaces.html @@ -727,6 +727,8 @@ var interfaceNamesInGlobalScope = "KeyboardEvent", // IMPORTANT: Do not change this list without review from a DOM peer! {name: "KeyframeEffectReadOnly", release: false}, +// IMPORTANT: Do not change this list without review from a DOM peer! + {name: "KeyframeEffect", release: false}, // IMPORTANT: Do not change this list without review from a DOM peer! "LocalMediaStream", // IMPORTANT: Do not change this list without review from a DOM peer! diff --git a/dom/webidl/KeyframeEffect.webidl b/dom/webidl/KeyframeEffect.webidl index 04786e46933f..d17c400ac427 100644 --- a/dom/webidl/KeyframeEffect.webidl +++ b/dom/webidl/KeyframeEffect.webidl @@ -4,7 +4,7 @@ * You can obtain one at http://mozilla.org/MPL/2.0/. * * The origin of this IDL file is - * http://w3c.github.io/web-animations/#the-keyframeeffect-interfaces + * https://w3c.github.io/web-animations/#the-keyframeeffect-interfaces * * Copyright © 2015 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C * liability, trademark and document use rules apply. @@ -44,3 +44,21 @@ interface KeyframeEffectReadOnly : AnimationEffectReadOnly { // property-value pairs on the object. [Throws] sequence getFrames(); }; + + +// Bug 1211783 Implement KeyframeEffect constructor +// [Constructor (Animatable? target, +// object? frames, +// optional (unrestricted double or KeyframeEffectOptions) options)] +interface KeyframeEffect : KeyframeEffectReadOnly { + // Bug 1067769 - Allow setting KeyframeEffect.target + // inherit attribute Animatable? target; + // Bug 1216843 - implement animation composition + // inherit attribute IterationCompositeOperation iterationComposite; + // Bug 1216844 - implement additive animation + // inherit attribute CompositeOperation composite; + // Bug 1244590 - implement spacing modes + // inherit attribute DOMString spacing; + // Bug 1244591 - implement setFrames + // void setFrames (object? frames); +};