Make SVGLength wrap a CSSPrimitiveValue.

This patch is needed to facilitate improvements to SVG attribute parsing, in turn demanded by the reconciliation of CSS and SVG attributes and properties from the SVG 2.0 spec. One parser to rule them all is a better approach than writing SVG specific parsers for what are essentially the same types as CSS.

The only significant difference between the primitive types in CSS and SVG are related to dimensionless lengths, those for which the user defines no units, just a number. In CSS these are disallowed except when in quirks mode, while for SVG a pure number is considered in "user units" (see http://www.w3.org/TR/SVG/types.html#InterfaceSVGLength). Basically, the user could be using their own dimensioning system and rather than defining some kind of customization method, the spec just assumes things without units are the user's responsibility. This works because the SVG viewport defines the mapping from SVG user units into document units.

To address this difference, we add a new CSSPrimitive UnitType for SVG user units and assign it to lengths created in SVG parsing mode that have no other unit.

R=fs@opera.com,pdr@chromium.org,timloh@chromium.org
BUG=467464

Review URL: https://codereview.chromium.org/1421533006

Cr-Commit-Position: refs/heads/master@{#358153}
23 files changed