Bug 18228 - SVG graphics do not actually work in IMG tags or as background-image properties
Summary: SVG graphics do not actually work in IMG tags or as background-image properties
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: SVG (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Nikolas Zimmermann
URL: http://www.khiltd.com/svg.html
Keywords:
: 18227 22986 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-03-30 15:59 PDT by Kay Summers
Modified: 2011-06-02 06:48 PDT (History)
7 users (show)

See Also:


Attachments
Patch (61.37 KB, patch)
2011-06-01 11:40 PDT, Nikolas Zimmermann
rwlbuis: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kay Summers 2008-03-30 15:59:45 PDT
According to this document: http://docs.info.apple.com/article.html?artnum=307467 I should be able to display SVG graphics with simple IMG tags as well as in CSS properties such as background-image. In practice, this does not actually seem to work.

A combined test case of several ways I've found SVG support to be broken is available here:

http://www.khiltd.com/svg.html
Comment 1 Mark Rowe (bdash) 2008-03-30 21:11:41 PDT
Which of the examples do not work?  They all appear correctly for me in Safari 3.1, and a recent nightly build.
Comment 2 Eric Seidel (no email) 2008-04-13 22:33:47 PDT
I'm not sure that all cases work in 3.1.
Comment 3 Marco Barisione 2008-08-11 02:25:58 PDT
(In reply to comment #0)
> A combined test case of several ways I've found SVG support to be broken is
> available here:

Are you using WebKit GTK? It has problems with SVG images in <img> tags, see #19370.
Comment 4 Nikolas Zimmermann 2011-06-01 11:40:01 PDT
Created attachment 95637 [details]
Patch
Comment 5 Rob Buis 2011-06-01 13:21:28 PDT
Comment on attachment 95637 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=95637&action=review

LGTM

> LayoutTests/svg/custom/resources/spinner.svg:4
> +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40px" height="40px" viewBox="0 0 50 50" preserveAspectRatio="xMinYMin">

preserveAspectRatio needed? And not the default value used?

> LayoutTests/svg/custom/resources/spinner.svg:10
> +        <animateTransform attributeName="transform" type="rotate" values="30,25,25; 60,25,25; 90,25,25; 120,25,25; 150,25,25; 180,25,25; 210,25,25; 240,25,25; 270,25,25; 300,25,25; 330,25,25; 0,25,25;" dur="1s" repeatCount="indefinite" calcMode="discrete" />

Line can be removed
Comment 6 Nikolas Zimmermann 2011-06-01 13:24:50 PDT
(In reply to comment #5)
> (From update of attachment 95637 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=95637&action=review
> 
> LGTM
> 
> > LayoutTests/svg/custom/resources/spinner.svg:4
> > +<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="40px" height="40px" viewBox="0 0 50 50" preserveAspectRatio="xMinYMin">
> 
> preserveAspectRatio needed? And not the default value used?
No, will remove it.

> 
> > LayoutTests/svg/custom/resources/spinner.svg:10
> > +        <animateTransform attributeName="transform" type="rotate" values="30,25,25; 60,25,25; 90,25,25; 120,25,25; 150,25,25; 180,25,25; 210,25,25; 240,25,25; 270,25,25; 300,25,25; 330,25,25; 0,25,25;" dur="1s" repeatCount="indefinite" calcMode="discrete" />
> 
> Line can be removed

Fixed, landed in r87840.
Comment 7 Nikolas Zimmermann 2011-06-02 06:46:58 PDT
*** Bug 18227 has been marked as a duplicate of this bug. ***
Comment 8 Nikolas Zimmermann 2011-06-02 06:48:17 PDT
*** Bug 22986 has been marked as a duplicate of this bug. ***