Closed Bug 755603 Opened 9 years ago Closed 9 years ago

Frozen to-animation is broken


(Core :: SVG, defect)

Not set





(Reporter: birtles, Assigned: birtles)



(1 file, 1 obsolete file)

SMIL defines some pretty counter-intuitive behaviour for frozen to-animations. I've documented it here:

I tried to get the spec changed but got pushback from one individual and didn't have the perseverance to see it through:

Currently out implementation /tries/ to follow the spec but:
* it is broken (if you seek or the frame rate is slow the result will be incorrect)
* it is not easily fixable (you need to increase coupling between the timing and animation models)
* is not interoperable (no-one else bothers to try and do what the spec says here)

I'd like to fix this to match what Opera does which I think is most intuitive. Then at least we'd have something:
* interoperable
* not-broken
* intuitive

I'll try to get the spec fixed in SVG 2.
Attached patch Proposed patch v1a (obsolete) — Splinter Review
Attachment #624270 - Flags: review?(dholbert)
Assignee: nobody → birtles
Comment on attachment 624270 [details] [diff] [review]
Proposed patch v1a

Looks great! I like this much better without the frozen-to special case.  Your www-svg post outlines the situation quite well.

>+    <!-- From time t=1s onwards this should apply 50% of its effect to the base
>+         value (since it is frozen at repeatCount=0.5).
>+         So, if the base value is 50%, and the to-value is 150%, it will produce
>+         100%. -->
>+    <animate attributeName="width" to="150%" fill="freeze"
>+      dur="1s" repeatCount="0.5"/>

Nit: shouldn't this say "from time t=0.5s onwards" (instead of "t=1s onwards")?

That is to say -- won't the animation stop halfway through its 1s simple duration, at 0.5s, and freeze at that point?

Assuming I'm understanding correctly: It's probably simplest to just change "dur=1s" to "dur=2s" so that the existing comment will magically become correct, and so we won't be dealing with both fractional-second and 100-second ranges in the same test.

>+    <!-- From time t=1s onwards this should apply 50% of its effect to the
>+         value.
>+         So, if the base value is 150%, and the to-value is 50%, it will produce
>+         100%. -->
>+    <animate attributeName="height" to="50%" fill="freeze"
>+      dur="1s" repeatCount="0.5"/>

(the above applies here as well)

r=me with that
Attachment #624270 - Flags: review?(dholbert) → review+
Address review feedback. Thanks Daniel!
Attachment #624270 - Attachment is obsolete: true
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.