Bug 655877 - Part 38: Ignore the non-SVG frames when propagating SVG changes through a tree. r=longsonr
authorCameron McCormack <cam@mcc.id.au>
Thu, 23 Aug 2012 11:23:23 +1000
changeset 105134 8c95a0d692faed3f0ff71174f354a1f5879cd3df
parent 105133 24ae54fe53a7bf05267f2dc57fca27a9cb70e76e
child 105135 566153e74dd1a4c5f866d9e4d69a8fedd71e2464
push id55
push usershu@rfrn.org
push dateThu, 30 Aug 2012 01:33:09 +0000
reviewerslongsonr
bugs655877
milestone17.0a1
Bug 655877 - Part 38: Ignore the non-SVG frames when propagating SVG changes through a tree. r=longsonr
layout/svg/base/src/nsSVGUtils.cpp
--- a/layout/svg/base/src/nsSVGUtils.cpp
+++ b/layout/svg/base/src/nsSVGUtils.cpp
@@ -1078,20 +1078,23 @@ nsSVGUtils::NotifyChildrenOfSVGChange(ns
 {
   nsIFrame *kid = aFrame->GetFirstPrincipalChild();
 
   while (kid) {
     nsISVGChildFrame* SVGFrame = do_QueryFrame(kid);
     if (SVGFrame) {
       SVGFrame->NotifySVGChanged(aFlags); 
     } else {
-      NS_ASSERTION(kid->IsFrameOfType(nsIFrame::eSVG), "SVG frame expected");
+      NS_ASSERTION(kid->IsFrameOfType(nsIFrame::eSVG) || kid->IsSVGText(),
+                   "SVG frame expected");
       // recurse into the children of container frames e.g. <clipPath>, <mask>
       // in case they have child frames with transformation matrices
-      NotifyChildrenOfSVGChange(kid, aFlags);
+      if (kid->IsFrameOfType(nsIFrame::eSVG)) {
+        NotifyChildrenOfSVGChange(kid, aFlags);
+      }
     }
     kid = kid->GetNextSibling();
   }
 }
 
 // ************************************************************
 
 class SVGPaintCallback : public nsSVGFilterPaintCallback