De-ExceptionState-ify SVGLengthContext

The 1.1 specification does not define if exceptions should be thrown
when font-size/x-height/viewport cannot be determined (and hence
relative units not properly evaluated).
UAs don't really agree here and throw/don't throw in different cases.
The gist of this CL is that most of the uses of SVGLengthContext and
SVGLength::value() will not be throwing exceptions at all, so move that
part of the functionality to the callers that might care
(ie SVGLengthTearOff). This in essence checks for the primary failure
modes up front and then throws without calling into SVGLengthContext
at all. Some fidelity in exception messages is sacrificed, and cases
which shouldn't be considered errors (like zero font-size) no longer
cause exceptions to be thrown.

Reduces binary-size by ~15k (only a smaller part of that in
SVGLengthContext itself).

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

git-svn-id: svn://svn.chromium.org/blink/trunk@189659 bbb929c8-8fbe-4397-9dbb-9b2b20218538
7 files changed
tree: 92a1c44c7a7120377a93511960a4d70304ec4341
  1. third_party/