Closed Bug 1323722 Opened 9 years ago Closed 9 years ago

symbol in wrong position

Categories

(Core :: SVG, defect)

50 Branch
defect
Not set
normal

Tracking

()

VERIFIED INVALID

People

(Reporter: Rainald.Koch, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:50.0) Gecko/20100101 Firefox/50.0 Build ID: 20161208153507 Steps to reproduce: Have a look at https://upload.wikimedia.org/wikipedia/commons/archive/9/9d/20161215011430%21Spherical_wave_lens.svg Actual results: One of three arrowheads is placed correctly, one is slightly too low, the third is not visible at all. The behaviour was correct (in Firefox and IE9) when I designed the image in 2012, file history is https://commons.wikimedia.org/wiki/File:Spherical_wave_lens.svg Expected results: Arrowheads at the end of the three rays, as rendered by rsvg in 2012: https://upload.wikimedia.org/wikipedia/commons/thumb/archive/9/9d/20161215011430%21Spherical_wave_lens.svg/120px-Spherical_wave_lens.svg.png or in the current version of the svg (using a marker instead of a symbol): https://upload.wikimedia.org/wikipedia/commons/9/9d/Spherical_wave_lens.svg
OS: Unspecified → Windows 7
Hardware: Unspecified → x86_64
Confirming on Firefox 50 on Linux. For comparison, https://upload.wikimedia.org/wikipedia/commons/archive/9/9d/20161215011430%21Spherical_wave_lens.svg renders correctly in Chromium 54.
OS: Windows 7 → All
Hardware: x86_64 → All
Reproducible in old versions of Firefox like FF12.
You're not allowed to have spaces in attributes so y=" -4" is invalid and treated as y="0" Chrome's rendering is actually incorrect per the SVG specification.
Status: UNCONFIRMED → RESOLVED
Closed: 9 years ago
Resolution: --- → INVALID
Status: RESOLVED → VERIFIED
Do you have a reference into the SVG spec? I have read it only partially. By the way, http://validator.w3.org/check?uri=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Farchive%2F9%2F9d%2F20161215011430%21Spherical_wave_lens.svg says "Valid SVG 1.1"
That validator does not check for the values of attributes IIRC. The definition of number is here: https://www.w3.org/TR/SVG/types.html#BasicDataTypes it does not provide for the possibility of whitespace anywhere in it i.e. When a <length> is used in an SVG presentation attribute, the syntax must match the following pattern: length ::= number ("em" | "ex" | "px" | "in" | "cm" | "mm" | "pt" | "pc" | "%")? The unit identifier, if present, must be in lower case; if not present, the length value represents a distance in the current user coordinate system.
Thank you. I see that the patterns given there do care about whitespace where appropriate. I will check all my SVG files.
(In reply to Robert Longson from comment #5) > https://www.w3.org/TR/SVG/types.html#BasicDataTypes In addition, I found https://www.w3.org/TR/SVG/paths.html#PathDataBNF Path data allows leading whitespace. So at least the current version https://upload.wikimedia.org/wikipedia/commons/9/9d/Spherical_wave_lens.svg is correct. What about an error message for whitespace where whitespace is not allowed? The requirement https://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing is not normative, but it would be nice.
Check Firefox's error console, you'll find you already get one.
You need to log in before you can comment on or make changes to this bug.