NEW309219
Make sure than when polyline have an odd number (missing coordinates), we drop the last one and draws the rest.
https://bugs.webkit.org/show_bug.cgi?id=309219
Summary Make sure than when polyline have an odd number (missing coordinates), we dro...
Karl Dubost
Reported 2026-03-04 21:02:04 PST
This pull request https://github.com/WebKit/WebKit/pull/59513 erroneously changed LayoutTests/svg/custom/poly-parsing-error.html SVG2 specification specifies what should happen in case of an odd number of coordinates. > If an odd number of coordinates is provided, then the element is in error, with the same user agent behavior as occurs with an incorrectly specified ‘path’ element. In such error cases the user agent will drop the last, odd coordinate and otherwise render the shape. — https://w3c.github.io/svgwg/svg2-draft/shapes.html#PolylineElementPointsAttribute This is a square. <svg width="100px" height="100px" viewBox="0 0 300 300"> <desc>polyline odd number of points coordinates</desc> <polyline fill="none" stroke="blue" stroke-width="5" points="50,150 150,150 150,50 50,50 50,150 " /> </svg> 5 points / missing last y coordinates. This should render like the next one. <svg width="100px" height="100px" viewBox="0 0 300 300"> <desc>polyline odd number of points coordinates</desc> <polyline fill="none" stroke="blue" stroke-width="5" points="50,150 150,150 150,50 50,50 50 " /> </svg> <svg width="100px" height="100px" viewBox="0 0 300 300"> <desc>polyline odd number of points coordinates</desc> <polyline fill="none" stroke="blue" stroke-width="5" points="50,150 150,150 150,50 50,50 " /> </svg> Question, what should happen when a point in the middle is incorrect. Make a WPT test for polyline.
Attachments
Radar WebKit Bug Importer
Comment 1 2026-03-11 22:02:10 PDT
Note You need to log in before you can comment on or make changes to this bug.