Fixing bug 310862. Setting stroke-width="0" aborts rendering when using cairo. r=tor@acm.org

This commit is contained in:
jwatt%jwatt.org 2005-10-03 01:45:18 +00:00
Родитель 1aa83717e6
Коммит 20666ef8fa
2 изменённых файлов: 14 добавлений и 2 удалений

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

@ -764,7 +764,13 @@ nsSVGGlyphFrame::GetClipRule(PRUint16 *aClipRule)
NS_IMETHODIMP
nsSVGGlyphFrame::GetStrokePaintType(PRUint16 *aStrokePaintType)
{
*aStrokePaintType = GetStyleSVG()->mStroke.mType;
float strokeWidth;
GetStrokeWidth(&strokeWidth);
// cairo will stop rendering if stroke-width is less than or equal to zero
*aStrokePaintType = strokeWidth <= 0 ?
nsISVGGeometrySource::PAINT_TYPE_NONE :
GetStyleSVG()->mStroke.mType;
return NS_OK;
}

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

@ -743,7 +743,13 @@ nsSVGPathGeometryFrame::GetClipRule(PRUint16 *aClipRule)
NS_IMETHODIMP
nsSVGPathGeometryFrame::GetStrokePaintType(PRUint16 *aStrokePaintType)
{
*aStrokePaintType = GetStyleSVG()->mStroke.mType;
float strokeWidth;
GetStrokeWidth(&strokeWidth);
// cairo will stop rendering if stroke-width is less than or equal to zero
*aStrokePaintType = strokeWidth <= 0 ?
nsISVGGeometrySource::PAINT_TYPE_NONE :
GetStyleSVG()->mStroke.mType;
return NS_OK;
}