blob: e60eca37b004ab3c9847595a7be1015db78e88de [file] [log] [blame]
darinb9481ed2006-03-20 02:57:59 +00001/*
2 Copyright (C) 2004, 2005 Nikolas Zimmermann <wildfox@kde.org>
3 2004, 2005 Rob Buis <buis@kde.org>
4
5 This file is part of the KDE project
6
7 This library is free software; you can redistribute it and/or
8 modify it under the terms of the GNU Library General Public
9 License as published by the Free Software Foundation; either
10 version 2 of the License, or (at your option) any later version.
11
12 This library is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 Library General Public License for more details.
16
17 You should have received a copy of the GNU Library General Public License
18 along with this library; see the file COPYING.LIB. If not, write to
19 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 Boston, MA 02111-1307, USA.
21*/
22
23#include "config.h"
ddkilzer54f5cea2006-08-10 05:11:25 +000024#ifdef SVG_SUPPORT
darinb9481ed2006-03-20 02:57:59 +000025#include "SVGTSpanElement.h"
26#include "SVGNames.h"
27#include "RenderInline.h"
28
29using namespace WebCore;
30
31SVGTSpanElement::SVGTSpanElement(const QualifiedName& tagName, Document *doc)
32: SVGTextPositioningElement(tagName, doc)
33{
34}
35
36SVGTSpanElement::~SVGTSpanElement()
37{
38}
39
darinf4b05b22006-07-10 05:20:17 +000040bool SVGTSpanElement::childShouldCreateRenderer(Node *child) const
darinb9481ed2006-03-20 02:57:59 +000041{
eseidel1ae91032006-04-19 10:57:05 +000042 if (child->isTextNode() || child->hasTagName(SVGNames::tspanTag) ||
43 child->hasTagName(SVGNames::trefTag))
darinb9481ed2006-03-20 02:57:59 +000044 return true;
45 return false;
46}
47
48RenderObject *SVGTSpanElement::createRenderer(RenderArena *arena, RenderStyle *)
49{
50 return new (arena) RenderInline(this);
51}
52
53// vim:ts=4:noet
54#endif // SVG_SUPPORT
55