Bug 423071 - SVG bad clippath rendering when changed via DOM. r+sr=roc,a1.9=blocking1.9+
authorlongsonr@gmail.com
Mon, 17 Mar 2008 12:55:36 -0700
changeset 13191 24084268e67c188cb78cf5135f180d393a4dc84b
parent 13190 3adda797ab437e6e485d8f20ac4498df038d1aef
child 13192 414b9da09c5727784c2e4885aa6db36d322f7476
push idunknown
push userunknown
push dateunknown
bugs423071
milestone1.9b5pre
Bug 423071 - SVG bad clippath rendering when changed via DOM. r+sr=roc,a1.9=blocking1.9+
layout/svg/base/src/nsSVGUtils.cpp
--- a/layout/svg/base/src/nsSVGUtils.cpp
+++ b/layout/svg/base/src/nsSVGUtils.cpp
@@ -295,21 +295,19 @@ void
 nsSVGClipPathProperty::DoUpdate()
 {
   nsISVGChildFrame *svgChildFrame;
   CallQueryInterface(mFrame, &svgChildFrame);
 
   if (!svgChildFrame)
     return;
 
-  if (svgChildFrame->HasValidCoveredRect()) {
-    nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
-    if (outerSVGFrame)
-      outerSVGFrame->InvalidateRect(mFrame->GetRect());
-  }
+  nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
+  if (outerSVGFrame)
+    outerSVGFrame->InvalidateRect(svgChildFrame->GetCoveredRegion());
 }
 
 void
 nsSVGClipPathProperty::ParentChainChanged(nsIContent *aContent)
 {
   if (aContent->IsInDoc())
     return;
 
@@ -354,21 +352,19 @@ void
 nsSVGMaskProperty::DoUpdate()
 {
   nsISVGChildFrame *svgChildFrame;
   CallQueryInterface(mFrame, &svgChildFrame);
 
   if (!svgChildFrame)
     return;
 
-  if (svgChildFrame->HasValidCoveredRect()) {
-    nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
-    if (outerSVGFrame)
-      outerSVGFrame->InvalidateRect(mFrame->GetRect());
-  }
+  nsSVGOuterSVGFrame *outerSVGFrame = nsSVGUtils::GetOuterSVGFrame(mFrame);
+  if (outerSVGFrame)
+    outerSVGFrame->InvalidateRect(svgChildFrame->GetCoveredRegion());
 }
 
 void
 nsSVGMaskProperty::ParentChainChanged(nsIContent *aContent)
 {
   if (aContent->IsInDoc())
     return;