[fxtf-drafts] [motion] Blink shipping animation of offset-path path strings

ewilligers has just created a new issue for https://github.com/w3c/fxtf-drafts:

== [motion] Blink shipping animation of offset-path path strings ==
### SVG Background

[Spec](https://svgwg.org/specs/paths/#PathElement): 

> Path data animation is only possible when each path data specification within an animation specification has exactly the same list of path data commands.

SMIL implementations have ignored case when comparing path data commands, but have treated H/L/V as distinct line commands, Q/T as distinct quadratic Bezier types and C/S as distinct cubic Bezier types.

Blink shipped CSS animation of the 'd' presentation attribute with this same behavior. The shipped syntax is  `none | path(<string>)`  which matches offset-path and matched the spec at the time of implementation (but not shipping as I didn't realize the spec was being changed - [SVG #320](https://github.com/w3c/svgwg/issues/320)).

### offset-path

The motion-path property: was not animatable, but the offset-path property is animatable, and Blink would like to ship animation ([Intent](https://groups.google.com/a/chromium.org/d/msg/blink-dev/_DPl-JG6bV8/y2_GUwFVDwAJ)).

### More general interpolation

During the Intent conversation, there were suggestions for more general interpolation, between the different line commands, and between lines and splines. There was also the suggestion that the serialization format be specified. I brought this conversation across to [SVG #321](https://github.com/w3c/svgwg/issues/321) and consensus has been reached.

The outcome: animation will be supported between lines and splines, but not between arcs and other command types. Quadratic splines will be promoted as needed to cubic splines. Lines will be promoted as needed to quadratic and cubic splines.

Blink will contribute web platform tests for offset-path path string animation and ray animation. (Tests for animation of the other offset properties have already been [contributed](https://github.com/w3c/web-platform-tests/tree/master/css/motion-1/animation). Implementation of basic shapes has begun in a [polyfill](https://github.com/Motion-Path-Polyfill/motion-path-js) but not yet in Blink.)

Blink's implementation of SMIL path animation won't change at this time.

However, 'd' presentation attribute animation will change: the CSS path animation implementation will be common for d and offset-path.

### Serialization format

The serialization format will use absolute commands: e.g. nothing lowercase, no B (bearing) commands. Thus serialized paths for 'offset-path' and 'd' will contain only M Z L Q C A commands.
(There may also be R ([Catmull-Rom](https://svgwg.org/specs/paths/#PathDataCatmullRomCommand) curve) commands if they can't be losslessly converted to cubic Beziers. Note that B and R are being mentioned for spec completeness, they are not implemented in Blink.)

[SVG #320](https://github.com/w3c/svgwg/issues/320) remains open.

### Shipping

This change is expected to ship in Chrome 64.

Blink implementation of offset-position, offset-anchor and ray path is in progress, not ready to ship.


Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/225 using your GitHub account

Received on Monday, 25 September 2017 02:05:07 UTC