Index: Source/core/svg/SVGElement.cpp |
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp |
index dffa90982c18e023169c0361571c0c274adde89d..a62f9bd5a53a8592418cf821b632be929ea95d28 100644 |
--- a/Source/core/svg/SVGElement.cpp |
+++ b/Source/core/svg/SVGElement.cpp |
@@ -41,6 +41,7 @@ |
#include "core/svg/SVGElementInstance.h" |
#include "core/svg/SVGElementRareData.h" |
#include "core/svg/SVGGraphicsElement.h" |
+#include "core/svg/SVGImageElement.h" |
#include "core/svg/SVGSVGElement.h" |
namespace WebCore { |
@@ -211,7 +212,7 @@ SVGElement* SVGElement::viewportElement() const |
// to determine the "overflow" property. <use> on <symbol> wouldn't work otherwhise. |
ContainerNode* n = parentOrShadowHostNode(); |
while (n) { |
- if (n->hasTagName(SVGNames::svgTag) || n->hasTagName(SVGNames::imageTag) || n->hasTagName(SVGNames::symbolTag)) |
+ if (n->hasTagName(SVGNames::svgTag) || isSVGImageElement(n) || n->hasTagName(SVGNames::symbolTag)) |
return toSVGElement(n); |
n = n->parentOrShadowHostNode(); |