This source file includes following definitions.
- create
- createRenderer
- rendererIsNeeded
#include "config.h"
#include "core/svg/SVGTSpanElement.h"
#include "SVGNames.h"
#include "core/rendering/svg/RenderSVGTSpan.h"
namespace WebCore {
inline SVGTSpanElement::SVGTSpanElement(Document& document)
: SVGTextPositioningElement(SVGNames::tspanTag, document)
{
ScriptWrappable::init(this);
}
PassRefPtr<SVGTSpanElement> SVGTSpanElement::create(Document& document)
{
return adoptRef(new SVGTSpanElement(document));
}
RenderObject* SVGTSpanElement::createRenderer(RenderStyle*)
{
return new RenderSVGTSpan(this);
}
bool SVGTSpanElement::rendererIsNeeded(const RenderStyle& style)
{
if (parentNode()
&& (isSVGAElement(*parentNode())
#if ENABLE(SVG_FONTS)
|| isSVGAltGlyphElement(*parentNode())
#endif
|| isSVGTextElement(*parentNode())
|| isSVGTextPathElement(*parentNode())
|| isSVGTSpanElement(*parentNode())))
return Element::rendererIsNeeded(style);
return false;
}
}