Bug 805024 r=dholbert

This commit is contained in:
Robert Longson 2012-11-16 17:59:52 +00:00
parent 8145b79ba9
commit ad6ef3f12a

View File

@ -98,7 +98,8 @@ nsSVGDisplayContainerFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
const nsRect& aDirtyRect, const nsRect& aDirtyRect,
const nsDisplayListSet& aLists) const nsDisplayListSet& aLists)
{ {
if (!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) { if (mContent->IsSVG() &&
!static_cast<const nsSVGElement*>(mContent)->HasValidDimensions()) {
return NS_OK; return NS_OK;
} }
return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists); return BuildDisplayListForNonBlockChildren(aBuilder, aDirtyRect, aLists);
@ -177,14 +178,16 @@ nsSVGDisplayContainerFrame::IsSVGTransformed(gfxMatrix *aOwnTransform,
HasChildrenOnlyTransform(aFromParentTransform); HasChildrenOnlyTransform(aFromParentTransform);
} }
nsSVGElement *content = static_cast<nsSVGElement*>(mContent); if (mContent->IsSVG()) {
if (content->GetAnimatedTransformList() || nsSVGElement *content = static_cast<nsSVGElement*>(mContent);
content->GetAnimateMotionTransform()) { if (content->GetAnimatedTransformList() ||
if (aOwnTransform) { content->GetAnimateMotionTransform()) {
*aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(), if (aOwnTransform) {
nsSVGElement::eUserSpaceToParent); *aOwnTransform = content->PrependLocalTransformsTo(gfxMatrix(),
nsSVGElement::eUserSpaceToParent);
}
foundTransform = true;
} }
foundTransform = true;
} }
return foundTransform; return foundTransform;
} }