зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
68acb519c7
Коммит
d6f777663c
|
@ -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;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче