Skip to content

[web-animations] Reject both "float" and "offset" in keyframes object #4331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
BorisChiou opened this issue Sep 18, 2019 · 6 comments
Closed

Comments

@BorisChiou
Copy link
Contributor

Based on the spec, we use cssFloat and cssOffset to represent float property and offset property for IDL name conversion. We reject offset if is it not a double value because it is a special attribute in BaseKeyframe. For consistency, maybe we should also reject float in keyframes object, and should only accept cssFloat. (It seems Blink still accept float in keyframes object.)
e.g.

let a = document.body.animate([{ "float": "left" }], 1000);
a.pause();
a.effect.getKeyframes()[0].cssFloat; // Shouldn't be "left".

@birtles If you agree with this, could we add a note in the spec to mention that we reject both offset and float in keyframes object?

@emilio
Copy link
Collaborator

emilio commented Sep 18, 2019

if we allow both float and cssFloat we need to define which one wins if you specify both... Blink doesn't implement proper shorting IIRC so they don't deal with it afaict.

@birtles
Copy link
Contributor

birtles commented Sep 20, 2019

Yes, rejecting float seems reasonable to me. I just need to find time to make the edits (thanks to TPAC I'm being overwhelmed with different reviews at the moment).

@emilio
Copy link
Collaborator

emilio commented Sep 20, 2019

cc @majido

@birtles
Copy link
Contributor

birtles commented Sep 24, 2019

Actually, this is already covered by the procedure to process a keyframe-like object. That has:

  1. Build up a list of animatable properties as follows:
    1. Let animatable properties be a list of property names (including shorthand properties that have longhand sub-properties that are animatable) that can be animated by the implementation.
    2. Convert each property name in animatable properties to the equivalent IDL attribute by applying the animation property name to IDL attribute name algorithm.
  2. Let input properties be the result of calling the EnumerableOwnNames operation with keyframe input as the object.
  3. Make up a new list animation properties that consists of all of the properties that are in both input properties and animatable properties, or which are in input properties and conform to the <custom-property-name> production.

It only ever does a [[Get]] on the animations in the resulting animation properties list.

So in the test case here:

  • animatable properties will include cssFloat (but not float).
  • input properties will be [[float]].

So in step 4 animation properties should be empty.

So this appears to be a blink bug. @BorisChiou do you mind adding a WPT for it? Perhaps by adding float to gNonAnimatableProps in processing-a-keyframes-argument-001.html.

@birtles birtles closed this as completed Sep 24, 2019
@BorisChiou
Copy link
Contributor Author

OK, I will add some for cssFloat/float in WPT.

BorisChiou added a commit to BorisChiou/wpt that referenced this issue Sep 24, 2019
Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.
birtles pushed a commit to web-platform-tests/wpt that referenced this issue Sep 24, 2019
Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.
@stephenmcgruer
Copy link
Contributor

Will be fixed in Chromium by https://chromium-review.googlesource.com/c/chromium/src/+/1822622

aarongable pushed a commit to chromium/chromium that referenced this issue Sep 25, 2019
Bug: w3c/csswg-drafts#4331
Change-Id: I82de40b04f5a59a21708724e3c30b2de14818a2a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1822622
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: Stephen McGruer <smcgruer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699774}
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this issue Sep 26, 2019
…eyframe-like object., a=testonly

Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.

Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.

--

wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239
xeonchen pushed a commit to xeonchen/gecko that referenced this issue Sep 27, 2019
…eyframe-like object., a=testonly

Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.

Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.

--

wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this issue Oct 4, 2019
…eyframe-like object., a=testonly

Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.

Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.

--

wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239

UltraBlame original commit: b477df391f593916fc785daece8caf3374d9ed4f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this issue Oct 4, 2019
…eyframe-like object., a=testonly

Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.

Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.

--

wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239

UltraBlame original commit: b477df391f593916fc785daece8caf3374d9ed4f
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this issue Oct 5, 2019
…eyframe-like object., a=testonly

Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.

Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.

--

wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239

UltraBlame original commit: b477df391f593916fc785daece8caf3374d9ed4f
bhearsum pushed a commit to mozilla-releng/staging-firefox that referenced this issue May 1, 2025
…eyframe-like object., a=testonly

Automatic update from web-platform-tests
[web-animations] Reject "float" in the keyframe-like object.

Add `float` into gNonAnimatableProps so make sure it should be rejected.
This has been discussed in w3c/csswg-drafts#4331.

--

wpt-commits: 936469d6b8c40a84dcd18c506f46ea0c0e308f83
wpt-pr: 19239
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants