Bug 805024 r=dholbert
authorRobert Longson <longsonr@gmail.com>
Fri, 16 Nov 2012 17:59:52 +0000
changeset 113515 e9bf324198961d40c04ca5faa7473b90dbca8407
parent 113514 46c4e91472daa6c3a40d9d890e8d623062ac8f4d
child 113516 17c5efe9eab461ccd0300022a52872a64a2af255
push id18200
push userlongsonr@gmail.com
push dateFri, 16 Nov 2012 18:00:15 +0000
treeherdermozilla-inbound@e9bf32419896 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs805024
milestone19.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 805024 r=dholbert
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