Backed out changeset e32814fc5ab6 (bug 537623)

This commit is contained in:
Iris Hsiao 2017-01-18 11:25:25 +08:00
Родитель 86f0c869f1
Коммит 6dbea17a8e
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -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<nsSVGElement*>(aFrame->GetContent())->
PrependLocalTransformsTo(gfxMatrix(), eChildToUserSpace);
NS_ASSERTION(!transform.HasNonTranslation(), "we're relying on this being an offset-only transform");