Bug 805024 r=dholbert a=lsblakk
authorRobert Longson <longsonr@gmail.com>
Fri, 16 Nov 2012 17:59:52 +0000
changeset 116978 b236d7245d62dbe1333ea2277d92e56d51ea5021
parent 116977 e1215c9cd1fa388e954750de2a11fc884d791cd8
child 116979 7e69a5d9d0db81577cd3a1ed40ec4faab0d8906d
push idunknown
push userunknown
push dateunknown
reviewersdholbert, lsblakk
bugs805024
milestone18.0a2
Bug 805024 r=dholbert a=lsblakk
layout/svg/nsSVGContainerFrame.cpp
--- a/layout/svg/nsSVGContainerFrame.cpp
+++ b/layout/svg/nsSVGContainerFrame.cpp
@@ -93,17 +93,18 @@ nsSVGDisplayContainerFrame::Init(nsICont
   return rv;
 }
 
 NS_IMETHODIMP
 nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder*   aBuilder,
                                              const nsRect&           aDirtyRect,
                                              const nsDisplayListSet& aLists)
 {
-  if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
+  if (mContent->IsSVG() &&
+      !static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
     return NS_OK;
   }
   return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
 }
 
 NS_IMETHODIMP
 nsSVGDisplayContainerFrame::InsertFrames(ChildListID aListID,
                                          nsIFrame* aPrevFrame,
@@ -172,24 +173,26 @@ nsSVGDisplayContainerFrame::IsSVGTransfo
   // Check if our parent has children-only transforms:
   nsIFrame *parent = GetParent();
   if (parent &&
       parent->IsFrameOfType(nsIFrame::eSVG | nsIFrame::eSVGContainer)) {
     foundTransform = static_cast<nsSVGContainerFrame*>(parent)->
                        HasChildrenOnlyTransform(aFromParentTransform);
   }
 
-  nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
-  if (content->GetAnimatedTransformList() ||
-      content->GetAnimateMotionTransform()) {
-    if (aOwnTransform) {
-      *aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
-                                  nsSVGElement::eUserSpaceToParent);
+  if (mContent->IsSVG()) {
+    nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
+    if (content->GetAnimatedTransformList() ||
+        content->GetAnimateMotionTransform()) {
+      if (aOwnTransform) {
+        *aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
+                                    nsSVGElement::eUserSpaceToParent);
+      }
+      foundTransform = true;
     }
-    foundTransform = true;
   }
   return foundTransform;
 }
 
 //----------------------------------------------------------------------
 // nsISVGChildFrame methods
 
 NS_IMETHODIMP