Cleanup resolving of 'em' units in SVGLengthContext
With the 'rem' unit added, there's some duplication, since the only
difference between 'em' and 'rem' is where the style comes from.
By splitting the resolution of the style out of the methods that
convert to/from 'em' (and 'rem'), the same two functions can be used
to compute the results in both the 'em' and 'rem' case - just feeding
them with different ComputedStyle objects.
BUG=368598,470449
Review URL: https://codereview.chromium.org/1065223003
git-svn-id: svn://svn.chromium.org/blink/trunk@193547 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed