| 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Docum
ent& document) | 82 SVGTextContentElement::SVGTextContentElement(const QualifiedName& tagName, Docum
ent& document) |
| 83 : SVGGraphicsElement(tagName, document) | 83 : SVGGraphicsElement(tagName, document) |
| 84 , m_textLength(SVGAnimatedTextLength::create(this)) | 84 , m_textLength(SVGAnimatedTextLength::create(this)) |
| 85 , m_textLengthIsSpecifiedByUser(false) | 85 , m_textLengthIsSpecifiedByUser(false) |
| 86 , m_lengthAdjust(SVGAnimatedEnumeration<SVGLengthAdjustType>::create(this, S
VGNames::lengthAdjustAttr, SVGLengthAdjustSpacing)) | 86 , m_lengthAdjust(SVGAnimatedEnumeration<SVGLengthAdjustType>::create(this, S
VGNames::lengthAdjustAttr, SVGLengthAdjustSpacing)) |
| 87 { | 87 { |
| 88 ScriptWrappable::init(this); | 88 ScriptWrappable::init(this); |
| 89 | 89 |
| 90 addToPropertyMap(m_textLength); | 90 addToPropertyMap(m_textLength); |
| 91 addToPropertyMap(m_lengthAdjust); | 91 addToPropertyMap(m_lengthAdjust); |
| 92 registerAnimatedPropertiesForSVGTextContentElement(); | |
| 93 } | 92 } |
| 94 | 93 |
| 95 unsigned SVGTextContentElement::getNumberOfChars() | 94 unsigned SVGTextContentElement::getNumberOfChars() |
| 96 { | 95 { |
| 97 document().updateLayoutIgnorePendingStylesheets(); | 96 document().updateLayoutIgnorePendingStylesheets(); |
| 98 return SVGTextQuery(renderer()).numberOfCharacters(); | 97 return SVGTextQuery(renderer()).numberOfCharacters(); |
| 99 } | 98 } |
| 100 | 99 |
| 101 float SVGTextContentElement::getComputedTextLength() | 100 float SVGTextContentElement::getComputedTextLength() |
| 102 { | 101 { |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 SVGElement* element = toSVGElement(renderer->node()); | 286 SVGElement* element = toSVGElement(renderer->node()); |
| 288 ASSERT(element); | 287 ASSERT(element); |
| 289 | 288 |
| 290 if (!element->isTextContent()) | 289 if (!element->isTextContent()) |
| 291 return 0; | 290 return 0; |
| 292 | 291 |
| 293 return toSVGTextContentElement(element); | 292 return toSVGTextContentElement(element); |
| 294 } | 293 } |
| 295 | 294 |
| 296 } | 295 } |
| OLD | NEW |