OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007, 2008 Rob Buis <buis@kde.org> |
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 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 #if ENABLE(SVG_FONTS) | 314 #if ENABLE(SVG_FONTS) |
315 && !node->hasTagName(SVGNames::altGlyphTag) | 315 && !node->hasTagName(SVGNames::altGlyphTag) |
316 #endif | 316 #endif |
317 && !node->hasTagName(SVGNames::trefTag) | 317 && !node->hasTagName(SVGNames::trefTag) |
318 && !node->hasTagName(SVGNames::textPathTag)) | 318 && !node->hasTagName(SVGNames::textPathTag)) |
319 return 0; | 319 return 0; |
320 | 320 |
321 return static_cast<SVGTextContentElement*>(node); | 321 return static_cast<SVGTextContentElement*>(node); |
322 } | 322 } |
323 | 323 |
324 void SVGTextContentElement::childrenChanged(bool changedByParser, Node* beforeCh
ange, Node* afterChange, int childCountDelta) | |
325 { | |
326 SVGStyledElement::childrenChanged(changedByParser, beforeChange, afterChange
, childCountDelta); | |
327 | |
328 if (changedByParser || !renderer()) | |
329 return; | |
330 | |
331 // Invalidate the TextPosition cache in SVGTextLayoutAttributesBuilder as it
may now point | |
332 // to no-longer existing SVGTextPositioningElements and thus needs to be reb
uilt. | |
333 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(renderer())) | |
334 textRenderer->invalidateTextPositioningElements(); | |
335 } | |
336 | |
337 } | 324 } |
338 | 325 |
339 #endif // ENABLE(SVG) | 326 #endif // ENABLE(SVG) |
OLD | NEW |