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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 */ | 18 */ |
19 | 19 |
20 #ifndef SVGFEMorphologyElement_h | 20 #ifndef SVGFEMorphologyElement_h |
21 #define SVGFEMorphologyElement_h | 21 #define SVGFEMorphologyElement_h |
22 | 22 |
23 #include "core/svg/SVGAnimatedEnumeration.h" | 23 #include "core/svg/SVGAnimatedEnumeration.h" |
24 #include "core/svg/SVGAnimatedNumberOptionalNumber.h" | 24 #include "core/svg/SVGAnimatedNumberOptionalNumber.h" |
25 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" | 25 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" |
26 #include "platform/graphics/filters/FEMorphology.h" | 26 #include "platform/graphics/filters/FEMorphology.h" |
| 27 #include "platform/heap/Handle.h" |
27 | 28 |
28 namespace blink { | 29 namespace blink { |
29 | 30 |
30 template<> const SVGEnumerationStringEntries& getStaticStringEntries<MorphologyO
peratorType>(); | 31 template<> const SVGEnumerationStringEntries& getStaticStringEntries<MorphologyO
peratorType>(); |
31 | 32 |
32 class SVGFEMorphologyElement final : public SVGFilterPrimitiveStandardAttributes
{ | 33 class SVGFEMorphologyElement final : public SVGFilterPrimitiveStandardAttributes
{ |
33 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
34 public: | 35 public: |
35 DECLARE_NODE_FACTORY(SVGFEMorphologyElement); | 36 DECLARE_NODE_FACTORY(SVGFEMorphologyElement); |
36 | 37 |
37 SVGAnimatedNumber* radiusX() { return m_radius->firstNumber(); } | 38 SVGAnimatedNumber* radiusX() { return m_radius->firstNumber(); } |
38 SVGAnimatedNumber* radiusY() { return m_radius->secondNumber(); } | 39 SVGAnimatedNumber* radiusY() { return m_radius->secondNumber(); } |
39 SVGAnimatedString* in1() { return m_in1.get(); } | 40 SVGAnimatedString* in1() { return m_in1.get(); } |
40 SVGAnimatedEnumeration<MorphologyOperatorType>* svgOperator() { return m_svg
Operator.get(); } | 41 SVGAnimatedEnumeration<MorphologyOperatorType>* svgOperator() { return m_svg
Operator.get(); } |
41 | 42 |
| 43 virtual void trace(Visitor*) override; |
| 44 |
42 private: | 45 private: |
43 explicit SVGFEMorphologyElement(Document&); | 46 explicit SVGFEMorphologyElement(Document&); |
44 | 47 |
45 bool isSupportedAttribute(const QualifiedName&); | 48 bool isSupportedAttribute(const QualifiedName&); |
46 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
47 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) o
verride; | 50 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName&) o
verride; |
48 virtual void svgAttributeChanged(const QualifiedName&) override; | 51 virtual void svgAttributeChanged(const QualifiedName&) override; |
49 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) override; | 52 virtual PassRefPtrWillBeRawPtr<FilterEffect> build(SVGFilterBuilder*, Filter
*) override; |
50 | 53 |
51 RefPtr<SVGAnimatedNumberOptionalNumber> m_radius; | 54 RefPtrWillBeMember<SVGAnimatedNumberOptionalNumber> m_radius; |
52 RefPtr<SVGAnimatedString> m_in1; | 55 RefPtrWillBeMember<SVGAnimatedString> m_in1; |
53 RefPtr<SVGAnimatedEnumeration<MorphologyOperatorType> > m_svgOperator; | 56 RefPtrWillBeMember<SVGAnimatedEnumeration<MorphologyOperatorType> > m_svgOpe
rator; |
54 }; | 57 }; |
55 | 58 |
56 } // namespace blink | 59 } // namespace blink |
57 | 60 |
58 #endif // SVGFEMorphologyElement_h | 61 #endif // SVGFEMorphologyElement_h |
OLD | NEW |