diff --git a/mozilla/layout/svg/base/src/nsSVGGeometryFrame.cpp b/mozilla/layout/svg/base/src/nsSVGGeometryFrame.cpp index 52e38b61aeb..25e3f6e657b 100644 --- a/mozilla/layout/svg/base/src/nsSVGGeometryFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGGeometryFrame.cpp @@ -199,6 +199,9 @@ nsSVGGeometryFrame::GetStrokeWidth() nsresult nsSVGGeometryFrame::GetStrokeDashArray(gfxFloat **aDashes, PRUint32 *aCount) { + nsSVGElement *ctx = static_cast + (GetType() == nsGkAtoms::svgGlyphFrame ? + mContent->GetParent() : mContent); *aDashes = nsnull; *aCount = 0; @@ -215,7 +218,7 @@ nsSVGGeometryFrame::GetStrokeDashArray(gfxFloat **aDashes, PRUint32 *aCount) for (PRUint32 i = 0; i < count; i++) { dashes[i] = nsSVGUtils::CoordToFloat(presContext, - static_cast(mContent), + ctx, dasharray[i]); if (dashes[i] < 0.0f) { delete [] dashes; @@ -242,9 +245,13 @@ nsSVGGeometryFrame::GetStrokeDashArray(gfxFloat **aDashes, PRUint32 *aCount) float nsSVGGeometryFrame::GetStrokeDashoffset() { + nsSVGElement *ctx = static_cast + (GetType() == nsGkAtoms::svgGlyphFrame ? + mContent->GetParent() : mContent); + return nsSVGUtils::CoordToFloat(PresContext(), - static_cast(mContent), + ctx, GetStyleSVG()->mStrokeDashoffset); }