OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2007 Rob Buis <buis@kde.org> |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 13 matching lines...) Expand all Loading... |
24 #include "core/SVGNames.h" | 24 #include "core/SVGNames.h" |
25 #include "core/svg/SVGAnimatedBoolean.h" | 25 #include "core/svg/SVGAnimatedBoolean.h" |
26 #include "core/svg/SVGAnimatedEnumeration.h" | 26 #include "core/svg/SVGAnimatedEnumeration.h" |
27 #include "core/svg/SVGAnimatedLength.h" | 27 #include "core/svg/SVGAnimatedLength.h" |
28 #include "core/svg/SVGAnimatedTransformList.h" | 28 #include "core/svg/SVGAnimatedTransformList.h" |
29 #include "core/svg/SVGElement.h" | 29 #include "core/svg/SVGElement.h" |
30 #include "core/svg/SVGFitToViewBox.h" | 30 #include "core/svg/SVGFitToViewBox.h" |
31 #include "core/svg/SVGTests.h" | 31 #include "core/svg/SVGTests.h" |
32 #include "core/svg/SVGURIReference.h" | 32 #include "core/svg/SVGURIReference.h" |
33 #include "core/svg/SVGUnitTypes.h" | 33 #include "core/svg/SVGUnitTypes.h" |
| 34 #include "platform/heap/Handle.h" |
34 | 35 |
35 namespace blink { | 36 namespace blink { |
36 | 37 |
37 struct PatternAttributes; | 38 struct PatternAttributes; |
38 | 39 |
39 class SVGPatternElement final : public SVGElement, | 40 class SVGPatternElement final : public SVGElement, |
40 public SVGURIReference, | 41 public SVGURIReference, |
41 public SVGTests, | 42 public SVGTests, |
42 public SVGFitToViewBox { | 43 public SVGFitToViewBox { |
43 DEFINE_WRAPPERTYPEINFO(); | 44 DEFINE_WRAPPERTYPEINFO(); |
| 45 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(SVGPatternElement); |
44 public: | 46 public: |
45 DECLARE_NODE_FACTORY(SVGPatternElement); | 47 DECLARE_NODE_FACTORY(SVGPatternElement); |
46 | 48 |
47 void collectPatternAttributes(PatternAttributes&) const; | 49 void collectPatternAttributes(PatternAttributes&) const; |
48 | 50 |
49 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const override; | 51 virtual AffineTransform localCoordinateSpaceTransform(SVGElement::CTMScope)
const override; |
50 | 52 |
51 SVGAnimatedLength* x() const { return m_x.get(); } | 53 SVGAnimatedLength* x() const { return m_x.get(); } |
52 SVGAnimatedLength* y() const { return m_y.get(); } | 54 SVGAnimatedLength* y() const { return m_y.get(); } |
53 SVGAnimatedLength* width() const { return m_width.get(); } | 55 SVGAnimatedLength* width() const { return m_width.get(); } |
54 SVGAnimatedLength* height() const { return m_height.get(); } | 56 SVGAnimatedLength* height() const { return m_height.get(); } |
55 SVGAnimatedTransformList* patternTransform() { return m_patternTransform.get
(); } | 57 SVGAnimatedTransformList* patternTransform() { return m_patternTransform.get
(); } |
56 const SVGAnimatedTransformList* patternTransform() const { return m_patternT
ransform.get(); } | 58 const SVGAnimatedTransformList* patternTransform() const { return m_patternT
ransform.get(); } |
57 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternUnits() { return m
_patternUnits.get(); } | 59 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternUnits() { return m
_patternUnits.get(); } |
58 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternContentUnits() { r
eturn m_patternContentUnits.get(); } | 60 SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternContentUnits() { r
eturn m_patternContentUnits.get(); } |
59 const SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternUnits() cons
t { return m_patternUnits.get(); } | 61 const SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternUnits() cons
t { return m_patternUnits.get(); } |
60 const SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternContentUnits
() const { return m_patternContentUnits.get(); } | 62 const SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType>* patternContentUnits
() const { return m_patternContentUnits.get(); } |
61 | 63 |
| 64 virtual void trace(Visitor*) override; |
| 65 |
62 private: | 66 private: |
63 explicit SVGPatternElement(Document&); | 67 explicit SVGPatternElement(Document&); |
64 | 68 |
65 virtual bool isValid() const override { return SVGTests::isValid(); } | 69 virtual bool isValid() const override { return SVGTests::isValid(); } |
66 virtual bool needsPendingResourceHandling() const override { return false; } | 70 virtual bool needsPendingResourceHandling() const override { return false; } |
67 | 71 |
68 bool isSupportedAttribute(const QualifiedName&); | 72 bool isSupportedAttribute(const QualifiedName&); |
69 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; | 73 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr
ide; |
70 virtual void svgAttributeChanged(const QualifiedName&) override; | 74 virtual void svgAttributeChanged(const QualifiedName&) override; |
71 virtual void childrenChanged(const ChildrenChange&) override; | 75 virtual void childrenChanged(const ChildrenChange&) override; |
72 | 76 |
73 virtual RenderObject* createRenderer(RenderStyle*) override; | 77 virtual RenderObject* createRenderer(RenderStyle*) override; |
74 | 78 |
75 virtual bool selfHasRelativeLengths() const override; | 79 virtual bool selfHasRelativeLengths() const override; |
76 | 80 |
77 RefPtr<SVGAnimatedLength> m_x; | 81 RefPtrWillBeMember<SVGAnimatedLength> m_x; |
78 RefPtr<SVGAnimatedLength> m_y; | 82 RefPtrWillBeMember<SVGAnimatedLength> m_y; |
79 RefPtr<SVGAnimatedLength> m_width; | 83 RefPtrWillBeMember<SVGAnimatedLength> m_width; |
80 RefPtr<SVGAnimatedLength> m_height; | 84 RefPtrWillBeMember<SVGAnimatedLength> m_height; |
81 RefPtr<SVGAnimatedTransformList> m_patternTransform; | 85 RefPtrWillBeMember<SVGAnimatedTransformList> m_patternTransform; |
82 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_patternUnits; | 86 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_pat
ternUnits; |
83 RefPtr<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_patternContentU
nits; | 87 RefPtrWillBeMember<SVGAnimatedEnumeration<SVGUnitTypes::SVGUnitType> > m_pat
ternContentUnits; |
84 }; | 88 }; |
85 | 89 |
86 } // namespace blink | 90 } // namespace blink |
87 | 91 |
88 #endif // SVGPatternElement_h | 92 #endif // SVGPatternElement_h |
OLD | NEW |