OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> | 3 * Copyright (C) 2010 Rob Buis <rwlbuis@gmail.com> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 | 122 |
123 if (RenderObject* object = renderer()) | 123 if (RenderObject* object = renderer()) |
124 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); | 124 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); |
125 } | 125 } |
126 | 126 |
127 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) | 127 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) |
128 { | 128 { |
129 return new RenderSVGTextPath(this); | 129 return new RenderSVGTextPath(this); |
130 } | 130 } |
131 | 131 |
132 bool SVGTextPathElement::childShouldCreateRenderer(const Node& child) const | |
133 { | |
134 if (child.isTextNode() | |
135 || child.hasTagName(SVGNames::aTag) | |
136 || child.hasTagName(SVGNames::tspanTag)) | |
137 return true; | |
138 | |
139 return false; | |
140 } | |
141 | |
142 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) | 132 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) |
143 { | 133 { |
144 if (parentNode() | 134 if (parentNode() |
145 && (parentNode()->hasTagName(SVGNames::aTag) | 135 && (parentNode()->hasTagName(SVGNames::aTag) |
146 || parentNode()->hasTagName(SVGNames::textTag))) | 136 || parentNode()->hasTagName(SVGNames::textTag))) |
147 return Element::rendererIsNeeded(style); | 137 return Element::rendererIsNeeded(style); |
148 | 138 |
149 return false; | 139 return false; |
150 } | 140 } |
151 | 141 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 clearResourceReferences(); | 177 clearResourceReferences(); |
188 } | 178 } |
189 | 179 |
190 bool SVGTextPathElement::selfHasRelativeLengths() const | 180 bool SVGTextPathElement::selfHasRelativeLengths() const |
191 { | 181 { |
192 return m_startOffset->currentValue()->isRelative() | 182 return m_startOffset->currentValue()->isRelative() |
193 || SVGTextContentElement::selfHasRelativeLengths(); | 183 || SVGTextContentElement::selfHasRelativeLengths(); |
194 } | 184 } |
195 | 185 |
196 } | 186 } |
OLD | NEW |