WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED INVALID
62546
Leading space in numeric attribute makes attribute parse as zero
https://bugs.webkit.org/show_bug.cgi?id=62546
Summary
Leading space in numeric attribute makes attribute parse as zero
Tim Horton
Reported
2011-06-13 10:08:44 PDT
Created
attachment 96966
[details]
Testcase (should see two overlapping circles if rendered correctly) The SVG document at
http://upload.wikimedia.org/wikipedia/commons/f/fe/E8_graph.svg
contains numeric attributes (the cx and cy of some circle elements, for example) which have leading spaces (" 99.8"). In WebKit, these are currently parsed as 0, causing the document to render incorrectly (though Opera is the only current browser I can find that renders it "correctly", so I'll have to see what the spec says). Reduced test case attached.
Attachments
Testcase (should see two overlapping circles if rendered correctly)
(293 bytes, image/svg+xml)
2011-06-13 10:08 PDT
,
Tim Horton
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Tim Horton
Comment 1
2011-06-13 10:18:10 PDT
Related:
https://bugzilla.mozilla.org/show_bug.cgi?id=404089#c4
http://code.google.com/p/chromium/issues/detail?id=8424
https://bugs.kde.org/show_bug.cgi?id=181170
The consensus seems to be that this is an invalid SVG, and that no space is allowed in these fields. The most interesting part of this is that it validates (
http://validator.w3.org
), but people on the bugs listed above suggest that this is actually a bug in the validator.
Tim Horton
Comment 2
2011-06-13 10:50:21 PDT
Invalid as per SVG Spec (
http://www.w3.org/TR/SVG/types.html#DataTypeNumber
): length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")? number ::= integer ([Ee] integer)? | [+-]? [0-9]* "." [0-9]+ ([Ee] integer)? integer ::= [+-]? [0-9]+
Simon Fraser (smfr)
Comment 3
2011-11-01 15:45:42 PDT
Seen on
http://granite.sru.edu/~ddailey/svg/feComponentTransfer2.svg
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