| 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 * | 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 { | 87 { |
| 88 return SVGFEBlendElement::ModeLighten; | 88 return SVGFEBlendElement::ModeLighten; |
| 89 } | 89 } |
| 90 | 90 |
| 91 inline SVGFEBlendElement::SVGFEBlendElement(Document& document) | 91 inline SVGFEBlendElement::SVGFEBlendElement(Document& document) |
| 92 : SVGFilterPrimitiveStandardAttributes(SVGNames::feBlendTag, document) | 92 : SVGFilterPrimitiveStandardAttributes(SVGNames::feBlendTag, document) |
| 93 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 93 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
| 94 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) | 94 , m_in2(SVGAnimatedString::create(this, SVGNames::in2Attr, SVGString::create
())) |
| 95 , m_mode(SVGAnimatedEnumeration<Mode>::create(this, SVGNames::modeAttr, SVGF
EBlendElement::ModeNormal)) | 95 , m_mode(SVGAnimatedEnumeration<Mode>::create(this, SVGNames::modeAttr, SVGF
EBlendElement::ModeNormal)) |
| 96 { | 96 { |
| 97 ScriptWrappable::init(this); | |
| 98 addToPropertyMap(m_in1); | 97 addToPropertyMap(m_in1); |
| 99 addToPropertyMap(m_in2); | 98 addToPropertyMap(m_in2); |
| 100 addToPropertyMap(m_mode); | 99 addToPropertyMap(m_mode); |
| 101 } | 100 } |
| 102 | 101 |
| 103 DEFINE_NODE_FACTORY(SVGFEBlendElement) | 102 DEFINE_NODE_FACTORY(SVGFEBlendElement) |
| 104 | 103 |
| 105 bool SVGFEBlendElement::isSupportedAttribute(const QualifiedName& attrName) | 104 bool SVGFEBlendElement::isSupportedAttribute(const QualifiedName& attrName) |
| 106 { | 105 { |
| 107 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 106 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 160 | 159 |
| 161 RefPtr<FilterEffect> effect = FEBlend::create(filter, toWebBlendMode(m_mode-
>currentValue()->enumValue())); | 160 RefPtr<FilterEffect> effect = FEBlend::create(filter, toWebBlendMode(m_mode-
>currentValue()->enumValue())); |
| 162 FilterEffectVector& inputEffects = effect->inputEffects(); | 161 FilterEffectVector& inputEffects = effect->inputEffects(); |
| 163 inputEffects.reserveCapacity(2); | 162 inputEffects.reserveCapacity(2); |
| 164 inputEffects.append(input1); | 163 inputEffects.append(input1); |
| 165 inputEffects.append(input2); | 164 inputEffects.append(input2); |
| 166 return effect.release(); | 165 return effect.release(); |
| 167 } | 166 } |
| 168 | 167 |
| 169 } | 168 } |
| OLD | NEW |