Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / Source / core / svg / SVGFELightElement.h
blob6fab28e700a041becd91c902bbf4b20005b3dbfb
1 /*
2 * Copyright (C) 2004, 2005 Nikolas Zimmermann <zimmermann@kde.org>
3 * Copyright (C) 2004, 2005, 2006 Rob Buis <buis@kde.org>
4 * Copyright (C) 2005 Oliver Hunt <oliver@nerget.com>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
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
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
22 #ifndef SVGFELightElement_h
23 #define SVGFELightElement_h
25 #include "core/SVGNames.h"
26 #include "core/svg/SVGAnimatedNumber.h"
27 #include "core/svg/SVGElement.h"
28 #include "platform/graphics/filters/LightSource.h"
29 #include "platform/heap/Handle.h"
31 namespace blink {
33 class Filter;
35 class SVGFELightElement : public SVGElement {
36 public:
37 virtual PassRefPtr<LightSource> lightSource(Filter*) const = 0;
38 static SVGFELightElement* findLightElement(const SVGElement&);
40 FloatPoint3D position() const;
41 FloatPoint3D pointsAt() const;
43 SVGAnimatedNumber* azimuth() { return m_azimuth.get(); }
44 const SVGAnimatedNumber* azimuth() const { return m_azimuth.get(); }
45 SVGAnimatedNumber* elevation() { return m_elevation.get(); }
46 const SVGAnimatedNumber* elevation() const { return m_elevation.get(); }
47 SVGAnimatedNumber* x() { return m_x.get(); }
48 const SVGAnimatedNumber* x() const { return m_x.get(); }
49 SVGAnimatedNumber* y() { return m_y.get(); }
50 const SVGAnimatedNumber* y() const { return m_y.get(); }
51 SVGAnimatedNumber* z() { return m_z.get(); }
52 const SVGAnimatedNumber* z() const { return m_z.get(); }
53 SVGAnimatedNumber* pointsAtX() { return m_pointsAtX.get(); }
54 const SVGAnimatedNumber* pointsAtX() const { return m_pointsAtX.get(); }
55 SVGAnimatedNumber* pointsAtY() { return m_pointsAtY.get(); }
56 const SVGAnimatedNumber* pointsAtY() const { return m_pointsAtY.get(); }
57 SVGAnimatedNumber* pointsAtZ() { return m_pointsAtZ.get(); }
58 const SVGAnimatedNumber* pointsAtZ() const { return m_pointsAtZ.get(); }
59 SVGAnimatedNumber* specularExponent() { return m_specularExponent.get(); }
60 const SVGAnimatedNumber* specularExponent() const { return m_specularExponent.get(); }
61 SVGAnimatedNumber* limitingConeAngle() { return m_limitingConeAngle.get(); }
62 const SVGAnimatedNumber* limitingConeAngle() const { return m_limitingConeAngle.get(); }
64 DECLARE_VIRTUAL_TRACE();
66 protected:
67 SVGFELightElement(const QualifiedName&, Document&);
69 private:
70 void svgAttributeChanged(const QualifiedName&) final;
71 void childrenChanged(const ChildrenChange&) final;
73 bool layoutObjectIsNeeded(const ComputedStyle&) override { return false; }
75 RefPtrWillBeMember<SVGAnimatedNumber> m_azimuth;
76 RefPtrWillBeMember<SVGAnimatedNumber> m_elevation;
77 RefPtrWillBeMember<SVGAnimatedNumber> m_x;
78 RefPtrWillBeMember<SVGAnimatedNumber> m_y;
79 RefPtrWillBeMember<SVGAnimatedNumber> m_z;
80 RefPtrWillBeMember<SVGAnimatedNumber> m_pointsAtX;
81 RefPtrWillBeMember<SVGAnimatedNumber> m_pointsAtY;
82 RefPtrWillBeMember<SVGAnimatedNumber> m_pointsAtZ;
83 RefPtrWillBeMember<SVGAnimatedNumber> m_specularExponent;
84 RefPtrWillBeMember<SVGAnimatedNumber> m_limitingConeAngle;
87 inline bool isSVGFELightElement(const SVGElement& element)
89 return element.hasTagName(SVGNames::feDistantLightTag) || element.hasTagName(SVGNames::fePointLightTag) || element.hasTagName(SVGNames::feSpotLightTag);
92 DEFINE_SVGELEMENT_TYPE_CASTS_WITH_FUNCTION(SVGFELightElement);
94 } // namespace blink
96 #endif