darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 1 | /* |
| 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" |
ddkilzer | 54f5cea | 2006-08-10 05:11:25 +0000 | [diff] [blame] | 24 | #ifdef SVG_SUPPORT |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 25 | #include "SVGTSpanElement.h" |
| 26 | #include "SVGNames.h" |
| 27 | #include "RenderInline.h" |
| 28 | |
| 29 | using namespace WebCore; |
| 30 | |
| 31 | SVGTSpanElement::SVGTSpanElement(const QualifiedName& tagName, Document *doc) |
| 32 | : SVGTextPositioningElement(tagName, doc) |
| 33 | { |
| 34 | } |
| 35 | |
| 36 | SVGTSpanElement::~SVGTSpanElement() |
| 37 | { |
| 38 | } |
| 39 | |
darin | f4b05b2 | 2006-07-10 05:20:17 +0000 | [diff] [blame] | 40 | bool SVGTSpanElement::childShouldCreateRenderer(Node *child) const |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 41 | { |
eseidel | 1ae9103 | 2006-04-19 10:57:05 +0000 | [diff] [blame] | 42 | if (child->isTextNode() || child->hasTagName(SVGNames::tspanTag) || |
| 43 | child->hasTagName(SVGNames::trefTag)) |
darin | b9481ed | 2006-03-20 02:57:59 +0000 | [diff] [blame] | 44 | return true; |
| 45 | return false; |
| 46 | } |
| 47 | |
| 48 | RenderObject *SVGTSpanElement::createRenderer(RenderArena *arena, RenderStyle *) |
| 49 | { |
| 50 | return new (arena) RenderInline(this); |
| 51 | } |
| 52 | |
| 53 | // vim:ts=4:noet |
| 54 | #endif // SVG_SUPPORT |
| 55 | |