Permalink
Browse files

[web-animations-1] Make `composite` member of Keyframe dictionaries a…

…ccept null values.

This closes #2074.
  • Loading branch information...
birtles committed Jan 11, 2018
1 parent 66c3eeb commit abf76745b50c8943e8b16c13abc61cb6ca814830
Showing with 33 additions and 30 deletions.
  1. +33 −30 web-animations-1/Overview.bs
@@ -4622,7 +4622,7 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
double? offset = null;
double computedOffset;
DOMString easing = "linear";
CompositeOperation? composite;
CompositeOperation? composite = null;
};
</pre>
@@ -4651,8 +4651,8 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
:: The <a>keyframe-specific composite operation</a> used to combine the
values specified in this keyframe with the <a>underlying value</a>.
This member will be absent if the <a>composite operation</a>
specified on the <a>keyframe effect</a> is being used.
This member will be <code>null</code> if the <a>composite
operation</a> specified on the <a>keyframe effect</a> is being used.
</div>
@@ -4672,10 +4672,10 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
<pre class='idl'>
dictionary BaseComputedKeyframe {
double? offset = null;
double computedOffset;
DOMString easing = "linear";
CompositeOperation composite;
double? offset = null;
double computedOffset;
DOMString easing = "linear";
CompositeOperation? composite = null;
};
</pre>
@@ -4953,17 +4953,17 @@ WebIDL-like definition:
dictionary Keyframe {
// ... property-value pairs ...
// i.e. DOMString propertyName
double? offset = null;
DOMString easing = "linear";
CompositeOperation composite;
double? offset = null;
DOMString easing = "linear";
CompositeOperation? composite = null;
};
dictionary PropertyIndexedKeyframes {
// ... property-value and property-valuelist pairs ...
// i.e. (DOMString or sequence&amp;lt;DOMString&amp;gt;) propertyName
(double? or sequence&lt;double?&gt;) offset = [];
(DOMString or sequence&lt;DOMString&gt;) easing = [];
(CompositeOperation or sequence&lt;CompositeOperation&gt;) composite = [];
(double? or sequence&lt;double?&gt;) offset = [];
(DOMString or sequence&lt;DOMString&gt;) easing = [];
(CompositeOperation? or sequence&lt;CompositeOperation?&gt;) composite = [];
};
typedef (sequence&lt;Keyframe&gt; or PropertyIndexedKeyframes) KeyframeArgument;
@@ -4996,8 +4996,8 @@ The meaning and allowed values of each argument is as follows:
:: The <a>keyframe-specific composite operation</a> used to combine the values
specified in this keyframe with the <a>underlying value</a>.
If absent, the <a>composite operation</a> specified on the <a>keyframe
effect</a> will be used.
If <code>null</code>, the <a>composite operation</a> specified on the
<a>keyframe effect</a> will be used.
Since this type cannot be expressed in WebIDL, its processing is defined in
@@ -5048,9 +5048,9 @@ otherwise, using the following procedure:
<pre class='idl'>
dictionary BasePropertyIndexedKeyframe {
(double? or sequence&lt;double?&gt;) offset = [];
(DOMString or sequence&lt;DOMString&gt;) easing = [];
(CompositeOperation or sequence&lt;CompositeOperation&gt;) composite = [];
(double? or sequence&lt;double?&gt;) offset = [];
(DOMString or sequence&lt;DOMString&gt;) easing = [];
(CompositeOperation? or sequence&lt;CompositeOperation?&gt;) composite = [];
};
</pre>
@@ -5059,9 +5059,9 @@ otherwise, using the following procedure:
<pre class='idl'>
dictionary BaseKeyframe {
double? offset = null;
DOMString easing = "linear";
CompositeOperation composite;
double? offset = null;
DOMString easing = "linear";
CompositeOperation? composite = null;
};
</pre>
@@ -5284,20 +5284,22 @@ keyframes using the following procedure:
1. If the &ldquo;composite&rdquo; member of the <var>property-indexed
keyframe</var> is <em>not</em> an empty sequence:
1. Let <var>composite modes</var> be a sequence of <a>composite
operations</a> assigned from the &ldquo;composite&rdquo; member
of <var>property-indexed keyframe</var>.
If that member is a single <a>composite operation</a>, let
<var>composite modes</var> be a sequence of length one, with
the value of the &ldquo;composite&rdquo; as its single item.
1. Let <var>composite modes</var> be a sequence of <a>nullable</a>
<a>composite operations</a> assigned from the
&ldquo;composite&rdquo; member of <var>property-indexed
keyframe</var>.
If that member is a single <a>nullable</a> <a>composite
operation</a>, let <var>composite modes</var> be a sequence of
length one, with the value of the &ldquo;composite&rdquo; as its
single item.
1. As with <var>easings</var>, if <var>composite modes</var>
has fewer items than <var>processed keyframes</var>, repeat the
elements in <var>composite modes</var> successively starting
from the beginning of the list until <var>composite modes</var>
has as many items as <var>processed keyframes</var>.
1. Assign each value in <var>composite modes</var> to the
1. Assign each non-null value in <var>composite modes</var> to the
<a>keyframe-specific composite operation</a> on the
<a>keyframe</a> with the corresponding position in
<var>processed keyframes</var> until the end of <var>processed
@@ -5901,8 +5903,9 @@ The following changes have been made since the <a
programming interface using <code>cssOffset</code> to avoid conflict with
the attribute name used to specify keyframe offsets.
* Updated the procedure to <a>process a keyframes argument</a> to allow
specifying <code>offset</code>, <code>composite</code> and mulitple
<code>easing</code> values.
specifying <code>offset</code>, <code>composite</code> and multiple
<code>easing</code> values including allowing <code>null</code> values for
<code>composite</code>.
* Changed the type of the
{{KeyframeEffectReadOnly/KeyframeEffectReadOnly(target, keyframes,
options)/target}} argument to the {{KeyframeEffect}} and

0 comments on commit abf7674

Please sign in to comment.