From 6dbea17a8ef5120ca406eb8df0ff95de3252bad5 Mon Sep 17 00:00:00 2001 From: Iris Hsiao Date: Wed, 18 Jan 2017 11:25:25 +0800 Subject: [PATCH] Backed out changeset e32814fc5ab6 (bug 537623) --- layout/svg/nsSVGUtils.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/layout/svg/nsSVGUtils.cpp b/layout/svg/nsSVGUtils.cpp index 32adf6169d41..d15e11d52a0a 100644 --- a/layout/svg/nsSVGUtils.cpp +++ b/layout/svg/nsSVGUtils.cpp @@ -1126,7 +1126,8 @@ nsSVGUtils::GetBBox(nsIFrame *aFrame, uint32_t aFlags) } gfxMatrix matrix; - if (aFrame->GetType() == nsGkAtoms::svgForeignObjectFrame) { + if (aFrame->GetType() == nsGkAtoms::svgForeignObjectFrame || + aFrame->GetType() == nsGkAtoms::svgUseFrame) { // The spec says getBBox "Returns the tight bounding box in *current user // space*". So we should really be doing this for all elements, but that // needs investigation to check that we won't break too much content. @@ -1218,7 +1219,8 @@ nsSVGUtils::FrameSpaceInCSSPxToUserSpaceOffset(nsIFrame *aFrame) // For foreignObject frames, nsSVGUtils::GetBBox applies their local // transform, so we need to do the same here. - if (aFrame->GetType() == nsGkAtoms::svgForeignObjectFrame) { + if (aFrame->GetType() == nsGkAtoms::svgForeignObjectFrame || + aFrame->GetType() == nsGkAtoms::svgUseFrame) { gfxMatrix transform = static_cast(aFrame->GetContent())-> PrependLocalTransformsTo(gfxMatrix(), eChildToUserSpace); NS_ASSERTION(!transform.HasNonTranslation(), "we're relying on this being an offset-only transform");