зеркало из https://github.com/mozilla/pjs.git
SVG's suspend/unsuspendRedraw shouldn't mess with viewmanager update batches.
Bug 305246, r=scootermorris, sr=roc
This commit is contained in:
Родитель
4efb3bffba
Коммит
a1e45f608b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче