Skip to content

Commit abf7674

Browse files
committed
[web-animations-1] Make composite member of Keyframe dictionaries accept null values.
This closes w3c#2074.
1 parent 66c3eeb commit abf7674

File tree

1 file changed

+33
-30
lines changed

1 file changed

+33
-30
lines changed

web-animations-1/Overview.bs

Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4622,7 +4622,7 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
46224622
double? offset = null;
46234623
double computedOffset;
46244624
DOMString easing = "linear";
4625-
CompositeOperation? composite;
4625+
CompositeOperation? composite = null;
46264626
};
46274627
</pre>
46284628
@@ -4651,8 +4651,8 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
46514651
:: The <a>keyframe-specific composite operation</a> used to combine the
46524652
values specified in this keyframe with the <a>underlying value</a>.
46534653
4654-
This member will be absent if the <a>composite operation</a>
4655-
specified on the <a>keyframe effect</a> is being used.
4654+
This member will be <code>null</code> if the <a>composite
4655+
operation</a> specified on the <a>keyframe effect</a> is being used.
46564656
46574657
</div>
46584658
@@ -4672,10 +4672,10 @@ interface KeyframeEffect : KeyframeEffectReadOnly {
46724672
46734673
<pre class='idl'>
46744674
dictionary BaseComputedKeyframe {
4675-
double? offset = null;
4676-
double computedOffset;
4677-
DOMString easing = "linear";
4678-
CompositeOperation composite;
4675+
double? offset = null;
4676+
double computedOffset;
4677+
DOMString easing = "linear";
4678+
CompositeOperation? composite = null;
46794679
};
46804680
</pre>
46814681
@@ -4953,17 +4953,17 @@ WebIDL-like definition:
49534953
dictionary Keyframe {
49544954
// ... property-value pairs ...
49554955
// i.e. DOMString propertyName
4956-
double? offset = null;
4957-
DOMString easing = "linear";
4958-
CompositeOperation composite;
4956+
double? offset = null;
4957+
DOMString easing = "linear";
4958+
CompositeOperation? composite = null;
49594959
};
49604960
49614961
dictionary PropertyIndexedKeyframes {
49624962
// ... property-value and property-valuelist pairs ...
49634963
// i.e. (DOMString or sequence&amp;lt;DOMString&amp;gt;) propertyName
4964-
(double? or sequence&lt;double?&gt;) offset = [];
4965-
(DOMString or sequence&lt;DOMString&gt;) easing = [];
4966-
(CompositeOperation or sequence&lt;CompositeOperation&gt;) composite = [];
4964+
(double? or sequence&lt;double?&gt;) offset = [];
4965+
(DOMString or sequence&lt;DOMString&gt;) easing = [];
4966+
(CompositeOperation? or sequence&lt;CompositeOperation?&gt;) composite = [];
49674967
};
49684968
49694969
typedef (sequence&lt;Keyframe&gt; or PropertyIndexedKeyframes) KeyframeArgument;
@@ -4996,8 +4996,8 @@ The meaning and allowed values of each argument is as follows:
49964996
:: The <a>keyframe-specific composite operation</a> used to combine the values
49974997
specified in this keyframe with the <a>underlying value</a>.
49984998
4999-
If absent, the <a>composite operation</a> specified on the <a>keyframe
5000-
effect</a> will be used.
4999+
If <code>null</code>, the <a>composite operation</a> specified on the
5000+
<a>keyframe effect</a> will be used.
50015001
50025002
50035003
Since this type cannot be expressed in WebIDL, its processing is defined in
@@ -5048,9 +5048,9 @@ otherwise, using the following procedure:
50485048
50495049
<pre class='idl'>
50505050
dictionary BasePropertyIndexedKeyframe {
5051-
(double? or sequence&lt;double?&gt;) offset = [];
5052-
(DOMString or sequence&lt;DOMString&gt;) easing = [];
5053-
(CompositeOperation or sequence&lt;CompositeOperation&gt;) composite = [];
5051+
(double? or sequence&lt;double?&gt;) offset = [];
5052+
(DOMString or sequence&lt;DOMString&gt;) easing = [];
5053+
(CompositeOperation? or sequence&lt;CompositeOperation?&gt;) composite = [];
50545054
};
50555055
</pre>
50565056
@@ -5059,9 +5059,9 @@ otherwise, using the following procedure:
50595059
50605060
<pre class='idl'>
50615061
dictionary BaseKeyframe {
5062-
double? offset = null;
5063-
DOMString easing = "linear";
5064-
CompositeOperation composite;
5062+
double? offset = null;
5063+
DOMString easing = "linear";
5064+
CompositeOperation? composite = null;
50655065
};
50665066
</pre>
50675067
@@ -5284,20 +5284,22 @@ keyframes using the following procedure:
52845284
1. If the &ldquo;composite&rdquo; member of the <var>property-indexed
52855285
keyframe</var> is <em>not</em> an empty sequence:
52865286
5287-
1. Let <var>composite modes</var> be a sequence of <a>composite
5288-
operations</a> assigned from the &ldquo;composite&rdquo; member
5289-
of <var>property-indexed keyframe</var>.
5290-
If that member is a single <a>composite operation</a>, let
5291-
<var>composite modes</var> be a sequence of length one, with
5292-
the value of the &ldquo;composite&rdquo; as its single item.
5287+
1. Let <var>composite modes</var> be a sequence of <a>nullable</a>
5288+
<a>composite operations</a> assigned from the
5289+
&ldquo;composite&rdquo; member of <var>property-indexed
5290+
keyframe</var>.
5291+
If that member is a single <a>nullable</a> <a>composite
5292+
operation</a>, let <var>composite modes</var> be a sequence of
5293+
length one, with the value of the &ldquo;composite&rdquo; as its
5294+
single item.
52935295
52945296
1. As with <var>easings</var>, if <var>composite modes</var>
52955297
has fewer items than <var>processed keyframes</var>, repeat the
52965298
elements in <var>composite modes</var> successively starting
52975299
from the beginning of the list until <var>composite modes</var>
52985300
has as many items as <var>processed keyframes</var>.
52995301
5300-
1. Assign each value in <var>composite modes</var> to the
5302+
1. Assign each non-null value in <var>composite modes</var> to the
53015303
<a>keyframe-specific composite operation</a> on the
53025304
<a>keyframe</a> with the corresponding position in
53035305
<var>processed keyframes</var> until the end of <var>processed
@@ -5901,8 +5903,9 @@ The following changes have been made since the <a
59015903
programming interface using <code>cssOffset</code> to avoid conflict with
59025904
the attribute name used to specify keyframe offsets.
59035905
* Updated the procedure to <a>process a keyframes argument</a> to allow
5904-
specifying <code>offset</code>, <code>composite</code> and mulitple
5905-
<code>easing</code> values.
5906+
specifying <code>offset</code>, <code>composite</code> and multiple
5907+
<code>easing</code> values including allowing <code>null</code> values for
5908+
<code>composite</code>.
59065909
* Changed the type of the
59075910
{{KeyframeEffectReadOnly/KeyframeEffectReadOnly(target, keyframes,
59085911
options)/target}} argument to the {{KeyframeEffect}} and

0 commit comments

Comments
 (0)