OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org> |
4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> | 4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com> |
5 * | 5 * |
6 * This library is free software; you can redistribute it and/or | 6 * This library is free software; you can redistribute it and/or |
7 * modify it under the terms of the GNU Library General Public | 7 * modify it under the terms of the GNU Library General Public |
8 * License as published by the Free Software Foundation; either | 8 * License as published by the Free Software Foundation; either |
9 * version 2 of the License, or (at your option) any later version. | 9 * version 2 of the License, or (at your option) any later version. |
10 * | 10 * |
11 * This library is distributed in the hope that it will be useful, | 11 * This library is distributed in the hope that it will be useful, |
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
14 * Library General Public License for more details. | 14 * Library General Public License for more details. |
15 * | 15 * |
16 * You should have received a copy of the GNU Library General Public License | 16 * You should have received a copy of the GNU Library General Public License |
17 * along with this library; see the file COPYING.LIB. If not, write to | 17 * along with this library; see the file COPYING.LIB. If not, write to |
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
19 * Boston, MA 02110-1301, USA. | 19 * Boston, MA 02110-1301, USA. |
20 */ | 20 */ |
21 | 21 |
22 #ifndef SVGFELightElement_h | 22 #ifndef SVGFELightElement_h |
23 #define SVGFELightElement_h | 23 #define SVGFELightElement_h |
24 | 24 |
25 #include "core/SVGNames.h" | 25 #include "core/SVGNames.h" |
26 #include "core/svg/SVGAnimatedNumber.h" | 26 #include "core/svg/SVGAnimatedNumber.h" |
27 #include "core/svg/SVGElement.h" | 27 #include "core/svg/SVGElement.h" |
28 #include "platform/graphics/filters/LightSource.h" | 28 #include "platform/graphics/filters/LightSource.h" |
| 29 #include "platform/heap/Handle.h" |
29 | 30 |
30 namespace blink { | 31 namespace blink { |
31 | 32 |
32 class Filter; | 33 class Filter; |
33 | 34 |
34 class SVGFELightElement : public SVGElement { | 35 class SVGFELightElement : public SVGElement { |
35 public: | 36 public: |
36 virtual PassRefPtr<LightSource> lightSource(Filter*) const = 0; | 37 virtual PassRefPtr<LightSource> lightSource(Filter*) const = 0; |
37 static SVGFELightElement* findLightElement(const SVGElement&); | 38 static SVGFELightElement* findLightElement(const SVGElement&); |
38 | 39 |
(...skipping 14 matching lines...) Expand all Loading... |
53 const SVGAnimatedNumber* pointsAtX() const { return m_pointsAtX.get(); } | 54 const SVGAnimatedNumber* pointsAtX() const { return m_pointsAtX.get(); } |
54 SVGAnimatedNumber* pointsAtY() { return m_pointsAtY.get(); } | 55 SVGAnimatedNumber* pointsAtY() { return m_pointsAtY.get(); } |
55 const SVGAnimatedNumber* pointsAtY() const { return m_pointsAtY.get(); } | 56 const SVGAnimatedNumber* pointsAtY() const { return m_pointsAtY.get(); } |
56 SVGAnimatedNumber* pointsAtZ() { return m_pointsAtZ.get(); } | 57 SVGAnimatedNumber* pointsAtZ() { return m_pointsAtZ.get(); } |
57 const SVGAnimatedNumber* pointsAtZ() const { return m_pointsAtZ.get(); } | 58 const SVGAnimatedNumber* pointsAtZ() const { return m_pointsAtZ.get(); } |
58 SVGAnimatedNumber* specularExponent() { return m_specularExponent.get(); } | 59 SVGAnimatedNumber* specularExponent() { return m_specularExponent.get(); } |
59 const SVGAnimatedNumber* specularExponent() const { return m_specularExponen
t.get(); } | 60 const SVGAnimatedNumber* specularExponent() const { return m_specularExponen
t.get(); } |
60 SVGAnimatedNumber* limitingConeAngle() { return m_limitingConeAngle.get(); } | 61 SVGAnimatedNumber* limitingConeAngle() { return m_limitingConeAngle.get(); } |
61 const SVGAnimatedNumber* limitingConeAngle() const { return m_limitingConeAn
gle.get(); } | 62 const SVGAnimatedNumber* limitingConeAngle() const { return m_limitingConeAn
gle.get(); } |
62 | 63 |
| 64 virtual void trace(Visitor*) override; |
| 65 |
63 protected: | 66 protected: |
64 SVGFELightElement(const QualifiedName&, Document&); | 67 SVGFELightElement(const QualifiedName&, Document&); |
65 | 68 |
66 private: | 69 private: |
67 bool isSupportedAttribute(const QualifiedName&); | 70 bool isSupportedAttribute(const QualifiedName&); |
68 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide final; | 71 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide final; |
69 virtual void svgAttributeChanged(const QualifiedName&) override final; | 72 virtual void svgAttributeChanged(const QualifiedName&) override final; |
70 virtual void childrenChanged(const ChildrenChange&) override final; | 73 virtual void childrenChanged(const ChildrenChange&) override final; |
71 | 74 |
72 virtual bool rendererIsNeeded(const RenderStyle&) override { return false; } | 75 virtual bool rendererIsNeeded(const RenderStyle&) override { return false; } |
73 | 76 |
74 RefPtr<SVGAnimatedNumber> m_azimuth; | 77 RefPtrWillBeMember<SVGAnimatedNumber> m_azimuth; |
75 RefPtr<SVGAnimatedNumber> m_elevation; | 78 RefPtrWillBeMember<SVGAnimatedNumber> m_elevation; |
76 RefPtr<SVGAnimatedNumber> m_x; | 79 RefPtrWillBeMember<SVGAnimatedNumber> m_x; |
77 RefPtr<SVGAnimatedNumber> m_y; | 80 RefPtrWillBeMember<SVGAnimatedNumber> m_y; |
78 RefPtr<SVGAnimatedNumber> m_z; | 81 RefPtrWillBeMember<SVGAnimatedNumber> m_z; |
79 RefPtr<SVGAnimatedNumber> m_pointsAtX; | 82 RefPtrWillBeMember<SVGAnimatedNumber> m_pointsAtX; |
80 RefPtr<SVGAnimatedNumber> m_pointsAtY; | 83 RefPtrWillBeMember<SVGAnimatedNumber> m_pointsAtY; |
81 RefPtr<SVGAnimatedNumber> m_pointsAtZ; | 84 RefPtrWillBeMember<SVGAnimatedNumber> m_pointsAtZ; |
82 RefPtr<SVGAnimatedNumber> m_specularExponent; | 85 RefPtrWillBeMember<SVGAnimatedNumber> m_specularExponent; |
83 RefPtr<SVGAnimatedNumber> m_limitingConeAngle; | 86 RefPtrWillBeMember<SVGAnimatedNumber> m_limitingConeAngle; |
84 }; | 87 }; |
85 | 88 |
86 inline bool isSVGFELightElement(const SVGElement& element) | 89 inline bool isSVGFELightElement(const SVGElement& element) |
87 { | 90 { |
88 return element.hasTagName(SVGNames::feDistantLightTag) || element.hasTagName
(SVGNames::fePointLightTag) || element.hasTagName(SVGNames::feSpotLightTag); | 91 return element.hasTagName(SVGNames::feDistantLightTag) || element.hasTagName
(SVGNames::fePointLightTag) || element.hasTagName(SVGNames::feSpotLightTag); |
89 } | 92 } |
90 | 93 |
91 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGFELightElement); | 94 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGFELightElement); |
92 | 95 |
93 } // namespace blink | 96 } // namespace blink |
94 | 97 |
95 #endif | 98 #endif |
OLD | NEW |