Skip to content

Commit

Permalink
[web-animations-1] Convert Animatable to an interface mixin
Browse files Browse the repository at this point in the history
This fixes #2076.
  • Loading branch information
birtles committed Dec 19, 2017
1 parent d354480 commit c7f2ee4
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions web-animations-1/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -4831,7 +4831,7 @@ The following methods all accept a set of keyframes as an argument:
* the {{KeyframeEffect(target, keyframes, options)}} constructor,
* the {{KeyframeEffect/setKeyframes()}} method on the {{KeyframeEffect}}
interface,
* the {{Animatable/animate()}} method of the {{Animatable}} interface.
* the {{Animatable/animate()}} method of the {{Animatable}} interface mixin.

This argument may be specified in the one of two forms as illustrated below.

Expand Down Expand Up @@ -4920,7 +4920,7 @@ This is independent from the <a>timing function</a> that applies to the
entire <a>iteration duration</a> of the <a>keyframe effect</a> as specified
using a {{KeyframeEffectOptions}} object (or {{KeyframeAnimationOptions}}
object when using the {{Animatable/animate()}} method of the {{Animatable}}
interface).
interface mixin).

In the following example, the two statements produce different results.

Expand Down Expand Up @@ -5444,14 +5444,13 @@ enum CompositeOperation {"replace", "add", "accumulate"};
lt="animation accumulation">accumulated</a> on to the
<a>underlying value</a>.

<h3 id="the-animatable-interface">The <code>Animatable</code> interface</h3>
<h3 id="the-animatable-interface-mixin">The <code>Animatable</code> interface mixin</h3>

Objects that may be the target of an {{KeyframeEffectReadOnly}} object implement
the {{Animatable}} interface.
the {{Animatable}} interface mixin.

<pre class='idl'>
[NoInterfaceObject]
interface Animatable {
interface mixin Animatable {
Animation animate (object? keyframes,
optional (unrestricted double or KeyframeAnimationOptions) options);
sequence&lt;Animation&gt; getAnimations ();
Expand Down Expand Up @@ -5588,9 +5587,9 @@ partial interface Document {
that have yet to be processed.

Issue(2054): Both this method and {{Animatable/getAnimations()}} on the
{{Animatable}} interface require retaining forwards-filling
<a>animation effects</a> and their <a>animations</a>
such that a document that
{{Animatable}} interface mixin require retaining
forwards-filling <a>animation effects</a> and their
<a>animations</a> such that a document that
repeatedly produces forwards-filling animations will consume
memory in an unbounded fashion.
We may need to revise this definition (previously these methods
Expand All @@ -5606,7 +5605,7 @@ Since DOM Elements may be the target of an animation,
the {{Element}} interface [[!DOM]] is extended as follows:

<pre class="idl">
Element implements Animatable;
Element includes Animatable;
</pre>

This allows the following kind of usage.
Expand All @@ -5622,7 +5621,7 @@ Since <a>keyframe effects</a> may also target pseudo-elements, the
animatable.

<pre class="idl">
CSSPseudoElement implements Animatable;
CSSPseudoElement includes Animatable;
</pre>

<h3 id="the-animationplaybackevent-interface">The <code>AnimationPlaybackEvent</code> interface</h3>
Expand Down Expand Up @@ -5910,6 +5909,8 @@ The following changes have been made since the <a
from <code>Animatable?</code> to <code>(Element or CSSPseudoElement)?</code>
(<a href="https://github.com/w3c/web-animations/issues/186">#186</a>).
* Dropped the <code>SharedKeyframeList</code> interface.
* Converted {{Animatable}} from a <code>[NoInterfaceObject]</code> interface
to an [=interface mixin=].

The <a
href="https://github.com/w3c/csswg-drafts/commits/master/web-animations-1">changelog</a>
Expand Down

0 comments on commit c7f2ee4

Please sign in to comment.