summaryrefslogtreecommitdiffstats
path: root/WebCore/dom/Text.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'WebCore/dom/Text.cpp')
-rw-r--r--WebCore/dom/Text.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/WebCore/dom/Text.cpp b/WebCore/dom/Text.cpp
index 6271f11..47c532e 100644
--- a/WebCore/dom/Text.cpp
+++ b/WebCore/dom/Text.cpp
@@ -240,9 +240,10 @@ bool Text::rendererIsNeeded(RenderStyle *style)
RenderObject* Text::createRenderer(RenderArena* arena, RenderStyle*)
{
#if ENABLE(SVG)
- if (parentNode()->isSVGElement()
+ Node* parentOrHost = parentOrHostNode();
+ if (parentOrHost->isSVGElement()
#if ENABLE(SVG_FOREIGN_OBJECT)
- && !parentNode()->hasTagName(SVGNames::foreignObjectTag)
+ && !parentOrHost->hasTagName(SVGNames::foreignObjectTag)
#endif
)
return new (arena) RenderSVGInlineText(this, dataImpl());