From b854e17f6e052b61b05fd81f615c16da96f4704b Mon Sep 17 00:00:00 2001 From: Robert Longson Date: Wed, 7 Oct 2009 14:54:00 +0100 Subject: [PATCH] Bug 413975 - GetCtx returning null does not mean we are an outer SVG. r=jwatt --- content/svg/content/src/nsSVGSVGElement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/svg/content/src/nsSVGSVGElement.cpp b/content/svg/content/src/nsSVGSVGElement.cpp index 3dd29d493798..d4e7db7a39e8 100644 --- a/content/svg/content/src/nsSVGSVGElement.cpp +++ b/content/svg/content/src/nsSVGSVGElement.cpp @@ -1133,8 +1133,8 @@ nsSVGSVGElement::GetLength(PRUint8 aCtxType) w = viewbox.width; h = viewbox.height; } else { - nsSVGSVGElement *ctx = GetCtx(); - if (ctx) { + if (nsSVGUtils::IsInnerSVG(this)) { + nsSVGSVGElement *ctx = GetCtx(); w = mLengthAttributes[WIDTH].GetAnimValue(ctx); h = mLengthAttributes[HEIGHT].GetAnimValue(ctx); } else {