| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> | 2 * Copyright (C) 2009 Dirk Schulze <krit@webkit.org> |
| 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 { | 46 { |
| 47 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
| 48 | 48 |
| 49 addToPropertyMap(m_radius); | 49 addToPropertyMap(m_radius); |
| 50 addToPropertyMap(m_in1); | 50 addToPropertyMap(m_in1); |
| 51 addToPropertyMap(m_svgOperator); | 51 addToPropertyMap(m_svgOperator); |
| 52 } | 52 } |
| 53 | 53 |
| 54 DEFINE_NODE_FACTORY(SVGFEMorphologyElement) | 54 DEFINE_NODE_FACTORY(SVGFEMorphologyElement) |
| 55 | 55 |
| 56 void SVGFEMorphologyElement::setRadius(float x, float y) | |
| 57 { | |
| 58 radiusX()->baseValue()->setValue(x); | |
| 59 radiusY()->baseValue()->setValue(y); | |
| 60 invalidate(); | |
| 61 } | |
| 62 | |
| 63 bool SVGFEMorphologyElement::isSupportedAttribute(const QualifiedName& attrName) | 56 bool SVGFEMorphologyElement::isSupportedAttribute(const QualifiedName& attrName) |
| 64 { | 57 { |
| 65 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 66 if (supportedAttributes.isEmpty()) { | 59 if (supportedAttributes.isEmpty()) { |
| 67 supportedAttributes.add(SVGNames::inAttr); | 60 supportedAttributes.add(SVGNames::inAttr); |
| 68 supportedAttributes.add(SVGNames::operatorAttr); | 61 supportedAttributes.add(SVGNames::operatorAttr); |
| 69 supportedAttributes.add(SVGNames::radiusAttr); | 62 supportedAttributes.add(SVGNames::radiusAttr); |
| 70 } | 63 } |
| 71 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); | 64 return supportedAttributes.contains<SVGAttributeHashTranslator>(attrName); |
| 72 } | 65 } |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 | 134 |
| 142 if (xRadius < 0 || yRadius < 0) | 135 if (xRadius < 0 || yRadius < 0) |
| 143 return nullptr; | 136 return nullptr; |
| 144 | 137 |
| 145 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); | 138 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); |
| 146 effect->inputEffects().append(input1); | 139 effect->inputEffects().append(input1); |
| 147 return effect.release(); | 140 return effect.release(); |
| 148 } | 141 } |
| 149 | 142 |
| 150 } // namespace blink | 143 } // namespace blink |
| OLD | NEW |