OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> | 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document& doc
ument) | 60 SVGFELightElement::SVGFELightElement(const QualifiedName& tagName, Document& doc
ument) |
61 : SVGElement(tagName, document) | 61 : SVGElement(tagName, document) |
62 , m_specularExponent(1) | 62 , m_specularExponent(1) |
63 { | 63 { |
64 registerAnimatedPropertiesForSVGFELightElement(); | 64 registerAnimatedPropertiesForSVGFELightElement(); |
65 } | 65 } |
66 | 66 |
67 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElem
ent) | 67 SVGFELightElement* SVGFELightElement::findLightElement(const SVGElement* svgElem
ent) |
68 { | 68 { |
69 for (Node* node = svgElement->firstChild(); node; node = node->nextSibling()
) { | 69 for (Node* node = svgElement->firstChild(); node; node = node->nextSibling()
) { |
70 if (node->hasTagName(SVGNames::feDistantLightTag) | 70 if (isSVGFELightElement(*node)) |
71 || node->hasTagName(SVGNames::fePointLightTag) | 71 return toSVGFELightElement(node); |
72 || node->hasTagName(SVGNames::feSpotLightTag)) { | |
73 return static_cast<SVGFELightElement*>(node); | |
74 } | |
75 } | 72 } |
76 return 0; | 73 return 0; |
77 } | 74 } |
78 | 75 |
79 PassRefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svg
Element) | 76 PassRefPtr<LightSource> SVGFELightElement::findLightSource(const SVGElement* svg
Element) |
80 { | 77 { |
81 SVGFELightElement* lightNode = findLightElement(svgElement); | 78 SVGFELightElement* lightNode = findLightElement(svgElement); |
82 if (!lightNode) | 79 if (!lightNode) |
83 return 0; | 80 return 0; |
84 return lightNode->lightSource(); | 81 return lightNode->lightSource(); |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 if (!changedByParser) { | 205 if (!changedByParser) { |
209 if (ContainerNode* parent = parentNode()) { | 206 if (ContainerNode* parent = parentNode()) { |
210 RenderObject* renderer = parent->renderer(); | 207 RenderObject* renderer = parent->renderer(); |
211 if (renderer && renderer->isSVGResourceFilterPrimitive()) | 208 if (renderer && renderer->isSVGResourceFilterPrimitive()) |
212 RenderSVGResource::markForLayoutAndParentResourceInvalidation(re
nderer); | 209 RenderSVGResource::markForLayoutAndParentResourceInvalidation(re
nderer); |
213 } | 210 } |
214 } | 211 } |
215 } | 212 } |
216 | 213 |
217 } | 214 } |
OLD | NEW |