Bug 18227 - SVGImage does not fills buffer with solid white instead of transparent black
Summary: SVGImage does not fills buffer with solid white instead of transparent black
Status: RESOLVED DUPLICATE of bug 18228
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.5
: P2 Normal
Assignee: Nobody
URL: http://www.khiltd.com/svg.html
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-30 15:37 PDT by Kay Summers
Modified: 2011-06-02 06:46 PDT (History)
2 users (show)

See Also:


Attachments
Screenshot of rendering (62.72 KB, image/png)
2008-03-30 20:22 PDT, Kay Summers
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kay Summers 2008-03-30 15:37:25 PDT
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. 

Example:

<html>
<body style="background-color: #ccc;">
<embed src="/images/spinner.svg" type="image/svg+xml" width="30" height="30" wmode="transparent" />
</body>
</html>
Comment 1 Kay Summers 2008-03-30 17:29:18 PDT
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":

http://www.khiltd.com/svg.html

Rendered as "application/xhtml+xml;qs=0.8":

http://www.khiltd.com/svg.html?x=on

Sadly, none of the available options produces an acceptable rendering. 
Comment 2 Sam Weinig 2008-03-30 19:31:09 PDT
This works for me.  What version of WebKit are you testing this in.
Comment 3 Kay Summers 2008-03-30 20:22:38 PDT
Created attachment 20229 [details]
Screenshot of rendering
Comment 4 Kay Summers 2008-03-30 20:23:07 PDT
The current nightly according to NightShift. Screenshot attached. 
Comment 5 Mark Rowe (bdash) 2008-03-30 20:31:36 PDT
Do you have the Adobe SVG plugin installed?  See Help -> Installed Plug-ins for a list of installed plugins.

I cannot reproduce this either.
Comment 6 Kay Summers 2008-03-30 22:07:56 PDT
Nope. I am using a G5 if graphics hardware has anything to do with it. 
Comment 7 Sam Weinig 2008-03-31 08:06:06 PDT
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. 
Comment 8 Eric Seidel (no email) 2008-04-13 22:38:02 PDT
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.
Comment 9 Nikolas Zimmermann 2011-06-02 06:46:58 PDT
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 ***