Since now most CSS transform related bugs are fixed, it's clear that the
purpose of nsSVGUtils::GetTransformMatrixInUserSpace() should solely be to
replace SVGElement::PrependLocalTransformsTo(eUserSpaceToParent).
After fixing Bug 972041, the only other usecase (Bug 1247218) no longer exists.
OTOH, there is a problem when the parent has a viewbox transform, in that case,
SVGElement::PrependLocalTransformsTo() doesn't include it, but
nsLayoutUtils::GetTransformToAncestor() does.
In fact, it's much easier to compute the transform matrix directly based on
the implementation of nsDisplayTransform::GetResultingTransformMatrixInternal(),
which is also the function internally called by nsLayoutUtils::GetTransformToAncestor().
In particular, we don't need to look at 3D stuff since our matrix is inherently 2D.
Differential Revision: https://phabricator.services.mozilla.com/D28970
--HG--
extra : moz-landing-system : lando