OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz> | 2 * Copyright (C) 2005 Oliver Hunt <ojh16@student.canterbury.ac.nz> |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 bool SVGFEDiffuseLightingElement::isSupportedAttribute(const QualifiedName& attr
Name) | 78 bool SVGFEDiffuseLightingElement::isSupportedAttribute(const QualifiedName& attr
Name) |
79 { | 79 { |
80 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 80 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
81 if (supportedAttributes.isEmpty()) { | 81 if (supportedAttributes.isEmpty()) { |
82 supportedAttributes.add(SVGNames::inAttr); | 82 supportedAttributes.add(SVGNames::inAttr); |
83 supportedAttributes.add(SVGNames::diffuseConstantAttr); | 83 supportedAttributes.add(SVGNames::diffuseConstantAttr); |
84 supportedAttributes.add(SVGNames::surfaceScaleAttr); | 84 supportedAttributes.add(SVGNames::surfaceScaleAttr); |
85 supportedAttributes.add(SVGNames::kernelUnitLengthAttr); | 85 supportedAttributes.add(SVGNames::kernelUnitLengthAttr); |
86 supportedAttributes.add(SVGNames::lighting_colorAttr); // Even though it
's a SVG-CSS property, we override its handling here. | 86 supportedAttributes.add(SVGNames::lighting_colorAttr); // Even though it
's a SVG-CSS property, we override its handling here. |
87 } | 87 } |
88 return supportedAttributes.contains<QualifiedName, SVGAttributeHashTranslato
r>(attrName); | 88 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
89 } | 89 } |
90 | 90 |
91 void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, cons
t AtomicString& value) | 91 void SVGFEDiffuseLightingElement::parseAttribute(const QualifiedName& name, cons
t AtomicString& value) |
92 { | 92 { |
93 if (!isSupportedAttribute(name) || name == SVGNames::lighting_colorAttr) { | 93 if (!isSupportedAttribute(name) || name == SVGNames::lighting_colorAttr) { |
94 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); | 94 SVGFilterPrimitiveStandardAttributes::parseAttribute(name, value); |
95 return; | 95 return; |
96 } | 96 } |
97 | 97 |
98 if (name == SVGNames::inAttr) { | 98 if (name == SVGNames::inAttr) { |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 ASSERT(renderer->style()); | 219 ASSERT(renderer->style()); |
220 Color color = renderer->style()->svgStyle()->lightingColor(); | 220 Color color = renderer->style()->svgStyle()->lightingColor(); |
221 | 221 |
222 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, surfa
ceScale(), diffuseConstant(), | 222 RefPtr<FilterEffect> effect = FEDiffuseLighting::create(filter, color, surfa
ceScale(), diffuseConstant(), |
223 kernelUnitLength
X(), kernelUnitLengthY(), lightSource.release()); | 223 kernelUnitLength
X(), kernelUnitLengthY(), lightSource.release()); |
224 effect->inputEffects().append(input1); | 224 effect->inputEffects().append(input1); |
225 return effect.release(); | 225 return effect.release(); |
226 } | 226 } |
227 | 227 |
228 } | 228 } |
OLD | NEW |