Index: Source/core/svg/SVGUseElement.cpp |
diff --git a/Source/core/svg/SVGUseElement.cpp b/Source/core/svg/SVGUseElement.cpp |
index 3ff826babec787ae574c67827c586484f61a4e86..502f6a464299c0762d5a4ebdb5c2d40b27435852 100644 |
--- a/Source/core/svg/SVGUseElement.cpp |
+++ b/Source/core/svg/SVGUseElement.cpp |
@@ -373,7 +373,7 @@ void SVGUseElement::buildShadowAndInstanceTree(SVGElement* target) |
// Do not allow self-referencing. |
// 'target' may be null, if it's a non SVG namespaced element. |
- if (!target || target == this) |
+ if (!target || target == this || isDisallowedElement(target)) |
return; |
// Set up root SVG element in shadow tree. |