Index: Source/core/rendering/svg/RenderSVGTSpan.cpp |
diff --git a/Source/core/rendering/svg/RenderSVGTSpan.cpp b/Source/core/rendering/svg/RenderSVGTSpan.cpp |
index 5f34538620ba7d92041f7911df853581001b14bd..168037e97903a0b97f8e5d8a25fa80c7fd6b1b4a 100644 |
--- a/Source/core/rendering/svg/RenderSVGTSpan.cpp |
+++ b/Source/core/rendering/svg/RenderSVGTSpan.cpp |
@@ -24,6 +24,9 @@ |
#include "core/rendering/svg/RenderSVGTSpan.h" |
+#include "SVGNames.h" |
+#include "core/rendering/svg/SVGRenderSupport.h" |
+ |
namespace WebCore { |
RenderSVGTSpan::RenderSVGTSpan(Element* element) |
@@ -31,4 +34,19 @@ RenderSVGTSpan::RenderSVGTSpan(Element* element) |
{ |
} |
+bool RenderSVGTSpan::isChildAllowed(RenderObject* child, RenderStyle*) const |
+{ |
pdr.
2014/01/24 18:28:42
Should we add this here?
if (!RenderSVGInline::is
|
+ // Always allow text (except empty textnodes). |
+ if (child->isText()) |
+ return !SVGRenderSupport::isEmptySVGInlineText(child); |
+ |
+#if ENABLE(SVG_FONTS) |
+ // Only allow other types of children if this is not an 'altGlyph'. |
+ if (node()->hasTagName(SVGNames::altGlyphTag)) |
+ return false; |
+#endif |
+ |
+ return child->isSVGInline() && !child->isSVGTextPath(); |
+} |
+ |
} |