Closed
Bug 733744
Opened 13 years ago
Closed 1 year ago
animateTransform with a very small duration (less than 1 millisecond) no longer animates
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
122 Branch
Tracking | Status | |
---|---|---|
firefox122 | --- | fixed |
People
(Reporter: longsonr, Assigned: longsonr)
References
()
Details
(Whiteboard: [see comment 11 for explanation])
Attachments
(3 files)
Apparently this example used to work in Firefox 4.
Assignee | ||
Updated•13 years ago
|
Comment 1•13 years ago
|
||
(In reply to Robert Longson from comment #0)
> Apparently this example used to work in Firefox 4.
Confirmed -- in Firefox 4, the parallelogram snaps to a rounded square after 3 seconds.
Comment 2•13 years ago
|
||
This apparently depends on the very small dur="0.0001s" attribute.
If I increase that to 0.1, then the animation succeeds.
Summary: animateTransform no longer animates → animateTransform with a very small duration no longer animates
Comment 3•13 years ago
|
||
Last good nightly: 2011-04-19
First bad nightly: 2011-04-20
Pushlog:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=7d4eb3d3c9de&tochange=45b20f137549
which points to bug 651036
Blocks: 651036
Comment 4•13 years ago
|
||
Comment 5•13 years ago
|
||
Here's a reference case, which exactly matches the just-attached testcase except that the animation's duration is marginally longer (0.001s instead of 0.0001s).
Comment 6•13 years ago
|
||
(That's all the poking I'm going to do on this for now -- if someone else wants to take this and figure out what's going wrong, please be my guest! :))
Comment 7•13 years ago
|
||
This is a known issue with our implementation of frozen to-animation. The way frozen to-animation is defined is really counter-intuitive. See:
http://www.w3.org/Graphics/SVG/WG/wiki/F2F/Auckland_2011/Animation_improvements#Issue:_Frozen_to-animation_is_broken
To support this properly, you need to set a milestone when the frozen animation ends, and actually sample the animation value then. Currently we set milestones, by we only sample the timing model at these times, not the animation values.
For frozen to-animations we currently just use the last sampled value before the animation got frozen. So if the sample rate is not fast enough, or you do a sync, you'll get the wrong result. Hence this bug.
I'd really like to change this behaviour. It's not just that it's hard to implement, but counter-intuitive.
I proposed this on www-svg:
http://lists.w3.org/Archives/Public/www-svg/2011Mar/0082.html
But I didn't have the stamina to see it through.
I think we should just align with Opera here as I think it does what authors expect.
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment hidden (obsolete) |
Comment 11•13 years ago
|
||
I've looked into this and actually what I think is happening is that, since we store times as integers representing milliseconds, dur="0.0001s" is represented as 0 and dur="0.001s" is represented as 1.
Now, SMIL says that the duration must be non-zero. If it is zero it is an error, and if there is an error, we should behave as if the duration was indefinite.
Under the previous discrete to-animation behaviour, where we never visited the underlying value, an indefinite duration would still end up showing the to-value. With the behaviour implemented in bug 651036--where we visit both the underlying value and the to-value--we'll just get stuck on the first value.
I'm not really sure what we ought to do here. It comes down to the precision used for representing times.
I still want to change what we do for frozen to-animation (I have a patch for it) but that's a separate bug.
Assignee | ||
Comment 12•13 years ago
|
||
We could store times as doubles perhaps?
Comment 13•13 years ago
|
||
(In reply to Robert Longson from comment #12)
> We could store times as doubles perhaps?
Yeah, I've been trying to avoid that since it's a big change that might introduce bugs (or more likely, test regressions) due to floating-point errors. I'm not sure if this bug warrants the change.
An alternative is to store times as integer number of microseconds which would still give us a range of +/- 292,263 years.
Comment 14•13 years ago
|
||
Filed bug 755603 for fixing the frozen to-animation behaviour.
Updated•12 years ago
|
Summary: animateTransform with a very small duration no longer animates → animateTransform with a very small duration (less than 1 millisecond) no longer animates
Whiteboard: [see comment 11 for explanation]
Updated•2 years ago
|
Severity: normal → S3
Assignee | ||
Comment 15•1 year ago
|
||
Updated•1 year ago
|
Assignee: nobody → longsonr
Assignee | ||
Comment 16•1 year ago
|
||
Assignee | ||
Comment 17•1 year ago
|
||
Comment 18•1 year ago
|
||
Pushed by longsonr@gmail.com:
https://hg.mozilla.org/integration/autoland/rev/4a4a406091cd
don't round short durations to zero r=birtles
Comment 19•1 year ago
|
||
bugherder |
Status: REOPENED → RESOLVED
Closed: 13 years ago → 1 year ago
status-firefox122:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 122 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•