Bug 331291 - clip setup from svg image was persistent. r=scooter

This commit is contained in:
tor%cs.brown.edu 2006-03-22 23:17:26 +00:00
Родитель 34c8c3500d
Коммит 705187274e
1 изменённых файлов: 8 добавлений и 3 удалений

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

@ -319,9 +319,6 @@ nsSVGImageFrame::PaintSVG(nsISVGRendererCanvas* canvas)
mWidth->GetValue(&width);
mHeight->GetValue(&height);
if (GetStyleDisplay()->IsScrollableOverflow())
canvas->SetClipRect(ctm, x, y, width, height);
PRUint32 nativeWidth, nativeHeight;
mSurface->GetWidth(&nativeWidth);
mSurface->GetHeight(&nativeHeight);
@ -338,9 +335,17 @@ nsSVGImageFrame::PaintSVG(nsISVGRendererCanvas* canvas)
ctm->Translate(x, y, getter_AddRefs(ctmXY));
ctmXY->Multiply(trans, getter_AddRefs(fini));
if (GetStyleDisplay()->IsScrollableOverflow()) {
canvas->PushClip();
canvas->SetClipRect(ctm, x, y, width, height);
}
canvas->CompositeSurfaceMatrix(mSurface,
fini,
mStyleContext->GetStyleDisplay()->mOpacity);
if (GetStyleDisplay()->IsScrollableOverflow())
canvas->PopClip();
}
return NS_OK;