| 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 24 matching lines...) Expand all Loading... |
| 35 if (entries.isEmpty()) { | 35 if (entries.isEmpty()) { |
| 36 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_UNKNOWN, emptyString
())); | 36 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_UNKNOWN, emptyString
())); |
| 37 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode")); | 37 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_ERODE, "erode")); |
| 38 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate")); | 38 entries.append(std::make_pair(FEMORPHOLOGY_OPERATOR_DILATE, "dilate")); |
| 39 } | 39 } |
| 40 return entries; | 40 return entries; |
| 41 } | 41 } |
| 42 | 42 |
| 43 // Animated property definitions | 43 // Animated property definitions |
| 44 | 44 |
| 45 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEMorphologyElement) | |
| 46 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | |
| 47 END_REGISTER_ANIMATED_PROPERTIES | |
| 48 | 45 |
| 49 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) | 46 inline SVGFEMorphologyElement::SVGFEMorphologyElement(Document& document) |
| 50 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) | 47 : SVGFilterPrimitiveStandardAttributes(SVGNames::feMorphologyTag, document) |
| 51 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt
r)) | 48 , m_radius(SVGAnimatedNumberOptionalNumber::create(this, SVGNames::radiusAtt
r)) |
| 52 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) | 49 , m_in1(SVGAnimatedString::create(this, SVGNames::inAttr, SVGString::create(
))) |
| 53 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this,
SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) | 50 , m_svgOperator(SVGAnimatedEnumeration<MorphologyOperatorType>::create(this,
SVGNames::operatorAttr, FEMORPHOLOGY_OPERATOR_ERODE)) |
| 54 { | 51 { |
| 55 ScriptWrappable::init(this); | 52 ScriptWrappable::init(this); |
| 56 | 53 |
| 57 addToPropertyMap(m_radius); | 54 addToPropertyMap(m_radius); |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 | 149 |
| 153 if (xRadius < 0 || yRadius < 0) | 150 if (xRadius < 0 || yRadius < 0) |
| 154 return nullptr; | 151 return nullptr; |
| 155 | 152 |
| 156 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); | 153 RefPtr<FilterEffect> effect = FEMorphology::create(filter, m_svgOperator->cu
rrentValue()->enumValue(), xRadius, yRadius); |
| 157 effect->inputEffects().append(input1); | 154 effect->inputEffects().append(input1); |
| 158 return effect.release(); | 155 return effect.release(); |
| 159 } | 156 } |
| 160 | 157 |
| 161 } // namespace WebCore | 158 } // namespace WebCore |
| OLD | NEW |