From 7c3c9de5aea28827352b67596f6baef749c12a99 Mon Sep 17 00:00:00 2001 From: "bzbarsky%mit.edu" Date: Wed, 24 Aug 2005 21:20:32 +0000 Subject: [PATCH] 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 --- .../svg/base/src/nsSVGOuterSVGFrame.cpp | 25 ++----------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp b/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp index fcf469d5825..70a5559733e 100644 --- a/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp +++ b/mozilla/layout/svg/base/src/nsSVGOuterSVGFrame.cpp @@ -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; }