WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
5337
SVG paths with no 'd' attribute are not rendered
https://bugs.webkit.org/show_bug.cgi?id=5337
Summary
SVG paths with no 'd' attribute are not rendered
Eric Seidel (no email)
Reported
2005-10-11 03:08:02 PDT
SVG shows up blank Further reduction would be necessary to determine why this is the case. My console shows this error: [163:139]: ERROR: expected '>'
Attachments
SVG non-well-formedness test case
(902 bytes, image/svg+xml)
2005-10-16 16:48 PDT
,
Daniel Udey
no flags
Details
Reduced test case
(414 bytes, image/svg+xml)
2005-10-30 04:33 PST
,
Julien Palmas
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Daniel Udey
Comment 1
2005-10-16 16:48:06 PDT
Created
attachment 4373
[details]
SVG non-well-formedness test case The problem arises because the SVG document is not well-formed XML. Attached is a sample test case. The original file had three <path> elements which lacked a 'd' attribute. It appears the author intended to rely on the <animate> element to provide the initial value; unfortunately, the DTD does not allow for this; an initial attribute must be provided; however, it does work in other implementations which ignore the error silently and do support the <animate> element. The actual reason that the SVG document shows up blank is because the <animate> element is not (properly?) supported in the WebKit implementation of SVG; as such, the element remains with no 'd' attribute, and there is nothing for WebKit to draw. The attached file has both a <path> element with a correct initial value, as well as one which is empty. The error given ("ERROR: expected '>'") is still printed to the console, though the error does not provide adequate information on what the problem is. WebKit does continue to render the SVG file properly, however; the 'error' is actually more of a warning that the SVG engine could not find an attribute it expected. Possible behaviour might be to throw an error when WebKit encounters such a <path> element (as occurs with invalid XHTML), or to silently ignore it in case it is used later (for example, by the <animate> element). It may also be worth noting that the DTD referenced in the original document is a 404, though that did not seem to have any impact on the document. This test case uses the proper SVG 1.1 DTD.
Daniel Udey
Comment 2
2005-10-16 18:49:53 PDT
After further testing, I've discovered that the ERROR message printed to the console.log is a separate issue relating to the XML prolog, which has now been reported as
bug 5396
.
Julien Palmas
Comment 3
2005-10-30 04:33:38 PST
Created
attachment 4537
[details]
Reduced test case Better reduced test case Does not display ERROR: expected '>' as this moved to
http://bugzilla.opendarwin.org/show_bug.cgi?id=5396
Like you said before, the "d" attribute for <path> is #REQUIRED in the spec. I need to check if the <animate attributeName="d"> can be considered as providing the "d" attribute to its parent node. My first impression is that as long as there is no "d" specified in <path> (like the DTD requires), it is normal that we don't render anything.
Eric Seidel (no email)
Comment 4
2006-01-26 14:18:35 PST
I believe this has been "fixed", however <animate> doesn't work in TOT.
Nikolas Zimmermann
Comment 5
2007-06-12 12:12:00 PDT
It's fixed. Link is dead.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug