2013/7/25 Tomasz Boczkowski <penginsbacon@...400...>:
I've begun by solving bug #1202753. For polygon elements in input file, that have empty or no "points" attribute SPShape::curve field is NULL. According to comment in sp-polygon.cpp:125 this should not be the case.
The SVG specification says that the point list of a polygon can be empty: http://www.w3.org/TR/SVG11/shapes.html#PointsBNF
It seems that if the points attribute is empty or missing (equivalent to points=""), then SPShape::curve should be set to an empty curve, and nothing should be rendered.
When points="", sp_polygon_set does not initialize SPShape::curve. Comment in sp-polygon.cpp:169 refers to W3C note: http://www.w3.org/TR/SVG11/implnote.html#ErrorProcessing. How should this situation be handled in document tree?
I'm not sure whether we folow the error processing part of the specification at all. It says that nothing past the point of error should be rendered, but this would cause problems e.g. when using the XML editor: specifying a bad attribute value could cause large portions of the document to suddenly disappear.
Regards, Krzysztof