RESOLVED DUPLICATE of bug 18228 Bug 22986
Loading external SVG using <image> doesn't have transparent background
https://bugs.webkit.org/show_bug.cgi?id=22986
Summary Loading external SVG using <image> doesn't have transparent background
Dustin
Reported 2008-12-24 14:56:36 PST
If you load an external SVG into you new SVG file like so, <image id="cloud_image" xlink:href="/svg/weather/cloudy.svg" width="200" height="200" x="0" y="0"/> Then the background of the external SVG will be white, not transparent like it should be. However I've noticed if I remove the width, height, and viewbox attributes from the external SVG file, the background will become transparent but of course sizing wil not be correct. Thus it makes layering multiple SVG images ontop of one another every difficult because they would all have to be contained within one file.
Attachments
html (313 bytes, text/html)
2009-12-18 09:49 PST, Konstantin Kokarev
no flags
first included svg (354 bytes, image/svg+xml)
2009-12-18 09:50 PST, Konstantin Kokarev
nwtour: review-
second included svg (354 bytes, image/svg+xml)
2009-12-18 09:50 PST, Konstantin Kokarev
no flags
Konstantin Kokarev
Comment 1 2009-12-18 09:49:40 PST
Konstantin Kokarev
Comment 2 2009-12-18 09:50:20 PST
Created attachment 45161 [details] first included svg
Konstantin Kokarev
Comment 3 2009-12-18 09:50:57 PST
Created attachment 45162 [details] second included svg
Konstantin Kokarev
Comment 4 2009-12-18 09:54:10 PST
+1 opera, firefox, arora, msie + renesis plugin: show red background and 2 words "test". midori, chromium, komqueror ( linux ): white background and 1 word "test".
Jeff Schiller
Comment 5 2010-09-20 20:54:28 PDT
Konstantin, I'm confused by your attachments. None of your attachments use a <image> element as per Dustin, and the HTML file uses an <object> tags to include the two SVG files. So these would seem to be invalid files for this bug (though they do address the problem described in Bug 10687 and Bug 27078).
Konstantin Kokarev
Comment 6 2010-09-21 12:05:11 PDT
Jeff Schiller. Sorry, I really made a mistake.
Nikolas Zimmermann
Comment 7 2011-06-01 04:45:30 PDT
(In reply to comment #6) > Jeff Schiller. Sorry, I really made a mistake. Another note regarding testcase from Konstantin: The expected result is indeed a red background, and the word "TEST" twice, but only if the <object> is correctly closed: <object width="100" height="100" type="image/svg+xml" data="1.svg"></object> In the testcase you'll see: <object width="100" height="100" type="image/svg+xml" data="1.svg"/> When saving Konstantins testcase as .html file Firefox and WebKit will only show the word "TEST" once. This is because the second div is not present in the DOM tree at all, because self-closing tags aren't valid in pure HTML. If you properly close both <object></object>s then the testcase will show "TEXT" two times, both in Firefox and WebKit. We still need a testcase for the original bug reported by Dustin.
Nikolas Zimmermann
Comment 8 2011-06-02 06:48:17 PDT
This is resolved in trunk, see http://trac.webkit.org/changeset/87840. *** This bug has been marked as a duplicate of bug 18228 ***
Note You need to log in before you can comment on or make changes to this bug.