Index: Source/core/svg/SVGElement.cpp |
diff --git a/Source/core/svg/SVGElement.cpp b/Source/core/svg/SVGElement.cpp |
index fddac6d6e4d3eaa15604c38df356afb1eb3e51e1..fb01d7847c67db9e3887a28c67c9ffdfc1151f68 100644 |
--- a/Source/core/svg/SVGElement.cpp |
+++ b/Source/core/svg/SVGElement.cpp |
@@ -175,10 +175,13 @@ bool SVGElement::rendererIsNeeded(const RenderStyle& style) |
// Spec: SVG allows inclusion of elements from foreign namespaces anywhere |
// with the SVG content. In general, the SVG user agent will include the unknown |
// elements in the DOM but will otherwise ignore unknown elements. |
- if (!parentOrShadowHostElement() || parentOrShadowHostElement()->isSVGElement()) |
- return Element::rendererIsNeeded(style); |
+ if (parentOrShadowHostElement() && !parentOrShadowHostElement()->isSVGElement()) |
pdr.
2014/06/19 21:33:48
Won't this create renderers for elements without a
|
+ return false; |
- return false; |
+ if (!isValid()) |
+ return false; |
+ |
+ return Element::rendererIsNeeded(style); |
} |
SVGElementRareData* SVGElement::ensureSVGRareData() |