SVGLength behaviour tightening

I’d like to define the behaviour of SVGLength (and similarly for
SVGAngle) when the attribute contains an invalid string such that:

  * unitType is SVG_LENGTHTYPE_UNKNOWN, value is NaN,
    valueInSpecifiedUnits is NaN and valueAsString is "";

  * when assigning to value or validInSpecifiedUnits that the length is
    set to that value in user units;

  * assigning to valueAsString or calling newValueSpecifiedUnits works
    normally; and

  * calling convertToSpecifiedUnits throws an exception.

Also I’d like to make it clear that assigning to value will keep
unitType as whatever it was before, and not just change it to
SVG_LENGTHTYPE_NUMBER.

Let me know if you think this is reasonable.

-- 
Cameron McCormack ≝ http://mcc.id.au/

Received on Sunday, 30 August 2009 05:50:50 UTC