Closed Bug 545282 Opened 15 years ago Closed 8 years ago

SVG/SMIL: In animations involving 'inherit' / 'currentColor', changes to inherited value / 'color' don't show up in animated value immediately

Categories

(Core :: SVG, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 501183

People

(Reporter: dholbert, Unassigned)

Details

Attachments

(1 file)

Attached image self-contained testcase (deleted) —
See attached testcase, which uses <set> to animate 'fill' to an inherited color. Then it uses JS to change the inherited color out from under the animation, and queries the animated value immediately & after a short setTimeout. After we change the inherited value, an immediate query for the 'fill' value will return a stale value. After the short setTimeout, we sometimes return the stale value and sometimes the updated value. After a longer setTimeout, we'll "always" return the updated value (because we've gotten a sample). This affects animations that use 'currentColor', too. I think this might be tricky to fix... I'm not sure it's worth fixing, but I wanted to at least have a bug on file to keep track of it.
When loading the testcase, I currently get: > computed fill: rgb(255, 0, 0) / rgb(0, 0, 255) / rgb(0, 0, 255) / rgb(0, 255, 0) The first is the initial computed-style. The second is *immediately* after changing the inherited value. The third is after a setTimeout of 0. The fourth is after a longer setTimeout (to allow time for an animation sample). In the results quoted above, the second & third values are "stale", while the fourth is up-to-date. I always get these same results, except that about 50% of the time, the third value will be up-to-date ( rgb(0, 255, 0) ).
(In reply to comment #1) > I always get these same results, except that about 50% > of the time, the third value will be up-to-date ( rgb(0, 255, 0) ). Actually, it's probably more like 10% of the time that it's up-to-date.
Summary: SVG/SMIL: In animations involving 'inherit', changes to inherited value don't take effect immediately → SVG/SMIL: In animations involving 'inherit' / 'currentColor', changes to inherited value / 'color' don't show up in animated value immediately
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: