Bug 1361639 - WIP.
MozReview-Commit-ID: 2xlaq4t5la8
--- a/layout/svg/nsSVGUtils.cpp
+++ b/layout/svg/nsSVGUtils.cpp
@@ -1122,17 +1122,17 @@ nsSVGUtils::GetBBox(nsIFrame* aFrame, ui
}
}
gfxMatrix matrix;
if (aToBoundsSpace) {
matrix = *aToBoundsSpace;
}
- if (aFrame->IsSVGForeignObjectFrame()) {
+ if (aFrame->IsSVGForeignObjectFrame() || aFrame->IsSVGUseFrame()) {
// 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.
// NOTE: When changing this to apply to other frame types, make sure to
// also update nsSVGUtils::FrameSpaceInCSSPxToUserSpaceOffset.
MOZ_ASSERT(content->IsSVGElement(), "bad cast");
nsSVGElement *element = static_cast<nsSVGElement*>(content);
matrix = element->PrependLocalTransformsTo(matrix, eChildToUserSpace);