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 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);
@ -177,14 +178,16 @@ nsSVGDisplayContainerFrame::IsSVGTransformed(gfxMatrix *aOwnTransform,
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;
}