| 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); | 132 RenderSVGResource::markForLayoutAndParentResourceInvalidation(object); |
| 133 } | 133 } |
| 134 | 134 |
| 135 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) | 135 RenderObject* SVGTextPathElement::createRenderer(RenderStyle*) |
| 136 { | 136 { |
| 137 return new RenderSVGTextPath(this); | 137 return new RenderSVGTextPath(this); |
| 138 } | 138 } |
| 139 | 139 |
| 140 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) | 140 bool SVGTextPathElement::rendererIsNeeded(const RenderStyle& style) |
| 141 { | 141 { |
| 142 if (parentNode() | 142 if (parentNode() && (isSVGAElement(*parentNode()) || isSVGTextElement(*paren
tNode()))) |
| 143 && (parentNode()->hasTagName(SVGNames::aTag) | |
| 144 || parentNode()->hasTagName(SVGNames::textTag))) | |
| 145 return Element::rendererIsNeeded(style); | 143 return Element::rendererIsNeeded(style); |
| 146 | 144 |
| 147 return false; | 145 return false; |
| 148 } | 146 } |
| 149 | 147 |
| 150 void SVGTextPathElement::buildPendingResource() | 148 void SVGTextPathElement::buildPendingResource() |
| 151 { | 149 { |
| 152 clearResourceReferences(); | 150 clearResourceReferences(); |
| 153 if (!inDocument()) | 151 if (!inDocument()) |
| 154 return; | 152 return; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 185 clearResourceReferences(); | 183 clearResourceReferences(); |
| 186 } | 184 } |
| 187 | 185 |
| 188 bool SVGTextPathElement::selfHasRelativeLengths() const | 186 bool SVGTextPathElement::selfHasRelativeLengths() const |
| 189 { | 187 { |
| 190 return m_startOffset->currentValue()->isRelative() | 188 return m_startOffset->currentValue()->isRelative() |
| 191 || SVGTextContentElement::selfHasRelativeLengths(); | 189 || SVGTextContentElement::selfHasRelativeLengths(); |
| 192 } | 190 } |
| 193 | 191 |
| 194 } | 192 } |
| OLD | NEW |