Bug 483439 - text with stroke and fill causes crashes. r+sr=roc

This commit is contained in:
Robert Longson 2009-03-16 11:59:23 +00:00
Родитель a3b5943119
Коммит c165a61804
1 изменённых файлов: 2 добавлений и 1 удалений

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

@ -449,11 +449,11 @@ nsSVGGlyphFrame::UpdateCoveredRegion()
nsRefPtr<gfxContext> tmpCtx = MakeTmpCtx();
SetMatrixPropagation(PR_FALSE);
CharacterIterator iter(this, PR_TRUE);
gfxRect extent = gfxRect(0, 0, 0, 0);
if (SetupCairoStrokeGeometry(tmpCtx)) {
CharacterIterator iter(this, PR_TRUE);
gfxFloat strokeWidth = tmpCtx->CurrentLineWidth();
AddCharactersToPath(&iter, tmpCtx);
tmpCtx->SetLineWidth(strokeWidth);
@ -461,6 +461,7 @@ nsSVGGlyphFrame::UpdateCoveredRegion()
extent = tmpCtx->GetUserStrokeExtent();
}
if (GetStyleSVG()->mFill.mType != eStyleSVGPaintType_None) {
CharacterIterator iter(this, PR_TRUE);
AddBoundingBoxesToPath(&iter, tmpCtx);
tmpCtx->IdentityMatrix();
extent = extent.Union(tmpCtx->GetUserPathExtent());