nicholasburroughs / svgweb

Automatically exported from code.google.com/p/svgweb
Other
0 stars 0 forks source link

Embedded SVG: Fallback to native SVG disables animation #319

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Load the attached html file. It contains an embedded animated svg, and
the forceflash is false.
2.
3.

What is the expected output? What do you see instead?
Expected:An animated sprocket with a chain should show up.
Instead the scene does not animate.

If the forceflash is set to true, it does work.
Also, if the embedded svg is taken out the html, and served on its own, the
scene is animated again, so the native svg renderer *can* handle the svg
data. Just not when it goes through the html embed.

My conclusion: the fallback to native svg does not work. (I used your svg
embed sample as a template).

What version of the product are you using? On what operating system,
browser, and version of Flash?
I used the up to date readonly SVN repo.
I tried this on:
OSX Snow Leopard + Firefox + Flash 10.x
OSX Snow Leopard + Safari

Please provide any additional information below. Reduced test cases are
always appreciated!

Original issue reported on code.google.com by b.st...@gmail.com on 21 Sep 2009 at 3:01

Attachments:

GoogleCodeExporter commented 9 years ago
Does the browser show animation if you load the SVG file? That is, without using
svgweb.js.

My firefox does not make smil animation. It is a Firefox issue.

Original comment by clama...@hotmail.com on 10 Oct 2009 at 10:51

GoogleCodeExporter commented 9 years ago
Does the browser show animation if you load the SVG file? That is, without using
svgweb.js.

My firefox does not make smil animation. It is a Firefox issue.

Original comment by clama...@hotmail.com on 10 Oct 2009 at 10:52

GoogleCodeExporter commented 9 years ago
It's not a firefox issue: Safari will not show the anim either.

Also: the SVG is valid: if you serve the svg directly, without svgweb, then the
animation works.

It has to be a faulty 'fall back' to native of svgweb.

Original comment by b.st...@gmail.com on 10 Oct 2009 at 10:59

GoogleCodeExporter commented 9 years ago
Interesting; other SMIL animation samples work with native in Safari. Firefox 
does
not support SMIL animation yet. I'm sure I'm mangling this particular sample 
somehow.

I've had a number of bug fixes where embedded comments were causing issues; 
remove
all the embedded XML comments for now as a workaround to see if that fixes 
things.

Original comment by bradneub...@gmail.com on 13 Oct 2009 at 4:35

GoogleCodeExporter commented 9 years ago
I looked at this also. It is a valid problem. I thought maybe it was because 
the SMIL
tags ended up in the wrong namespace, but thats just a guess.

Original comment by grick23@gmail.com on 13 Oct 2009 at 3:11

GoogleCodeExporter commented 9 years ago
Brad: removing the embedded comments does not help.
Without comments:
http://www.stolk.org/svgtest/nocomment.html
With comments:
http://www.stolk.org/svgtest/index.html

It will only work if I force flash, or if I serve the svg as is, without svgweb.

   Bram

Original comment by b.st...@gmail.com on 13 Oct 2009 at 3:19

GoogleCodeExporter commented 9 years ago

Original comment by bradneub...@gmail.com on 20 Oct 2009 at 12:47

GoogleCodeExporter commented 9 years ago
Any progress on this?
This issue is stopping me from using svgweb on my website.

Original comment by b.st...@gmail.com on 24 Oct 2009 at 12:44

GoogleCodeExporter commented 9 years ago
See Issue 145 for progress on this issue. In the examples that Bruce provides, 
the third animation will work on opera and presumably other browsers that 
support SMIL that I have not tested. Remember the issue here is that the test 
case does not activate the animations we import from the script tag.

The speculative diagnosis is that the the current mechanism by which we bring 
elements into the current document (see NativeHandler._processSVGScript), which 
uses an XML tree and importNode, does not properly activate the animation 
elements.

A potential solution is to add the elements using the same mechanism as in the 
Issue 45 example: with createElement, setAttribute, appendChild, and friends. 
That could be much slower, so we need to find a solution which balances 
correctness with performance before that solution is adopted. If there was a 
way to "reactivate" the animations somehow after importNode that would be nice 
to consider as well.

Original comment by grick23@gmail.com on 13 Jun 2010 at 10:37

GoogleCodeExporter commented 9 years ago
Some possible news on the browser front. Opera 10.53 appears to activate the 
animations correctly. Chrome 5.0.375.70 does not, but it does activate it when 
it is a standalone svg. Mozilla previewe 3.7 alpha 4 does not activate the 
animation either way.  We should consider filing a bug against Chrome.

Original comment by grick23@gmail.com on 13 Jun 2010 at 11:05

GoogleCodeExporter commented 9 years ago
I can confirm this is a bug in Chrome 7.0.517.44  while it works in Opera 10.00 
Alpha. 

adding animate / animateTransform elements programmatically does not work :( 

I guess though it seems to be a browser bug more than an SVGWeb bug.. as 
grick23 pointed out.

Guess I'll stick to static SVG for now (or use scripted animation.. but I was 
hoping to use some of the cool SVG animation API)

Original comment by dewilh...@gmail.com on 6 Nov 2010 at 3:38

GoogleCodeExporter commented 9 years ago
It sounds like this is due to native SMIL bugs independent of SVG Web, is that 
correct? Can we mark this as INVALID? Sounds like we can.

Original comment by bradneub...@gmail.com on 16 Nov 2010 at 10:21

GoogleCodeExporter commented 9 years ago
this is not svgweb's fault. svgweb (flash) fixes missing SMIL implementation.  
SMIL implementation is the exception rather than the rule presently

Original comment by northrup...@gmail.com on 9 Aug 2011 at 10:08