Closed
Bug 1317652
Opened 8 years ago
Closed 8 years ago
No leading zero in duration attribute breaking SMIL animation
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: tom, Unassigned)
Details
Attachments
(1 file)
3.63 KB,
image/svg+xml
|
Details |
User Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Steps to reproduce:
When using a SMIL animation node, removal of the leading zero in the duration attribute breaks the animation (only applies to animations with durations of less than 1 second).
E.g.
Broken SMIL node:
<animateTransform attributeName="transform" additive="replace" type="translate" repeatCount="indefinite" dur=".667s" keyTimes="0;.25;.5;.75;.937;1" values="12.5,11.9;16.05,11.9;12.5,11.9;9.05,11.9;11.65,11.9;11.65,11.9"/>
Working SMIL node:
<animateTransform attributeName="transform" additive="replace" type="translate" repeatCount="indefinite" dur="0.667s" keyTimes="0;.25;.5;.75;.937;1" values="12.5,11.9;16.05,11.9;12.5,11.9;9.05,11.9;11.65,11.9;11.65,11.9"/>
Actual results:
The animation node doesn't work at all.
The attached animation has one working animation node and several that don't work.
Note that these all work in Webkit/Blink browsers.
Comment 1•8 years ago
|
||
You'll need to get the specification changed. It's that which says no leading zeroes.
https://www.w3.org/TR/SVG/animate.html#ClockValueSyntax
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 2•8 years ago
|
||
Fair enough.
I guess part of the problem is that it's a common SVG optimisation (removing leading zeroes) which is done automatically by tools like SVGO.
This is fine for regular SVG files, but SMIL SVG files then cease to animate in Firefox.
Comment 3•8 years ago
|
||
We're not opposed to implementing such a change if the w3c indicates that's what should happen. If such a change is made we could reopen this bug.
You can contact the w3c SVG folks via: https://lists.w3.org/Archives/Public/www-svg/
Comment 4•8 years ago
|
||
If SVGO produces files which are not compliant with the SVG specification you could always try raising a bug on it. As you say it's only SMIL timing attributes which have this restriction.
Reporter | ||
Comment 5•8 years ago
|
||
That's correct.
Unfortunately due to SMILs forgotten/ignored nature, I doubt the SVGO devs pay much attention to this part of SVG.
I have added a workaround in my tooling, Flash2Svg, which is used by some SMIL producers, so if you guys don't see the need to change anything then I guess it doesn't matter.
You need to log in
before you can comment on or make changes to this bug.
Description
•