[svgwg] Issue: getPathSegAtLength had consistent implementation behavior for invalid paths marked as SVG Paths

AmeliaBR has just labeled an issue for https://github.com/w3c/svgwg as "SVG Paths":

== getPathSegAtLength had consistent implementation behavior for invalid paths ==
This issue is implementation feedback for the getPathSegAtLength API which was removed from SVG2 but could be worked on in the future. The getPathSegAtLength spec does not state what should happen for edge cases. If getPathSegAtLength is updated, we should add "If no valid path data exists, returns 0" to reflect current implementations.

The getPathSegmentAtLength spec states "If no valid path data exists, returns null." If getPathSegmentAtLength is worked on in the future, we should consider changing it to return 0 for edge cases as well.

Here is the current implementation behavior for getPathSegAtLength(0):
http://output.jsbin.com/sayehaz/quiet
Chrome 59.0.3071.15: returns 0 for unspecified 'd' and 0 for empty 'd' and 0 for invalid 'd'.
Firefox 54.0a2: returns 0 for unspecified 'd' and 0 for empty 'd' and 0 for invalid 'd'.
Safari 10.2, WebKit 12604.1.15.2: returns 0 for unspecified 'd' and 0 for empty 'd' and 0 for invalid 'd'.
Edge 38.14393, edgeHTML 14.14393: returns 0 for unspecified 'd' and 0 for empty 'd' and 0 for invalid 'd'.

* link to the spec section you're talking about, or at least the spec
https://svgwg.org/specs/paths/#__svg__SVGPathElement__getPathSegmentAtLength
https://www.w3.org/TR/SVG11/single-page.html#paths-__svg__SVGPathElement__getPathSegAtLength


See https://github.com/w3c/svgwg/issues/313

Received on Monday, 24 April 2017 03:47:58 UTC