-
Notifications
You must be signed in to change notification settings - Fork 711
[css-transforms-2] Serialization of individual transform when the animation is at 0% or 100% #3290
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
Comments
This relates to the issue of when it's acceptable for a UA to recognize that no interpolation is necessary and use one of the endpoints as-is (e.g. if there is a step timing function and you are on the first/last step etc.). I believe this came up in the context of the I wrote a test case demonstrating where browsers differ on this but now I can't find the issue where that came up so it might not have been Regarding the serialization in this issue, I think it relates in part to whether or not we can get Blink to stop treating |
Came across this whilst porting more interpolation tests from Blink internal to WPT. A similar problem exists for how many axes should be included, e.g. the following failures from Firefox:
Blink is short-circuiting the interpolation at 0%/100%, so we don't expand (say) |
There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9
There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9
There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <[email protected]> Reviewed-by: Xida Chen <[email protected]> Cr-Commit-Position: refs/heads/master@{#699807}
There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <[email protected]> Reviewed-by: Xida Chen <[email protected]> Cr-Commit-Position: refs/heads/master@{#699807}
…testonly Automatic update from web-platform-tests Port scale-interpolation.html to WPT There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <[email protected]> Reviewed-by: Xida Chen <[email protected]> Cr-Commit-Position: refs/heads/master@{#699807} -- wpt-commits: 0291636099aa40d72b71c94a73f620ce8f87406f wpt-pr: 19301
…testonly Automatic update from web-platform-tests Port scale-interpolation.html to WPT There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <[email protected]> Reviewed-by: Xida Chen <[email protected]> Cr-Commit-Position: refs/heads/master@{#699807} -- wpt-commits: 0291636099aa40d72b71c94a73f620ce8f87406f wpt-pr: 19301
…testonly Automatic update from web-platform-tests Port scale-interpolation.html to WPT There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <smcgruerchromium.org> Reviewed-by: Xida Chen <xidachenchromium.org> Cr-Commit-Position: refs/heads/master{#699807} -- wpt-commits: 0291636099aa40d72b71c94a73f620ce8f87406f wpt-pr: 19301 UltraBlame original commit: f8acc8b9478fe3405d1452c27c17b20d7efe6fb7
…testonly Automatic update from web-platform-tests Port scale-interpolation.html to WPT There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <smcgruerchromium.org> Reviewed-by: Xida Chen <xidachenchromium.org> Cr-Commit-Position: refs/heads/master{#699807} -- wpt-commits: 0291636099aa40d72b71c94a73f620ce8f87406f wpt-pr: 19301 UltraBlame original commit: f8acc8b9478fe3405d1452c27c17b20d7efe6fb7
…testonly Automatic update from web-platform-tests Port scale-interpolation.html to WPT There were some remaining tests in the Blink-internal version that were not present in the external/WPT version, so port those over. This work revealed two separate issues; one where the spec does not specify the behavior to use (w3c/csswg-drafts#3290), and one where there is a Chrome bug (https://crbug.com/1007978) Bug: 900581 Change-Id: I8e47cba411f6787440282be3519d18f89a68bbc9 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1823891 Commit-Queue: Stephen McGruer <smcgruerchromium.org> Reviewed-by: Xida Chen <xidachenchromium.org> Cr-Commit-Position: refs/heads/master{#699807} -- wpt-commits: 0291636099aa40d72b71c94a73f620ce8f87406f wpt-pr: 19301 UltraBlame original commit: f8acc8b9478fe3405d1452c27c17b20d7efe6fb7
This should be a general issue I think. IMO, when running an animation,
While calling getComputedStyle() at 0%, the returning interpolated value is something like
While calling getCompustedStyle() at 100%, the returning interpolated value is something like
But basd on the serialization part, if it is a 3d trasnform, we should serialize it as a 3d, right? |
Sorry, I meant to update this last week with the results of my investigations, but I forgot :(. I was originally ready to say "yes, the spec clearly says you always interpolate, Blink is just buggy", but then I found #4378 and the world got a bit weird again. I held off on updating this issue because I wanted to get that one resolved (if there even is a resolution to be done), but then I didn't do any work to resolve it :(.
Maybe I misunderstand, but to Blink this isn't a 3d scale (being pedantic, in this case it wasn't a transform ;)) at this point exactly because we've short-circuited the interpolation. And as per https://drafts.csswg.org/css-transforms-2/#individual-transform-serialization, 2d scales are just 1-2 numbers. |
I see. So the problem is: should we short-circuited the interpolation. Gecko doens't, so it always return the interpolated value (which is 3d scale). However, Blink return the original from/to value (which is 2d scale). Anyway, need the feedback from CSSWG. |
The CSS Working Group just discussed
The full IRC log of that discussion<dael> Topic: Serialization of individual transform when the animation is at 0% or 100%<dael> github: https://github.com//issues/3290 <dael> astearns: Also from heycam. <dael> AmeliaBR: Overview. When interpolating transform functions you often first need to do processing to upgrade function into a form that interpolates with other end. At exact moment when at beginning or end of animations or in frozen animation state is serialization using the upgraded functions or is it using the original as specified functions for the endpoint <dael> AmeliaBR: There are wpt tests that do it one way and someone expected the other. Not sure who does what <dael> dbaron: This can influence transitions, like if you reverse when it's filling you might get different behavior. I've seen that in the past, though maybe rules have been fixed to avoid some of those cases <dael> smfr: I wouldn't expect function upgrading for animation would effect serialization. <dael> AmeliaBR: The issue is specifically about individual transforms and upgrading the none keyword. Not sure how it compares to functions in transform property. I would expect consistancy <dael> dbaron: I was thinking of transform property, not functions. <dael> AmeliaBR: My fault for skimming too quick <dael> smfr: I understand now the endpoint there's ambig. about if you use upgraded functions <dbaron> s/not functions/not individual transform properties/ <dael> TabAtkins: Individual transform properties, given the previous resolution that we should serialize to lowest state I think this answer the question. not for none but the ones that are 3d ot 2d there is an upgrade in the middle. If a none value should serialize as the null value or not when it's an endpoint <dael> astearns: We should resolve on the endpoints not upgrading first? <dael> AmeliaBR: There is a switch inbetween a none vlue and any other value has side effects. Despite previous resolution actual transform side effects are clearly defined. translate: 0 0 has side effects that translate: none does not. Can't just ignore that as a rule <dael> AmeliaBR: If you're in an animation from a transform to antoher value the side effects persist as long as the animation. Makes sense as long as animation persists you have an explicit value instead of none <dbaron> +1 to what AmeliaBR (IRC) just said <dael> TabAtkins: Agree. If animation is active we should preserve that there is a transform b/c none has a lack of side effects <TabAtkins> https://github.com//issues/3290#issuecomment-539719709 <dael> TabAtkins: Further issue is ^ <dael> TabAtkins: There's an example where one endpoint has non-normalize rotation, but during animation we do axis normalization. If it's active do we return normalized or specified non-normalized? Fine with consistent where when animation is running we report the animation's value. <dael> smfr: Does WebANimations have soething to say? <dael> TabAtkins: Yes, it has to report if there is an active animation. NOt sure if it has details about this issue. It knows if an animation is running <dael> smfr: May be a case where we jsut want consistency <dael> TabAtkins: Agree, everything except none case is consistency. I think that leans us to take value animation is working on, not the endpoint value <dael> smfr: Sounds fine to me <dael> astearns: Prop is we return the values the animation is working on while the animation is going and that includes the endpoints per the definition in web animations <dael> astearns: Any concerns with this change? <dael> astearns: Objections? <dael> RESOLVED: We return the values the animation is working on while the animation is going and that includes the endpoints per the definition in web animations |
Chromium has been fixed in https://crrev.com/19620452a45a851f38799bcc2bd5ddb9d5b120ac and https://crrev.com/5f7f67e5a029e564215b859fcab1fb4de740ebbb . I don't think there are any transforms spec changes required here. But it's possible that web-animations changes are needed, so relabeling accordingly. (Though maybe #4378 already covers that?) |
About the serialization of the interpolation result (for individual transforms), our wpt has a testcase like this:
We do animation from
none
to4 3 2
in the above testcase. However, the spec [2] saysThis means at 0%, the serialization should be
1 1 1
because we should convert it intoscale3d
, right? It seems the wpt converts it back tonone
for serialization at 0% or 100% for now.Besides, the following question is:
if we do interpolation from
26 17 9
to2 1
, the serialization result at 100% is2 1
or2 1 1
? Just want to know should we treat the serialization at 0% and 100% as a special case for individual transform? It seems the spec says we should convert it to a interpolatable value during animation, but the current wpt doesn't follow this? (Or maybe other specs define this but I didn't notice.)Thanks.
cc @birtles
[1] https://github.com/web-platform-tests/wpt/blob/master/css/css-transforms/animation/scale-interpolation.html
[2] https://drafts.csswg.org/css-transforms-2/#individual-transforms
The text was updated successfully, but these errors were encountered: