Re: [svgwg] Serialization format for path strings

> Then the question is whether normalization should only happen as an "upgrade if necessary" for animation, or if it should be part of the computed value process, or if it should be part of the serialized value process. @ewilligers, can you explain how you think it should work, based on the recent WPT tests you've added?

The approach we discussed earlier in this thread is that `getComputedStyle` _always_ returns absolute commands much like how `getComputedStyle` always returns absolute paths for URIs (or how different lengths are always represented as pixels). This makes parsing the result from script simpler since it halves the number of commands and modes one needs to parse.

Having the result sometimes return a normalized path and sometimes return the original path may lead to subtle inconsistencies between implementations as we discovered when implementing this in Gecko (which, unlike Blink, would return the original path when using `calcMode="discrete"` but not otherwise). I expect scripts that assume the path is always normalized will be tripped up if occasionally it is not.

-- 
GitHub Notification of comment by birtles
Please view or discuss this issue at https://github.com/w3c/svgwg/issues/321#issuecomment-422199446 using your GitHub account

Received on Monday, 17 September 2018 23:03:04 UTC