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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 { | 61 { |
62 FEMorphology* morphology = static_cast<FEMorphology*>(effect); | 62 FEMorphology* morphology = static_cast<FEMorphology*>(effect); |
63 if (attrName == SVGNames::operatorAttr) | 63 if (attrName == SVGNames::operatorAttr) |
64 return morphology->setMorphologyOperator(m_svgOperator->currentValue()->
enumValue()); | 64 return morphology->setMorphologyOperator(m_svgOperator->currentValue()->
enumValue()); |
65 if (attrName == SVGNames::radiusAttr) { | 65 if (attrName == SVGNames::radiusAttr) { |
66 // Both setRadius functions should be evaluated separately. | 66 // Both setRadius functions should be evaluated separately. |
67 bool isRadiusXChanged = morphology->setRadiusX(radiusX()->currentValue()
->value()); | 67 bool isRadiusXChanged = morphology->setRadiusX(radiusX()->currentValue()
->value()); |
68 bool isRadiusYChanged = morphology->setRadiusY(radiusY()->currentValue()
->value()); | 68 bool isRadiusYChanged = morphology->setRadiusY(radiusY()->currentValue()
->value()); |
69 return isRadiusXChanged || isRadiusYChanged; | 69 return isRadiusXChanged || isRadiusYChanged; |
70 } | 70 } |
71 | 71 return SVGFilterPrimitiveStandardAttributes::setFilterEffectAttribute(effect
, attrName); |
72 ASSERT_NOT_REACHED(); | |
73 return false; | |
74 } | 72 } |
75 | 73 |
76 void SVGFEMorphologyElement::svgAttributeChanged(const QualifiedName& attrName) | 74 void SVGFEMorphologyElement::svgAttributeChanged(const QualifiedName& attrName) |
77 { | 75 { |
78 if (attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr)
{ | 76 if (attrName == SVGNames::operatorAttr || attrName == SVGNames::radiusAttr)
{ |
79 SVGElement::InvalidationGuard invalidationGuard(this); | 77 SVGElement::InvalidationGuard invalidationGuard(this); |
80 primitiveAttributeChanged(attrName); | 78 primitiveAttributeChanged(attrName); |
81 return; | 79 return; |
82 } | 80 } |
83 | 81 |
(...skipping 19 matching lines...) Expand all Loading... |
103 // | 101 // |
104 // (This is handled by FEMorphology) | 102 // (This is handled by FEMorphology) |
105 float xRadius = radiusX()->currentValue()->value(); | 103 float xRadius = radiusX()->currentValue()->value(); |
106 float yRadius = radiusY()->currentValue()->value(); | 104 float yRadius = radiusY()->currentValue()->value(); |
107 FilterEffect* effect = FEMorphology::create(filter, m_svgOperator->currentVa
lue()->enumValue(), xRadius, yRadius); | 105 FilterEffect* effect = FEMorphology::create(filter, m_svgOperator->currentVa
lue()->enumValue(), xRadius, yRadius); |
108 effect->inputEffects().append(input1); | 106 effect->inputEffects().append(input1); |
109 return effect; | 107 return effect; |
110 } | 108 } |
111 | 109 |
112 } // namespace blink | 110 } // namespace blink |
OLD | NEW |