[PE] Fix transform-origin on SVG <text>

LayoutSVGText would not compute the correct transform if subjected to a
transform-origin (or transform) with percentages, since the transform
had to be computed early in UpdateLayout in order to allow a font to be
chosen based on the current transform.

Rearrange the code in LayoutSVGText::UpdateLayout a bit to allow the
transform computation to use the correct bounding box, but also compute
a tentative transform before updating the font and its metrics.

Remove the special-case in SVGElement::CalculateTransform and simplify
accordingly.

Bug: 225799
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I34728dfeaafba72c9f3195a29fbdd14673d186c2
Reviewed-on: https://chromium-review.googlesource.com/817734
Reviewed-by: Stephen Chenney <schenney@chromium.org>
Commit-Queue: Fredrik Söderquist <fs@opera.com>
Cr-Commit-Position: refs/heads/master@{#523141}
4 files changed