| 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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 | 117 |
| 118 void SVGFESpecularLightingElement::lightElementAttributeChanged(const SVGFELight
Element* lightElement, const QualifiedName& attrName) | 118 void SVGFESpecularLightingElement::lightElementAttributeChanged(const SVGFELight
Element* lightElement, const QualifiedName& attrName) |
| 119 { | 119 { |
| 120 if (SVGFELightElement::findLightElement(*this) != lightElement) | 120 if (SVGFELightElement::findLightElement(*this) != lightElement) |
| 121 return; | 121 return; |
| 122 | 122 |
| 123 // The light element has different attribute names so attrName can identify
the requested attribute. | 123 // The light element has different attribute names so attrName can identify
the requested attribute. |
| 124 primitiveAttributeChanged(attrName); | 124 primitiveAttributeChanged(attrName); |
| 125 } | 125 } |
| 126 | 126 |
| 127 PassRefPtrWillBeRawPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilt
erBuilder* filterBuilder, Filter* filter) | 127 RawPtr<FilterEffect> SVGFESpecularLightingElement::build(SVGFilterBuilder* filte
rBuilder, Filter* filter) |
| 128 { | 128 { |
| 129 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); | 129 FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->curr
entValue()->value())); |
| 130 ASSERT(input1); | 130 ASSERT(input1); |
| 131 | 131 |
| 132 LayoutObject* layoutObject = this->layoutObject(); | 132 LayoutObject* layoutObject = this->layoutObject(); |
| 133 if (!layoutObject) | 133 if (!layoutObject) |
| 134 return nullptr; | 134 return nullptr; |
| 135 | 135 |
| 136 ASSERT(layoutObject->style()); | 136 ASSERT(layoutObject->style()); |
| 137 Color color = layoutObject->style()->svgStyle().lightingColor(); | 137 Color color = layoutObject->style()->svgStyle().lightingColor(); |
| 138 | 138 |
| 139 const SVGFELightElement* lightNode = SVGFELightElement::findLightElement(*th
is); | 139 const SVGFELightElement* lightNode = SVGFELightElement::findLightElement(*th
is); |
| 140 RefPtr<LightSource> lightSource = lightNode ? lightNode->lightSource(filter)
: nullptr; | 140 RefPtr<LightSource> lightSource = lightNode ? lightNode->lightSource(filter)
: nullptr; |
| 141 | 141 |
| 142 RefPtrWillBeRawPtr<FilterEffect> effect = FESpecularLighting::create(filter, | 142 RawPtr<FilterEffect> effect = FESpecularLighting::create(filter, |
| 143 color, | 143 color, |
| 144 m_surfaceScale->currentValue()->value(), | 144 m_surfaceScale->currentValue()->value(), |
| 145 m_specularConstant->currentValue()->value(), | 145 m_specularConstant->currentValue()->value(), |
| 146 m_specularExponent->currentValue()->value(), | 146 m_specularExponent->currentValue()->value(), |
| 147 lightSource.release()); | 147 lightSource.release()); |
| 148 effect->inputEffects().append(input1); | 148 effect->inputEffects().append(input1); |
| 149 return effect.release(); | 149 return effect.release(); |
| 150 } | 150 } |
| 151 | 151 |
| 152 } // namespace blink | 152 } // namespace blink |
| OLD | NEW |