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

batches. Bug 305246, r=scootermorris, sr=roc, a=asa


git-svn-id: svn://10.0.0.236/branches/MOZILLA_1_8_BRANCH@178860 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2005-08-24 21:20:32 +00:00
parent 98a96baf67
commit 7c3c9de5ae

View File

@@ -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;
}