Intent to Deprecate and Remove: Throwing on unimplemented but valid keyframe-specific composite values.

50 views
Skip to first unread message

smcg...@chromium.org

unread,
Feb 7, 2018, 1:24:46 PM2/7/18
to blink-dev
(This is a replacement intent for https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/49iInq8luvo which was inaccurate)

Primary eng (and PM) emails


Summary

In the shipped portion of Web Animations, CompositeOperations can be specified on both the animation and as a 'keyframe-specific' composite, like so:

const anim = element.animate(
    // List of keyframes. The second has a keyframe-specific composite.
    [ { color: 'red' }, { color: 'blue', composite: 'add' } ],
    // The animation options, including the animation-level composite value.
    { duration: 2000, composite: 'replace' }
);

Currently (and in line with Firefox), Chrome only supports the 'replace' value for CompositeOperation in stable. However we unfortunately deal with valid-but-unsupported values of CompositeOperation differently depending whether they are passed as keyframe-specific or animation-level:

Animation-level: Chrome will silently convert unsupported-but-valid CompositeOperation values to 'replace'. This is the same as what Firefox does.

Keyframe-specific: Chrome will throw an exception for unsupported-but-valid CompositeOperation values. This is not what Firefox does; it also silently converts them to 'replace'.

We would like to consolidate our parsing behavior to always silently convert such values, and not throw.

Motivation

The current behavior is confusing (we throw in one case but not another), misaligned with other browsers (Firefox never throws), and also breaks the guidelines on Partial Implementations of CSSWG specs.

Interoperability and Compatibility Risk

Some; code that previously tried to detect whether other CompositeOperation values were supported could fail. However this code would also fail in Firefox; see 'Alternative implementation...' comments below.

Edge: element.animate() not supported.
Firefox: Supported; Firefox does not throw for valid composite values even when it doesn't implement them.
Safari: element.animate() not supported.

Alternative implementation suggestion for web developers

In the currently shipped version of the Web Animations spec (in both Firefox and Chrome), developers should only ever assume that composite is 'replace', regardless of what value they specify.

In the future, once 'anim.effect' has shipped, developers can detect the composite value(s) in use via:

anim.effect.composite; // Animation-level composite.
anim.effect.getKeyframes(): // Keyframe-specific composites, if there are any.

Usage information from UseCounter

No UseCounter implemented.

OWP launch tracking bug

http://crbug.com/806139 (note that this bug got conflated with a regression bug relating to Chrome stable, so it's a bit of a confusing read).


Entry on the feature dashboard

No entry. Change is believed to be too small to merit one.

smcg...@chromium.org

unread,
Feb 13, 2018, 9:39:03 AM2/13/18
to blink-dev
Ping for intent review


On Wednesday, February 7, 2018 at 1:24:46 PM UTC-5, smcg...@chromium.org wrote:
(This is a replacement intent for https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/49iInq8luvo which was inaccurate)

Primary eng (and PM) emails

Philip Jägenstedt

unread,
Feb 13, 2018, 10:05:15 AM2/13/18
to smcg...@chromium.org, blink-dev
Are there tests for this that are already failing in web-platform-tests?

Found https://twitter.com/vincentriemer/status/956658285825769472 via the bug, let's make some web developers happy!

LGTM1

On Tue, Feb 13, 2018 at 9:39 PM <smcg...@chromium.org> wrote:
Ping for intent review


On Wednesday, February 7, 2018 at 1:24:46 PM UTC-5, smcg...@chromium.org wrote:
(This is a replacement intent for https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/49iInq8luvo which was inaccurate)

Primary eng (and PM) emails

--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/33cf1c42-6369-4c50-8b02-ff8dfbe8ae26%40chromium.org.

smcg...@chromium.org

unread,
Feb 13, 2018, 10:09:05 AM2/13/18
to blink-dev, smcg...@chromium.org
Yes, although they will only be failing on wpt.fyi because Chromium LayoutTest runs enable all runtime flags. However if you look at https://wpt.fyi/web-animations/interfaces/Animatable/animate.html (which are APIs visible to stable today), many of the tests with "Failed to execute 'animate' on 'Element': Additive animations are not supported." will be fixed by this removal.

On Tuesday, February 13, 2018 at 10:05:15 AM UTC-5, Philip Jägenstedt wrote:
Are there tests for this that are already failing in web-platform-tests?

Found https://twitter.com/vincentriemer/status/956658285825769472 via the bug, let's make some web developers happy!

LGTM1

On Tue, Feb 13, 2018 at 9:39 PM <smcg...@chromium.org> wrote:
Ping for intent review


On Wednesday, February 7, 2018 at 1:24:46 PM UTC-5, smcg...@chromium.org wrote:
(This is a replacement intent for https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/49iInq8luvo which was inaccurate)

Primary eng (and PM) emails

Philip Jägenstedt

unread,
Feb 13, 2018, 11:22:19 AM2/13/18
to smcg...@chromium.org, blink-dev
Great to hear that!

On Tue, Feb 13, 2018, 22:09 <smcg...@chromium.org> wrote:
Yes, although they will only be failing on wpt.fyi because Chromium LayoutTest runs enable all runtime flags. However if you look at https://wpt.fyi/web-animations/interfaces/Animatable/animate.html (which are APIs visible to stable today), many of the tests with "Failed to execute 'animate' on 'Element': Additive animations are not supported." will be fixed by this removal.

On Tuesday, February 13, 2018 at 10:05:15 AM UTC-5, Philip Jägenstedt wrote:
Are there tests for this that are already failing in web-platform-tests?

Found https://twitter.com/vincentriemer/status/956658285825769472 via the bug, let's make some web developers happy!

LGTM1

On Tue, Feb 13, 2018 at 9:39 PM <smcg...@chromium.org> wrote:
Ping for intent review


On Wednesday, February 7, 2018 at 1:24:46 PM UTC-5, smcg...@chromium.org wrote:
(This is a replacement intent for https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/49iInq8luvo which was inaccurate)

Primary eng (and PM) emails

Chris Harrelson

unread,
Feb 15, 2018, 1:39:32 PM2/15/18
to Philip Jägenstedt, smcg...@chromium.org, blink-dev
LGTM2

Please do file a chromestatus.com entry for posterity tracking, only takes a few minutes.

On Tue, Feb 13, 2018 at 8:22 AM, 'Philip Jägenstedt' via blink-dev <blin...@chromium.org> wrote:
Great to hear that!

On Tue, Feb 13, 2018, 22:09 <smcg...@chromium.org> wrote:
Yes, although they will only be failing on wpt.fyi because Chromium LayoutTest runs enable all runtime flags. However if you look at https://wpt.fyi/web-animations/interfaces/Animatable/animate.html (which are APIs visible to stable today), many of the tests with "Failed to execute 'animate' on 'Element': Additive animations are not supported." will be fixed by this removal.

On Tuesday, February 13, 2018 at 10:05:15 AM UTC-5, Philip Jägenstedt wrote:
Are there tests for this that are already failing in web-platform-tests?

Found https://twitter.com/vincentriemer/status/956658285825769472 via the bug, let's make some web developers happy!

LGTM1

On Tue, Feb 13, 2018 at 9:39 PM <smcg...@chromium.org> wrote:
Ping for intent review


On Wednesday, February 7, 2018 at 1:24:46 PM UTC-5, smcg...@chromium.org wrote:
(This is a replacement intent for https://groups.google.com/a/chromium.org/forum/#!topic/blink-dev/49iInq8luvo which was inaccurate)

Primary eng (and PM) emails

To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYc3GJyhC6Tf9hNRBpoNJDeEtKjaM2%3DiK41_wc3eVgyTLw%40mail.gmail.com.

smcg...@chromium.org

unread,
Feb 15, 2018, 1:52:11 PM2/15/18
to blink-dev, foo...@google.com, smcg...@chromium.org, chri...@chromium.org

Rick Byers

unread,
Feb 15, 2018, 3:59:25 PM2/15/18
to smcg...@chromium.org, blink-dev, Philip Jägenstedt, Chris Harrelson
Reply all
Reply to author
Forward
0 new messages