Since inline SVG does not work unless the page is sent with an XHTML MIME type, and since sending an XHTML MIME type breaks every other part of the page's rendering, we have to use non-standard embed tags to get SVG content into our pages. Unfortunately, this always draws a white background over the SVG view box regardless of whether or not wmode is set to "transparent." This makes it impossible to composite SVG graphics over HTML/CSS elements unless they happen to be solid white blocks.
<body style="background-color: #ccc;">
<embed src="/images/spinner.svg" type="image/svg+xml" width="30" height="30" wmode="transparent" />
Doesn't work in iframes, either.
I've put together a more comprehensive test for many of the SVG related problems I've been seeing:
Rendered as "text/html":
Rendered as "application/xhtml+xml;qs=0.8":
Sadly, none of the available options produces an acceptable rendering.
This works for me. What version of WebKit are you testing this in.
Created attachment 20229 [details]
Screenshot of rendering
The current nightly according to NightShift. Screenshot attached.
Do you have the Adobe SVG plugin installed? See Help -> Installed Plug-ins for a list of installed plugins.
I cannot reproduce this either.
Nope. I am using a G5 if graphics hardware has anything to do with it.
Could you please attach a copy of your Installed Plug-ins page so that we may inspect if any other plugins are interfering. The only way to do this that I know of is to "Print" it to a PDF and upload the pdf.
Sad that the image and background images draw white. That seems like a bug to me. But the rest of them work.
I've repurposed this bug to fix the SVG-in-<img>-should-render-transparent bug.
This is resolved in trunk. We match Opera/FF now and render all SVGImages transparent.
Note that the testcase is broken, it says it's a foo.html file, not a foo.xhtml file, that's why the inline SVG case doesn't work (note that is the same in Opera/FF!). If you download the file, and save it as foo.xhtml, all cases work.
The file has even been landed as testcase in http://trac.webkit.org/changeset/87840, see bug 18228.
*** This bug has been marked as a duplicate of bug 18228 ***