Bug 13235
| Summary: | SVG does not render | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Patrick Corcoran <patrick-webkit> |
| Component: | SVG | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED INVALID | ||
| Severity: | Normal | CC: | patrick-webkit |
| Priority: | P2 | ||
| Version: | 523.x (Safari 3) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.4 | ||
| URL: | http://archive.dojotoolkit.org/nightly/demos/gfx/lion.html | ||
Patrick Corcoran
Go the page http://archive.dojotoolkit.org/nightly/demos/gfx/butterfly.html
Notice that nothing renders in WebKit. (Go there in Firefox and notice that it does render.)
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Rob Buis
I confirm that this happens on that url. The calculation of the transform attribute of the main group element seems messed up. When I look at the used js code I think it is due to this:
src/gfx/svg.js:
if(dojo.render.html.safari){
this.rawNode.setAttribute("transform", "matrix(" +
parseInt(tm.xx) + "," + parseInt(tm.yx) + "," +
parseInt(tm.xy) + "," + parseInt(tm.yy) + "," +
parseInt(tm.dx) + "," + parseInt(tm.dy) + ")");
}else{
this.rawNode.setAttribute("transform", "matrix(" +
tm.xx.toFixed(8) + "," + tm.yx.toFixed(8) + "," +
tm.xy.toFixed(8) + "," + tm.yy.toFixed(8) + "," +
tm.dx.toFixed(8) + "," + tm.dy.toFixed(8) + ")");
}
AFAICS toFixed() works fine in Safari release and ToT, so I don't see the need for this construction. Moreover parseInt will convert values like 0.9(for instance a scale factor) to 0. Using the 0 for a/d of the matrix causes the whole problem. Since FF parseInt and toFixed act the same as Safari I think the above if branch for Safari should just go.
Cheers,
Rob
Eric Seidel (no email)
The files are no longer found. Rob is suggesting that this is an error in Dojo and not Safari. Closing.