Bug 1361639 - WIP. draft
authorcku <cku@mozilla.com>
Tue, 29 Aug 2017 10:39:05 +0800
changeset 654640 5a2b467553da6e7fd648970b0e2eb767fd2db39e
parent 653766 d10c97627b51a226e19d0fa801201897fe1932f6
child 728612 339dbaaf92023e9ea83ab1df6a0e6257a6d18df0
push id76626
push userbmo:cku@mozilla.com
push dateTue, 29 Aug 2017 02:39:26 +0000
bugs1361639
milestone57.0a1
Bug 1361639 - WIP. MozReview-Commit-ID: 2xlaq4t5la8
layout/svg/nsSVGUtils.cpp
--- 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);