kahunamoore / svg-edit

Automatically exported from code.google.com/p/svg-edit
MIT License
0 stars 1 forks source link

Empty use crashes Safari #486

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Open up SVG-edit
2. Paste in the following SVG document

<svg xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink' width='400' x='300'>
    <use id='the-use'/>
</svg>

3. Click Ok

Safari 4 crashes for me.  The same document does not cause Chrome to crash
or behave in any weird way.  

Also if you paste the above document into its own document and browse to
it, Safari does not crash, so it's something we may be doing in our JS.

I have isolated it to the following section of code that causes the crash
within setSvgString():

            content.attr({
                id: 'svgcontent',
                width: w,
                height: h,
                overflow: 'visible'
            });

Original issue reported on code.google.com by codedr...@gmail.com on 17 Feb 2010 at 6:44

GoogleCodeExporter commented 9 years ago
Hmmm...

width='400' x='300' ?

Isn't this a bit strange?

Original comment by worms_...@yahoo.com on 17 Feb 2010 at 8:11

GoogleCodeExporter commented 9 years ago
It's just an example width/height.

Original comment by codedr...@gmail.com on 17 Feb 2010 at 8:28

GoogleCodeExporter commented 9 years ago
Ok :-)
(It also crashes Safari on Windows)

Original comment by worms_...@yahoo.com on 17 Feb 2010 at 8:46

GoogleCodeExporter commented 9 years ago
Sorry, I see what you're saying now!  Didn't notice 'x'.

<svg xmlns='http://www.w3.org/2000/svg'
xmlns:xlink='http://www.w3.org/1999/xlink' width='400' height='300'>
    <use id='the-use'/>
</svg>

Original comment by codedr...@gmail.com on 17 Feb 2010 at 8:47

GoogleCodeExporter commented 9 years ago
;-)

Original comment by worms_...@yahoo.com on 17 Feb 2010 at 10:31

GoogleCodeExporter commented 9 years ago
Fixed in r1408.

Original comment by codedr...@gmail.com on 18 Feb 2010 at 1:34