[svgwg] points-attribute: clarify "render up to" vs. "don't render" if syntax partially correct (#764)

dalboris has just created a new issue for https://github.com/w3c/svgwg:

== points-attribute: clarify "render up to" vs. "don't render" if syntax partially correct ==
The standard doesn't explicitly specify what to do when the `points` attribute of a `<polyline>` or `<polygon>` is only "partially correct". For example, with the following:

```
points: "10,20 30,40 WTF"
```

Should we still render the line "10,20 30,40", or not render anything at all?

According to generic error handling, since this is an incorrect attribute value, and since there is no specific rules for this error, we shouldn't render the element at all, as per:

> https://svgwg.org/svg2-draft/conform.html#ErrorProcessing
>
> [...] Other situations [...] such as incorrect attribute values. [...]
> User agents must [...], unless other sections of this specification define
> more specific rules [...], the element or its part that is in error won't be rendered.

However, path data (not polyline/polygon) does have a specific rule:

> https://svgwg.org/svg2-draft/paths.html#PathDataErrorHandling
>
> Unrecognized contents within a path data stream (i.e., contents that are not part
> of the path data grammar) is an error. In such a case, [...] The general rule for error
> handling in path data is that the SVG user agent shall render a ‘path’ element up to
> (but not including) the path command containing the first error in the path data specification.
> If a path data command contains an incorrect set of parameters, then the given path data
> command is rendered up to and including the last correctly defined path segment, even
> if that path segment is a sub-component of a compound path data command, such as
> a "lineto" with several pairs of coordinates.

Should we clarify that the specific error handling rules of path data also applies to the `points` attribute?

Please view or discuss this issue at https://github.com/w3c/svgwg/issues/764 using your GitHub account

Received on Tuesday, 10 December 2019 17:02:15 UTC