Bug 281742 - text as clip path causes paint loop. r=scooter

git-svn-id: svn://10.0.0.236/trunk@169417 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
tor%cs.brown.edu
2005-02-18 19:50:41 +00:00
parent b885bf6b95
commit 445447b918

View File

@@ -59,6 +59,7 @@
#include "nsSVGRect.h"
#include "nsSVGPoint.h"
#include "nsSVGAtoms.h"
#include "nsIViewManager.h"
typedef nsFrame nsSVGGlyphFrameBase;
@@ -1105,9 +1106,22 @@ void nsSVGGlyphFrame::UpdateGeometry(PRUint32 flags, PRBool bRedraw)
NS_ASSERTION(!mMetricsUpdateFlags, "dirty metrics in nsSVGGlyphFrame::UpdateGeometry");
NS_ASSERTION(!mFragmentTreeDirty, "dirty fragmenttree in nsSVGGlyphFrame::UpdateGeometry");
nsCOMPtr<nsISVGRendererRegion> dirty_region;
mGeometry->Update(mGeometryUpdateFlags, getter_AddRefs(dirty_region));
if (dirty_region)
outerSVGFrame->InvalidateRegion(dirty_region, bRedraw);
if (mGeometry)
mGeometry->Update(mGeometryUpdateFlags, getter_AddRefs(dirty_region));
if (dirty_region) {
// if we're being used as a clippath, this will get called
// during the paint - don't need to invalidate (which causes
// us to loop busy-painting)
nsIView *view = GetClosestView();
if (!view) return;
nsIViewManager *vm = view->GetViewManager();
PRBool painting;
vm->IsPainting(painting);
if (!painting)
outerSVGFrame->InvalidateRegion(dirty_region, bRedraw);
}
mGeometryUpdateFlags = 0;
}
}