OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com> | 2 * Copyright (C) 2006 Oliver Hunt <oliver@nerget.com> |
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 SVGFEDisplacementMapElement_h | 20 #ifndef SVGFEDisplacementMapElement_h |
21 #define SVGFEDisplacementMapElement_h | 21 #define SVGFEDisplacementMapElement_h |
22 | 22 |
23 #include "core/svg/SVGAnimatedEnumeration.h" | 23 #include "core/svg/SVGAnimatedEnumeration.h" |
24 #include "core/svg/SVGAnimatedNumber.h" | 24 #include "core/svg/SVGAnimatedNumber.h" |
25 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" | 25 #include "core/svg/SVGFilterPrimitiveStandardAttributes.h" |
26 #include "platform/graphics/filters/FEDisplacementMap.h" | 26 #include "platform/graphics/filters/FEDisplacementMap.h" |
| 27 #include "platform/heap/Handle.h" |
27 | 28 |
28 namespace blink { | 29 namespace blink { |
29 | 30 |
30 template<> const SVGEnumerationStringEntries& getStaticStringEntries<ChannelSele
ctorType>(); | 31 template<> const SVGEnumerationStringEntries& getStaticStringEntries<ChannelSele
ctorType>(); |
31 | 32 |
32 class SVGFEDisplacementMapElement final : public SVGFilterPrimitiveStandardAttri
butes { | 33 class SVGFEDisplacementMapElement final : public SVGFilterPrimitiveStandardAttri
butes { |
33 DEFINE_WRAPPERTYPEINFO(); | 34 DEFINE_WRAPPERTYPEINFO(); |
34 public: | 35 public: |
35 DECLARE_NODE_FACTORY(SVGFEDisplacementMapElement); | 36 DECLARE_NODE_FACTORY(SVGFEDisplacementMapElement); |
36 | 37 |
37 static ChannelSelectorType stringToChannel(const String&); | 38 static ChannelSelectorType stringToChannel(const String&); |
38 | 39 |
39 SVGAnimatedNumber* scale() { return m_scale.get(); } | 40 SVGAnimatedNumber* scale() { return m_scale.get(); } |
40 SVGAnimatedString* in1() { return m_in1.get(); } | 41 SVGAnimatedString* in1() { return m_in1.get(); } |
41 SVGAnimatedString* in2() { return m_in2.get(); } | 42 SVGAnimatedString* in2() { return m_in2.get(); } |
42 SVGAnimatedEnumeration<ChannelSelectorType>* xChannelSelector() { return m_x
ChannelSelector.get(); } | 43 SVGAnimatedEnumeration<ChannelSelectorType>* xChannelSelector() { return m_x
ChannelSelector.get(); } |
43 SVGAnimatedEnumeration<ChannelSelectorType>* yChannelSelector() { return m_y
ChannelSelector.get(); } | 44 SVGAnimatedEnumeration<ChannelSelectorType>* yChannelSelector() { return m_y
ChannelSelector.get(); } |
44 | 45 |
| 46 virtual void trace(Visitor*) override; |
| 47 |
45 private: | 48 private: |
46 SVGFEDisplacementMapElement(Document&); | 49 explicit SVGFEDisplacementMapElement(Document&); |
47 | 50 |
48 bool isSupportedAttribute(const QualifiedName&); | 51 bool isSupportedAttribute(const QualifiedName&); |
49 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 52 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
50 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& at
trName) override; | 53 virtual bool setFilterEffectAttribute(FilterEffect*, const QualifiedName& at
trName) override; |
51 virtual void svgAttributeChanged(const QualifiedName&) override; | 54 virtual void svgAttributeChanged(const QualifiedName&) override; |
52 virtual PassRefPtr<FilterEffect> build(SVGFilterBuilder*, Filter*) override; | 55 virtual PassRefPtrWillBeRawPtr<FilterEffect> build(SVGFilterBuilder*, Filter
*) override; |
53 | 56 |
54 RefPtr<SVGAnimatedNumber> m_scale; | 57 RefPtrWillBeMember<SVGAnimatedNumber> m_scale; |
55 RefPtr<SVGAnimatedString> m_in1; | 58 RefPtrWillBeMember<SVGAnimatedString> m_in1; |
56 RefPtr<SVGAnimatedString> m_in2; | 59 RefPtrWillBeMember<SVGAnimatedString> m_in2; |
57 RefPtr<SVGAnimatedEnumeration<ChannelSelectorType> > m_xChannelSelector; | 60 RefPtrWillBeMember<SVGAnimatedEnumeration<ChannelSelectorType> > m_xChannelS
elector; |
58 RefPtr<SVGAnimatedEnumeration<ChannelSelectorType> > m_yChannelSelector; | 61 RefPtrWillBeMember<SVGAnimatedEnumeration<ChannelSelectorType> > m_yChannelS
elector; |
59 }; | 62 }; |
60 | 63 |
61 } // namespace blink | 64 } // namespace blink |
62 | 65 |
63 #endif // SVGFEDisplacementMapElement_h | 66 #endif // SVGFEDisplacementMapElement_h |
OLD | NEW |