bug 930420 - respect any transform on the glyph element itself when calculating SVG glyph extents. r=heycam

This commit is contained in:
Jonathan Kew 2013-10-25 10:09:30 +02:00
Родитель 8bac055181
Коммит 82c129d909
1 изменённых файлов: 9 добавлений и 1 удалений

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

@ -1862,7 +1862,15 @@ nsSVGUtils::GetSVGGlyphExtents(Element* aElement,
if (!svgFrame) {
return false;
}
*aResult = svgFrame->GetBBoxContribution(aSVGToAppSpace,
gfxMatrix transform(aSVGToAppSpace);
nsIContent* content = frame->GetContent();
if (content->IsSVG()) {
transform = static_cast<nsSVGElement*>(content)->
PrependLocalTransformsTo(aSVGToAppSpace);
}
*aResult = svgFrame->GetBBoxContribution(transform,
nsSVGUtils::eBBoxIncludeFill | nsSVGUtils::eBBoxIncludeFillGeometry |
nsSVGUtils::eBBoxIncludeStroke | nsSVGUtils::eBBoxIncludeStrokeGeometry |
nsSVGUtils::eBBoxIncludeMarkers);