Skip to content
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

[css-transforms] value of svg transform rotate(r x y) in transition getKeyframes() #5011

Open
george-steel opened this issue Apr 27, 2020 · 1 comment

Comments

@george-steel
Copy link
Contributor

There is currently no consensus between browsers as to how a three-valued rotate operation in a transform presentation attribute is handled in CSS transitions. Currently, chrome interpolates parameters separately, and firefox doesn't transition. As this function is unreperesentable in CSS, chrome's behavior is incompatible with the addition of getKeyframes to transitions.

Since this operation does not contain relative lengths, I would propose computing the operation as a matrix() value for the purposes of transitions and css-typed-om as this interpolates reasonably closely to chrome's existing behavior ans the unimplemented specced version (compute the operation and its neighbors to matrix) and is much less magical and easier to implement (it still forces matrix interpolation).

@george-steel
Copy link
Contributor Author

pull bot pushed a commit to Yannic/chromium that referenced this issue Apr 28, 2020
Fix DCHECK failure which occurred when attempting to serialize such an
operation, which can occur due to the SVG transform presentation
attribute and is unreperesentable in CSS. As there is currently no
consensus on how to handle this case and there are no relatice lengths
in such operations, I am computing them as matrix() values.

See the CSSWG issue at w3c/csswg-drafts#5011
to determine the correct way to handle this. I have proposed the
approach used here.

Add regression test (crashes without patch).

Change-Id: Ia116ead6c451cafc6fb222be3bb52362123bae3d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2163758
Reviewed-by: Rune Lillesveen <futhark@chromium.org>
Reviewed-by: Kevin Ellis <kevers@chromium.org>
Commit-Queue: George Steel <gtsteel@chromium.org>
Cr-Commit-Position: refs/heads/master@{#763427}
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

2 participants