An invalid animateMotion keyPoints value prevents future valid values from rendering
Categories
(Core :: SVG, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox142 | --- | fixed |
People
(Reporter: lawson.kight, Assigned: longsonr)
Details
Attachments
(1 file)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:140.0) Gecko/20100101 Firefox/140.0
Steps to reproduce:
Use setAttributeNS to set an invalid keyPoints attribute, then set a subsequent valid result.
See https://codepen.io/lawsonkight/pen/ZYbbojL for example
Actual results:
After setting a valid attribute, the animation remains frozen
Expected results:
The animation should render correctly when a new valid attribute replaces an invalid attribute.
Assignee | ||
Comment 1•24 days ago
•
|
||
Well congratulations you've found bugs in both Firefox and Chrome.
See https://svgwg.org/specs/animations/#ValueAttributes
If 'paced' is specified, any ‘keyTimes’ or ‘keySplines’ will be ignored. For ‘animateMotion’, this is the default ‘calcMode’.
So setting keyPoints to "X" should do nothing. It doesn't mention keyPoints directly but it does say that the number of items must match keyTimes and if keyTimes is ignored then it seems keyPoints must be too.
Assignee | ||
Comment 2•24 days ago
|
||
Assignee | ||
Comment 3•24 days ago
|
||
Updated•24 days ago
|
(In reply to Robert Longson [:longsonr] from comment #1)
Well congratulations you've found bugs in both Firefox and Chrome.
See https://svgwg.org/specs/animations/#ValueAttributes
If 'paced' is specified, any ‘keyTimes’ or ‘keySplines’ will be ignored. For ‘animateMotion’, this is the default ‘calcMode’.
So setting keyPoints to "X" should do nothing. It doesn't mention keyPoints directly but it does say that the number of items must match keyTimes and if keyTimes is ignored then it seems keyPoints must be too.
Thanks for catching that, I overlooked that "paced" is the default calcMode for animateMotion
It looks like there are two independent bugs:
- keyPoints should be ignored if calcMode="paced"
- Animations with bad data should render correctly once the bad data is removed
For number 2, I see that the issues also exists for keyTimes="X" on both <animate> and <animateMotion> elements where calcMode="linear", where changing the keyTimes value from "X" to "0;1" does not fix the broken render unless you completely remove and then re-add the attribute.
Assignee | ||
Comment 7•23 days ago
•
|
||
If keyPoints is ignored then there is no possibility of bad data. You can try this change in the next nightly. If there are any more bugs post that landing then do raise new issues.
That is a workaround on Firefox because removeAttribute clears the cached error state.
Assignee | ||
Comment 8•23 days ago
|
||
and thank you for reporting this.
Comment 9•23 days ago
|
||
bugherder |
Updated•17 days ago
|
Description
•