Closed
Bug 1445206
Opened 7 years ago
Closed 7 years ago
scale(0) and equivalents not honoured in WebAnimations
Categories
(Core :: DOM: Animation, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 1394284
People
(Reporter: rearnshaw, Unassigned)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
(deleted),
text/html
|
Details |
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0
Build ID: 20180124084836
Steps to reproduce:
Applied a Web animation to an SVG or HTML element with the following keyframe:
{transform: [
'matrix(0, 0, 0, 0, 0, 0)',
'matrix(1, 0, 0, 1, 0, 0)',
'matrix(0, 0, 0, 0, 0, 0)',
'matrix(1, 0, 0, 1, 0, 0)',
'matrix(0, 0, 0, 0, 0, 0)'
]}
Actual results:
The element does not animate.
Expected results:
The element should have scaled in from zero and back out twice.
The same thing happens if matrix(0, 0, 0, 0, 0, 0) is replaced with scale(0) or matrix(0, 0, 0, 0, 100, 0).
If the keyframes [scale(0), scale(1), scale(0), scale(1), scale(0)] are used it works as expected.
A workaround is to use scale(1e-9) in place of scale(0).
Chrome has issues with this as well though the observed behaviour is different: https://bugs.chromium.org/p/chromium/issues/detail?id=821351
Comment 3•7 years ago
|
||
I believe this is according to spec:
"If one of the matrices for interpolation is non-invertible, the used animation function must fall-back to a discrete animation according to the rules of the respective animation specification."[1]
[1] https://drafts.csswg.org/css-transforms/#matrix-interpolation
Thanks, I wasn't aware of that part of the spec, I'd just assumed transform values were always lerped "somehow".
That explains the behaviour I observed with SVG in Chrome, but Firefox is not applying these keyframes at all, even discretely, not does it apply the fill mode.
Comment 5•7 years ago
|
||
It applies them for me. It would appear you are on Firefox 52. It's possible that there was a bug in our transform interpolation that was fixed when we switched style engines in Firefox 57 last year. Could I ask you to please try on a more recent version?
Just installed 59, it's consistent between HTML and SVG and the spec there, looks like its WAI!
Thanks for checking and sorry for the spurious bug.
Comment 7•7 years ago
|
||
Not at all! Thank you for taking the time to report the bug!
I ran mozregression on this and indeed this appears to have been fixed with Stylo.
Regression range: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5f721a664bf64fed99184a866b60c24a6afcb3a0&tochange=62cebea1d1578461a423a9ca7848706455db9ea5
Despite their not being a check-in for this, I'm going to mark it as FIXED RESOLVED since it appears that's what we've done in the past for bug 1406658 and bug 1376019 etc.
Blocks: stylo-behavior-changes
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
status-firefox59:
--- → fixed
status-firefox60:
--- → fixed
status-firefox61:
--- → fixed
status-firefox-esr52:
--- → wontfix
Resolution: --- → FIXED
Comment 8•7 years ago
|
||
Actually, it looks like it was bug 1394284 that fixed this.
Resolution: FIXED → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•