Closed
Bug 797329
Opened 12 years ago
Closed 12 years ago
Parsing of SVG files : elements not separated by \n are not shown
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: pierreetienne.meunier, Unassigned)
Details
Attachments
(3 files)
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/537.13+ (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2 Steps to reproduce: I wrote two pages : <?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 162 100"> <text> <tspan x="0" y="10" font-size="10px">Blabla</tspan> </text><path fill="none" stroke="#000000" stroke-width="0.100000" d="M19.2508 48.0609L17.7994 48.0609 " /> </svg> and then <?xml version="1.0" encoding="UTF-8"?><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 162 100"> <text> <tspan x="0" y="10" font-size="10px">Blabla</tspan> </text> <path fill="none" stroke="#000000" stroke-width="0.100000" d="M19.2508 48.0609L17.7994 48.0609 " /> </svg> Actual results: The first page forgot my <path ...>, while the second one had it Expected results: The two should give the same result
Comment 3•12 years ago
|
||
They look the same to me. What version of Firefox are you using?
Reporter | ||
Comment 4•12 years ago
|
||
Ok, sorry for the imprecise bug report. The problem comes when I load the svg with a javascript from an html page, then I include the elements in an already present svg. I join the complete test case.
Reporter | ||
Comment 5•12 years ago
|
||
Updated•12 years ago
|
Attachment #667451 -
Attachment mime type: text/plain → text/html
Comment 6•12 years ago
|
||
I think you'll either have to create a testcase without XMLHttpRequest by putting the contents of test0.svg directly into parseFromString or host it somewhere else.
Comment 7•12 years ago
|
||
g.appendChild removes the node from the newSvg array so step 1 newSvg node 1 = text newSvg node 2 = path i=0 then call appendChild and loop and you get newSvg node1 = path i=1 Try Firebug it will help debugging this kind of thing.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → INVALID
Reporter | ||
Comment 8•12 years ago
|
||
I'm sorry ! I was actually using firebug, but in what kind of documentation was I expected to find this information ?
Comment 9•12 years ago
|
||
Here perhaps https://developer.mozilla.org/en-US/docs/DOM/Node.appendChild If the node already exists it is removed from current parent node, then added to new parent node.
You need to log in
before you can comment on or make changes to this bug.
Description
•