SVG-ISSUE-2460 (list-non-list-object-sharing): should not be allowed to insert non-list reflecting SVGLength into SVGLengthList [SVG 2]

SVG-ISSUE-2460 (list-non-list-object-sharing): should not be allowed to insert non-list reflecting SVGLength into SVGLengthList [SVG 2]

http://www.w3.org/Graphics/SVG/WG/track/issues/2460

Raised by: Cameron McCormack
On product: SVG 2

The spec says that when you append an SVGLength to an SVGLengthList, that if the SVGLength is in a list already it is first removed.  First, this doesn't account for with the SVGLength came from an animVal, in which case the list is read only and you can't remove it.  Second, it doesn't explicitly handle the case where the SVGLength came from a reflecting non-list attribute, such as rectElement.x.baseVal.

We should either

  1. throw, since we can't handle this like the "remove from the list it's
     already in" behaviour, or
  2. make a copy of the SVGLength to insert instead.

It might even be preferable to copy the SVGLength rather than move it even if it is in a modifiable list.  We should see what implementations do (Gecko copies currently in that case).

Received on Saturday, 12 July 2014 04:51:02 UTC