Bug 1211783 - Add KeyframeEffect interface to dom/webidl/KeyframeEffect.webidl. r=smaug,birtles

This commit is contained in:
Ryo Motozawa 2016-02-15 09:34:47 +09:00
parent c0947f55d1
commit 4f9502c418
4 changed files with 41 additions and 1 deletions

View File

@ -2091,5 +2091,12 @@ KeyframeEffectReadOnly::ShouldBlockCompositorAnimations(const nsIFrame*
return false;
}
JSObject*
KeyframeEffect::WrapObject(JSContext* aCx,
JS::Handle<JSObject*> aGivenProto)
{
return KeyframeEffectBinding::Wrap(aCx, this, aGivenProto);
}
} // namespace dom
} // namespace mozilla

View File

@ -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<JSObject*> aGivenProto) override;
};
} // namespace dom
} // namespace mozilla

View File

@ -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!

View File

@ -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<object> 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);
};