SVG's suspend/unsuspendRedraw shouldn't mess with viewmanager update batches.

Bug 305246, r=scootermorris, sr=roc
This commit is contained in:
bzbarsky%mit.edu 2005-08-24 01:03:42 +00:00
Родитель 4efb3bffba
Коммит a1e45f608b
1 изменённых файлов: 2 добавлений и 23 удалений

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

@ -1026,21 +1026,10 @@ nsSVGOuterSVGFrame::SuspendRedraw()
if (++mRedrawSuspendCount != 1)
return NS_OK;
// get the view manager, so that we can wrap this up in a batch
// update.
nsIViewManager* vm = GetPresContext()->GetViewManager();
// we can get called in the process of ripping down a page, in
// which case the view manager isn't around anymore.
if (!vm)
return NS_OK;
vm->BeginUpdateViewBatch();
for (nsIFrame* kid = mFrames.FirstChild(); kid;
kid = kid->GetNextSibling()) {
nsISVGChildFrame* SVGFrame=nsnull;
kid->QueryInterface(NS_GET_IID(nsISVGChildFrame),(void**)&SVGFrame);
CallQueryInterface(kid, &SVGFrame);
if (SVGFrame) {
SVGFrame->NotifyRedrawSuspended();
}
@ -1067,25 +1056,15 @@ nsSVGOuterSVGFrame::UnsuspendRedraw()
if (mNeedsReflow)
InitiateReflow();
// get the view manager, so that we can wrap this up in a batch
// update.
nsIViewManager* vm = GetPresContext()->GetViewManager();
// we can get called in the process of ripping down a page, in
// which case the view manager isn't around anymore.
if (!vm)
return NS_OK;
for (nsIFrame* kid = mFrames.FirstChild(); kid;
kid = kid->GetNextSibling()) {
nsISVGChildFrame* SVGFrame=nsnull;
kid->QueryInterface(NS_GET_IID(nsISVGChildFrame),(void**)&SVGFrame);
CallQueryInterface(kid, &SVGFrame);
if (SVGFrame) {
SVGFrame->NotifyRedrawUnsuspended();
}
}
vm->EndUpdateViewBatch(NS_VMREFRESH_NO_SYNC);
return NS_OK;
}