Skip to content

Commit 914ce4b

Browse files
committed
[web-animations-1][web-animations-2] Simplify auto fill mode calculation in level 1
Fixes #2046.
1 parent 6af2321 commit 914ce4b

2 files changed

Lines changed: 35 additions & 13 deletions

File tree

web-animations-1/Overview.bs

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5427,20 +5427,11 @@ The {{AnimationEffect}} interface {#the-animationeffect-interface}
54275427

54285428
When performing timing calculations
54295429
the special string value <code>auto</code> is expanded
5430-
to one of the [=fill modes=] recognized by the timing model
5431-
as follows:
5430+
to [=fill mode/none=].
54325431

5433-
<dl class=switch>
5434-
5435-
: If the [=animation effect=] to which the fill mode is being applied
5436-
is a [=keyframe effect=],
5437-
::
5438-
Use [=fill mode/none=] as the [=fill mode=].
5439-
5440-
: Otherwise,
5441-
:: Use [=fill mode/both=] as the [=fill mode=].
5442-
5443-
</dl>
5432+
Note: The <code>auto</code> value exists as a forwards-compatibility
5433+
measure since future types of [=animation effects=] are expected to
5434+
produce a different computed [=fill mode=].
54445435

54455436
Advisement: As described in [[#fill-behavior]],
54465437
authors are discouraged from using indefinitely filling animations.

web-animations-2/Overview.bs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ urlPrefix: https://drafts.csswg.org/web-animations-1/; type: dfn; spec: web-anim
112112
text: end delay
113113
text: end time
114114
text: fill mode
115+
text: none; for: fill mode; url: fill-mode-none
116+
text: both; for: fill mode; url: fill-mode-both
115117
text: in effect
116118
text: iteration count
117119
text: iteration duration
@@ -140,6 +142,9 @@ urlPrefix: https://drafts.csswg.org/web-animations-1/; type: dfn; spec: web-anim
140142
text: unresolved
141143
text: update an animation's finished state
142144
text: default document timeline
145+
urlPrefix: https://drafts.csswg.org/web-animations-1/; type: dict-member; spec: web-animations-1
146+
text: fill; for: EffectTiming; url: dom-effecttiming-fill
147+
text: fill; for: OptionalEffectTiming; url: dom-optionaleffecttiming-fill
143148
urlPrefix: https://webidl.spec.whatwg.org/; type: dfn; spec: webidl
144149
text: resolve a promise; url: resolve
145150
urlPrefix: http://www.ecma-international.org/ecma-262/6.0/#sec-; type: dfn; spec: ecma-262
@@ -2872,6 +2877,32 @@ where the unit is a valid time unit or percent.
28722877
> <a>sequence effect</a>. The |specified end delay| is converted to an
28732878
> <a>end delay</a> following the [=normalize specified timing=] procedure.
28742879

2880+
: The {{EffectTiming/fill}} and {{OptionalEffectTiming/fill}} members
2881+
:: Replace:
2882+
2883+
> When performing timing calculations
2884+
> the special string value <code>auto</code> is expanded
2885+
> to [=fill mode/none=].
2886+
2887+
with:
2888+
2889+
> When performing timing calculations
2890+
> the special string value <code>auto</code> is expanded
2891+
> to one of the [=fill modes=] recognized by the timing model
2892+
> as follows:
2893+
>
2894+
> <dl class=switch>
2895+
>
2896+
> : If the [=animation effect=] to which the fill mode is being applied
2897+
> is a [=keyframe effect=],
2898+
> ::
2899+
> Use [=fill mode/none=] as the [=fill mode=].
2900+
>
2901+
> : Otherwise,
2902+
> :: Use [=fill mode/both=] as the [=fill mode=].
2903+
>
2904+
> </dl>
2905+
28752906
: <dfn dict-member for=EffectTiming>duration</dfn><dfn dict-member
28762907
for=OptionalEffectTiming lt=duration></dfn>
28772908
:: Update the description as:

0 commit comments

Comments
 (0)