[CI] Add SVGLengthContext::ResolveLengthPair helper

With geometric presentation attributes it's quite common to need to
resolve an <x, y> pair of Lengths to produce a point or a size.
Add a helper ResolveLengthPair() that accepts a pair of Lengths and
return a FloatPoint. Except for a reduction in LoC, it also amortizes
the cost of determining a viewport when percentages are used.

Use the new helper for 'cx' / 'cy' and 'rx' / 'ry' on <ellipse>,
'cx' / 'cy' on <circle>, 'x' / 'y', 'width' / 'height' and 'rx' / 'ry'
on <rect>, 'x' / 'y' and 'width' / 'height' on <image> as well as
'x' / 'y' on <use>.

Since this means using FloatPoint/FloatSize to a larger degree than
before, use the abilities (operators et.c) of these a bit more where
possible.

Bug: 400725
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I15f5c17190b060a7e8312d5e3e124846301804b9
Reviewed-on: https://chromium-review.googlesource.com/832606
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#524740}
9 files changed