Bug 903732 - Stop leaking gfxPattern objects when using CSS text frames. r=dholbert

This commit is contained in:
Robert Longson 2013-08-12 19:39:08 +01:00
Родитель 55ccfb3702
Коммит f329519406
1 изменённых файлов: 6 добавлений и 4 удалений

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

@ -5481,10 +5481,12 @@ nsSVGTextFrame2::SetupInheritablePaint(gfxContext* aContext,
aFillOrStroke);
aTargetPaint.SetColor(color);
aContext->SetPattern(new gfxPattern(gfxRGBA(NS_GET_R(color) / 255.0,
NS_GET_G(color) / 255.0,
NS_GET_B(color) / 255.0,
NS_GET_A(color) / 255.0 * aOpacity)));
nsRefPtr<gfxPattern> pattern =
new gfxPattern(gfxRGBA(NS_GET_R(color) / 255.0,
NS_GET_G(color) / 255.0,
NS_GET_B(color) / 255.0,
NS_GET_A(color) / 255.0 * aOpacity));
aContext->SetPattern(pattern);
}
}