Tighten error checking from SVGLength parsing

When test-parsing width, height before mapping them to style for
SVGSVGElement and SVGForeignObjectElement, testing for unknown length
types is not enough, we must check the exceptionState for errors. This
fixes a case where we apply 'inherit' even though we shouldn't,
according to spec.

Also align SVGForeignObjectElement and SVGSVGElement by always passing
along the original string, not the serialized value. As long as only
valid lengths are passed along, this shouldn't change behavior but
re-generating the string back is unnecessary work.

BUG=370017,308992
R=pdr

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

git-svn-id: svn://svn.chromium.org/blink/trunk@173371 bbb929c8-8fbe-4397-9dbb-9b2b20218538
4 files changed
tree: 2f5910ad6c32e4fc57f038d2cdad6264263f19b2
  1. third_party/