| 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 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 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 23 matching lines...) Expand all Loading... |
| 34 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dxAttr, Dx, dx) | 34 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dxAttr, Dx, dx) |
| 35 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dyAttr, Dy, dy) | 35 DEFINE_ANIMATED_NUMBER(SVGFEOffsetElement, SVGNames::dyAttr, Dy, dy) |
| 36 | 36 |
| 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEOffsetElement) | 37 BEGIN_REGISTER_ANIMATED_PROPERTIES(SVGFEOffsetElement) |
| 38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) | 38 REGISTER_LOCAL_ANIMATED_PROPERTY(in1) |
| 39 REGISTER_LOCAL_ANIMATED_PROPERTY(dx) | 39 REGISTER_LOCAL_ANIMATED_PROPERTY(dx) |
| 40 REGISTER_LOCAL_ANIMATED_PROPERTY(dy) | 40 REGISTER_LOCAL_ANIMATED_PROPERTY(dy) |
| 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) | 41 REGISTER_PARENT_ANIMATED_PROPERTIES(SVGFilterPrimitiveStandardAttributes) |
| 42 END_REGISTER_ANIMATED_PROPERTIES | 42 END_REGISTER_ANIMATED_PROPERTIES |
| 43 | 43 |
| 44 inline SVGFEOffsetElement::SVGFEOffsetElement(const QualifiedName& tagName, Docu
ment& document) | 44 inline SVGFEOffsetElement::SVGFEOffsetElement(Document& document) |
| 45 : SVGFilterPrimitiveStandardAttributes(tagName, document) | 45 : SVGFilterPrimitiveStandardAttributes(SVGNames::feOffsetTag, document) |
| 46 { | 46 { |
| 47 ASSERT(hasTagName(SVGNames::feOffsetTag)); | |
| 48 ScriptWrappable::init(this); | 47 ScriptWrappable::init(this); |
| 49 registerAnimatedPropertiesForSVGFEOffsetElement(); | 48 registerAnimatedPropertiesForSVGFEOffsetElement(); |
| 50 } | 49 } |
| 51 | 50 |
| 52 PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(const QualifiedName& t
agName, Document& document) | 51 PassRefPtr<SVGFEOffsetElement> SVGFEOffsetElement::create(Document& document) |
| 53 { | 52 { |
| 54 return adoptRef(new SVGFEOffsetElement(tagName, document)); | 53 return adoptRef(new SVGFEOffsetElement(document)); |
| 55 } | 54 } |
| 56 | 55 |
| 57 bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName) | 56 bool SVGFEOffsetElement::isSupportedAttribute(const QualifiedName& attrName) |
| 58 { | 57 { |
| 59 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); | 58 DEFINE_STATIC_LOCAL(HashSet<QualifiedName>, supportedAttributes, ()); |
| 60 if (supportedAttributes.isEmpty()) { | 59 if (supportedAttributes.isEmpty()) { |
| 61 supportedAttributes.add(SVGNames::inAttr); | 60 supportedAttributes.add(SVGNames::inAttr); |
| 62 supportedAttributes.add(SVGNames::dxAttr); | 61 supportedAttributes.add(SVGNames::dxAttr); |
| 63 supportedAttributes.add(SVGNames::dyAttr); | 62 supportedAttributes.add(SVGNames::dyAttr); |
| 64 } | 63 } |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 | 112 |
| 114 if (!input1) | 113 if (!input1) |
| 115 return 0; | 114 return 0; |
| 116 | 115 |
| 117 RefPtr<FilterEffect> effect = FEOffset::create(filter, dxCurrentValue(), dyC
urrentValue()); | 116 RefPtr<FilterEffect> effect = FEOffset::create(filter, dxCurrentValue(), dyC
urrentValue()); |
| 118 effect->inputEffects().append(input1); | 117 effect->inputEffects().append(input1); |
| 119 return effect.release(); | 118 return effect.release(); |
| 120 } | 119 } |
| 121 | 120 |
| 122 } | 121 } |
| OLD | NEW |