Frozen to-animation is broken

RESOLVED FIXED in mozilla15

Status

()

Core
SVG
RESOLVED FIXED
5 years ago
5 years ago

People

(Reporter: birtles, Assigned: birtles)

Tracking

Trunk
mozilla15
Points:
---
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment, 1 obsolete attachment)

(Assignee)

Description

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

  http://www.w3.org/Graphics/SVG/WG/wiki/F2F/Auckland_2011/Animation_improvements#Issue:_Frozen_to-animation_is_broken

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

  http://lists.w3.org/Archives/Public/www-svg/2011Mar/0082.html

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.
(Assignee)

Comment 1

5 years ago
Created attachment 624270 [details] [diff] [review]
Proposed patch v1a
Attachment #624270 - Flags: review?(dholbert)
(Assignee)

Updated

5 years ago
Assignee: nobody → birtles
Status: NEW → ASSIGNED
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+
(Assignee)

Comment 3

5 years ago
Created attachment 625034 [details] [diff] [review]
Proposed patch v1b; r=dholbert

Address review feedback. Thanks Daniel!
Attachment #624270 - Attachment is obsolete: true
(Assignee)

Comment 4

5 years ago
Pushed to m-i:
https://hg.mozilla.org/integration/mozilla-inbound/rev/b5352f7337b1

Comment 5

5 years ago
https://hg.mozilla.org/mozilla-central/rev/b5352f7337b1
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
(Assignee)

Updated

5 years ago
Flags: in-testsuite+
You need to log in before you can comment on or make changes to this bug.