SVG image not shown by Firefox
Lusotec <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.svg |
|---|---|
| Message-ID | <[email protected]> |
I'm developing a remote XUL application and it is mostly done. I'm now in
the beautifying phase and would like to use SVG images.
The problem is that Firefox does *not* show SVG images with <html:img>,
<xul:image>, <button image="">, CSS background-image, etc. Strangely, it
shows the SVG images if the image URL is put in the address bar.
Am I wrong in expecting Firefox to treat a SVG file like an image?
Next are two minimal test cases, one in HTML and the other in XUL. As a side
note, Opera shows the SVG image in the HTML test case.
=====================================
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<button image="image.svg" label="test" /> <!-- NO IMAGE -->
<image src="image.svg"/> <!-- NO IMAGE -->
<button image="image.png" label="test" /> <!-- SHOWS IMAGE -->
<image src="image.png"/> <!-- SHOWS IMAGE -->
</window>
=====================================
=====================================
<html>
<head><title></title></head>
<body>
<img src="image.svg" /> <!-- NO IMAGE -->
<img src="image.png" /> <!-- SHOWS IMAGE -->
</body>
</html>
=====================================