Bug 267650 - crash if <svg:text> is stroked and has fill='none'.

Patch by jonathan.watt@strath.ac.uk, r=tor.
This commit is contained in:
tor%cs.brown.edu 2004-11-15 13:55:34 +00:00
Родитель 68acb519c7
Коммит d6f777663c
1 изменённых файлов: 2 добавлений и 2 удалений

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

@ -396,14 +396,14 @@ nsSVGGDIPlusGlyphGeometry::Render(nsISVGRendererCanvas *canvas)
mSource->GetStrokeOpacity(&opacity); mSource->GetStrokeOpacity(&opacity);
nsCOMPtr<nsISVGGradient> aGrad; nsCOMPtr<nsISVGGradient> aGrad;
if (filltype != nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR) if (stroketype != nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR)
mSource->GetStrokeGradient(getter_AddRefs(aGrad)); mSource->GetStrokeGradient(getter_AddRefs(aGrad));
SolidBrush brush(Color((BYTE)(opacity*255), NS_GET_R(color), NS_GET_G(color), NS_GET_B(color))); SolidBrush brush(Color((BYTE)(opacity*255), NS_GET_R(color), NS_GET_G(color), NS_GET_B(color)));
if (sections.IsOnlySection() && !sections.IsHighlighted()) { if (sections.IsOnlySection() && !sections.IsHighlighted()) {
// this is the 'normal' case // this is the 'normal' case
if (filltype == nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR) { if (stroketype == nsISVGGeometrySource::PAINT_TYPE_SOLID_COLOR) {
gdiplusCanvas->GetGraphics()->FillPath(&brush, mStroke); gdiplusCanvas->GetGraphics()->FillPath(&brush, mStroke);
} else { } else {
nsCOMPtr<nsISVGRendererRegion> region; nsCOMPtr<nsISVGRendererRegion> region;