Index: Source/core/dom/Text.cpp |
diff --git a/Source/core/dom/Text.cpp b/Source/core/dom/Text.cpp |
index 3e2e243e4c39fe7fd5f01bfd86ca93834830bb9c..d79941897d3214cac794c0fe4f527a0e75efc44e 100644 |
--- a/Source/core/dom/Text.cpp |
+++ b/Source/core/dom/Text.cpp |
@@ -36,6 +36,7 @@ |
#include "core/rendering/RenderCombineText.h" |
#include "core/rendering/RenderText.h" |
#include "core/rendering/svg/RenderSVGInlineText.h" |
+#include "core/svg/SVGForeignObjectElement.h" |
#include "wtf/text/CString.h" |
#include "wtf/text/StringBuilder.h" |
@@ -290,7 +291,8 @@ bool Text::textRendererIsNeeded(const RenderStyle& style, const RenderObject& pa |
static bool isSVGText(Text* text) |
{ |
Node* parentOrShadowHostNode = text->parentOrShadowHostNode(); |
- return parentOrShadowHostNode->isSVGElement() && !parentOrShadowHostNode->hasTagName(SVGNames::foreignObjectTag); |
+ ASSERT(parentOrShadowHostNode); |
+ return parentOrShadowHostNode->isSVGElement() && !isSVGForeignObjectElement(*parentOrShadowHostNode); |
} |
RenderText* Text::createTextRenderer(RenderStyle* style) |