OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.org> | 2 * Copyright (C) 2005 Alexander Kellett <lypanov@kde.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 SVGMaskElement_h | 20 #ifndef SVGMaskElement_h |
21 #define SVGMaskElement_h | 21 #define SVGMaskElement_h |
22 | 22 |
23 #include "core/SVGNames.h" | 23 #include "core/SVGNames.h" |
24 #include "core/svg/SVGAnimatedBoolean.h" | 24 #include "core/svg/SVGAnimatedBoolean.h" |
25 #include "core/svg/SVGAnimatedEnumeration.h" | 25 #include "core/svg/SVGAnimatedEnumeration.h" |
26 #include "core/svg/SVGAnimatedLength.h" | 26 #include "core/svg/SVGAnimatedLength.h" |
27 #include "core/svg/SVGElement.h" | 27 #include "core/svg/SVGElement.h" |
28 #include "core/svg/SVGTests.h" | 28 #include "core/svg/SVGTests.h" |
29 #include "core/svg/SVGUnitTypes.h" | 29 #include "core/svg/SVGUnitTypes.h" |
| 30 #include "platform/heap/Handle.h" |
30 | 31 |
31 namespace blink { | 32 namespace blink { |
32 | 33 |
33 class SVGMaskElement final : public SVGElement, | 34 class SVGMaskElement final : public SVGElement, |
34 public SVGTests { | 35 public SVGTests { |
35 DEFINE_WRAPPERTYPEINFO(); | 36 DEFINE_WRAPPERTYPEINFO(); |
| 37 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGMaskElement); |
36 public: | 38 public: |
37 DECLARE_NODE_FACTORY(SVGMaskElement); | 39 DECLARE_NODE_FACTORY(SVGMaskElement); |
38 | 40 |
39 SVGAnimatedLength* x() const { return m_x.get(); } | 41 SVGAnimatedLength* x() const { return m_x.get(); } |
40 SVGAnimatedLength* y() const { return m_y.get(); } | 42 SVGAnimatedLength* y() const { return m_y.get(); } |
41 SVGAnimatedLength* width() const { return m_width.get(); } | 43 SVGAnimatedLength* width() const { return m_width.get(); } |
42 SVGAnimatedLength* height() const { return m_height.get(); } | 44 SVGAnimatedLength* height() const { return m_height.get(); } |
43 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* maskUnits() { return m_ma
skUnits.get(); } | 45 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* maskUnits() { return m_ma
skUnits.get(); } |
44 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* maskContentUnits() { retu
rn m_maskContentUnits.get(); } | 46 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* maskContentUnits() { retu
rn m_maskContentUnits.get(); } |
45 | 47 |
| 48 virtual void trace(Visitor*) override; |
| 49 |
46 private: | 50 private: |
47 explicit SVGMaskElement(Document&); | 51 explicit SVGMaskElement(Document&); |
48 | 52 |
49 virtual bool isValid() const override { return SVGTests::isValid(document())
; } | 53 virtual bool isValid() const override { return SVGTests::isValid(document())
; } |
50 virtual bool needsPendingResourceHandling() const override { return false; } | 54 virtual bool needsPendingResourceHandling() const override { return false; } |
51 | 55 |
52 bool isSupportedAttribute(const QualifiedName&); | 56 bool isSupportedAttribute(const QualifiedName&); |
53 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 57 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
54 virtual void svgAttributeChanged(const QualifiedName&) override; | 58 virtual void svgAttributeChanged(const QualifiedName&) override; |
55 virtual void childrenChanged(const ChildrenChange&) override; | 59 virtual void childrenChanged(const ChildrenChange&) override; |
56 | 60 |
57 virtual RenderObject* createRenderer(RenderStyle*) override; | 61 virtual RenderObject* createRenderer(RenderStyle*) override; |
58 | 62 |
59 virtual bool selfHasRelativeLengths() const override; | 63 virtual bool selfHasRelativeLengths() const override; |
60 | 64 |
61 RefPtr<SVGAnimatedLength> m_x; | 65 RefPtrWillBeMember<SVGAnimatedLength> m_x; |
62 RefPtr<SVGAnimatedLength> m_y; | 66 RefPtrWillBeMember<SVGAnimatedLength> m_y; |
63 RefPtr<SVGAnimatedLength> m_width; | 67 RefPtrWillBeMember<SVGAnimatedLength> m_width; |
64 RefPtr<SVGAnimatedLength> m_height; | 68 RefPtrWillBeMember<SVGAnimatedLength> m_height; |
65 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_maskUnits; | 69 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_mas
kUnits; |
66 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_maskContentUnit
s; | 70 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_mas
kContentUnits; |
67 }; | 71 }; |
68 | 72 |
69 } // namespace blink | 73 } // namespace blink |
70 | 74 |
71 #endif // SVGMaskElement_h | 75 #endif // SVGMaskElement_h |
OLD | NEW |