Bug 420697: Add svgGlyphFrame check to GetStrokeDashoffset and GetStrokeDashArray, making them match GetStrokeWidth. r+sr=roc a=dveditz
git-svn-id: svn://10.0.0.236/trunk@255481 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -199,6 +199,9 @@ nsSVGGeometryFrame::GetStrokeWidth()
|
||||
nsresult
|
||||
nsSVGGeometryFrame::GetStrokeDashArray(gfxFloat **aDashes, PRUint32 *aCount)
|
||||
{
|
||||
nsSVGElement *ctx = static_cast<nsSVGElement*>
|
||||
(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<nsSVGElement*>(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<nsSVGElement*>
|
||||
(GetType() == nsGkAtoms::svgGlyphFrame ?
|
||||
mContent->GetParent() : mContent);
|
||||
|
||||
return
|
||||
nsSVGUtils::CoordToFloat(PresContext(),
|
||||
static_cast<nsSVGElement*>(mContent),
|
||||
ctx,
|
||||
GetStyleSVG()->mStrokeDashoffset);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user