OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 if (!renderer) | 83 if (!renderer) |
84 return; | 84 return; |
85 | 85 |
86 ASSERT(updateRelativeLengths || attrName == SVGNames::rotateAttr); | 86 ASSERT(updateRelativeLengths || attrName == SVGNames::rotateAttr); |
87 | 87 |
88 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(renderer)) | 88 if (RenderSVGText* textRenderer = RenderSVGText::locateRenderSVGTextAncestor
(renderer)) |
89 textRenderer->setNeedsPositioningValuesUpdate(); | 89 textRenderer->setNeedsPositioningValuesUpdate(); |
90 markForLayoutAndParentResourceInvalidation(renderer); | 90 markForLayoutAndParentResourceInvalidation(renderer); |
91 } | 91 } |
92 | 92 |
93 SVGTextPositioningElement* SVGTextPositioningElement::elementFromRenderer(Render
Object* renderer) | 93 SVGTextPositioningElement* SVGTextPositioningElement::elementFromRenderer(Render
Object& renderer) |
94 { | 94 { |
95 if (!renderer) | 95 if (!renderer.isSVGText() && !renderer.isSVGInline()) |
96 return 0; | 96 return 0; |
97 | 97 |
98 if (!renderer->isSVGText() && !renderer->isSVGInline()) | 98 Node* node = renderer.node(); |
99 return 0; | |
100 | |
101 Node* node = renderer->node(); | |
102 ASSERT(node); | 99 ASSERT(node); |
103 ASSERT(node->isSVGElement()); | 100 ASSERT(node->isSVGElement()); |
104 | 101 |
105 return isSVGTextPositioningElement(*node) ? toSVGTextPositioningElement(node
) : 0; | 102 return isSVGTextPositioningElement(*node) ? toSVGTextPositioningElement(node
) : 0; |
106 } | 103 } |
107 | 104 |
108 } | 105 } |
OLD | NEW |