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, 2008 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005, 2006, 2008 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, |
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
14 * | 14 * |
15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
19 */ | 19 */ |
20 | 20 |
21 #ifndef SVGPathSeg_h | 21 #ifndef SVGPathSeg_h |
22 #define SVGPathSeg_h | 22 #define SVGPathSeg_h |
23 | 23 |
24 #include "bindings/core/v8/ScriptWrappable.h" | 24 #include "bindings/core/v8/ScriptWrappable.h" |
| 25 #include "platform/heap/Handle.h" |
25 #include "wtf/RefCounted.h" | 26 #include "wtf/RefCounted.h" |
26 #include "wtf/text/WTFString.h" | 27 #include "wtf/text/WTFString.h" |
27 | 28 |
28 namespace blink { | 29 namespace blink { |
29 | 30 |
30 enum ListModification { | 31 enum ListModification { |
31 ListModificationUnknown = 0, | 32 ListModificationUnknown = 0, |
32 ListModificationInsert = 1, | 33 ListModificationInsert = 1, |
33 ListModificationReplace = 2, | 34 ListModificationReplace = 2, |
34 ListModificationRemove = 3, | 35 ListModificationRemove = 3, |
(...skipping 20 matching lines...) Expand all Loading... |
55 PathSegCurveToCubicSmoothAbs = 16, | 56 PathSegCurveToCubicSmoothAbs = 16, |
56 PathSegCurveToCubicSmoothRel = 17, | 57 PathSegCurveToCubicSmoothRel = 17, |
57 PathSegCurveToQuadraticSmoothAbs = 18, | 58 PathSegCurveToQuadraticSmoothAbs = 18, |
58 PathSegCurveToQuadraticSmoothRel = 19 | 59 PathSegCurveToQuadraticSmoothRel = 19 |
59 }; | 60 }; |
60 | 61 |
61 class SVGPropertyBase; | 62 class SVGPropertyBase; |
62 class SVGPathElement; | 63 class SVGPathElement; |
63 class SVGElement; | 64 class SVGElement; |
64 | 65 |
65 class SVGPathSeg : public RefCounted<SVGPathSeg>, public ScriptWrappable { | 66 class SVGPathSeg : public RefCountedWillBeGarbageCollectedFinalized<SVGPathSeg>,
public ScriptWrappable { |
66 DEFINE_WRAPPERTYPEINFO(); | 67 DEFINE_WRAPPERTYPEINFO(); |
67 public: | 68 public: |
68 // SVGPathSeg itself is used as a tear-off type. | 69 // SVGPathSeg itself is used as a tear-off type. |
69 // FIXME: A tear-off type should be introduced to distinguish animVal/baseVa
l | 70 // FIXME: A tear-off type should be introduced to distinguish animVal/baseVa
l |
70 typedef SVGPathSeg TearOffType; | 71 typedef SVGPathSeg TearOffType; |
71 | 72 |
72 explicit SVGPathSeg(SVGPathElement* contextElement); | 73 explicit SVGPathSeg(SVGPathElement* contextElement); |
73 | 74 |
74 virtual ~SVGPathSeg() { } | 75 virtual ~SVGPathSeg() { } |
75 | 76 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 ASSERT((!ownerList && m_ownerList) || (ownerList && !m_ownerList)); | 112 ASSERT((!ownerList && m_ownerList) || (ownerList && !m_ownerList)); |
112 | 113 |
113 m_ownerList = ownerList; | 114 m_ownerList = ownerList; |
114 } | 115 } |
115 | 116 |
116 void setContextElement(SVGElement* contextElement) | 117 void setContextElement(SVGElement* contextElement) |
117 { | 118 { |
118 m_contextElement = contextElement; | 119 m_contextElement = contextElement; |
119 } | 120 } |
120 | 121 |
121 static PassRefPtr<SVGPathSeg> create() { ASSERT_NOT_REACHED(); return nullpt
r; } | 122 static PassRefPtrWillBeRawPtr<SVGPathSeg> create() { ASSERT_NOT_REACHED(); r
eturn nullptr; } |
122 PassRefPtr<SVGPathSeg> clone() { ASSERT_NOT_REACHED(); return nullptr; } | 123 PassRefPtrWillBeRawPtr<SVGPathSeg> clone() { ASSERT_NOT_REACHED(); return nu
llptr; } |
| 124 |
| 125 virtual void trace(Visitor*); |
123 | 126 |
124 protected: | 127 protected: |
125 void commitChange(); | 128 void commitChange(); |
126 | 129 |
127 private: | 130 private: |
128 // FIXME: oilpan: These are kept as raw ptrs to break reference cycle. Shoul
d be Member in oilpan. | 131 RawPtrWillBeMember<SVGPropertyBase> m_ownerList; |
129 SVGPropertyBase* m_ownerList; | 132 RawPtrWillBeMember<SVGElement> m_contextElement; |
130 SVGElement* m_contextElement; | |
131 }; | 133 }; |
132 | 134 |
133 } // namespace blink | 135 } // namespace blink |
134 | 136 |
135 #endif // SVGPathSeg_h | 137 #endif // SVGPathSeg_h |
OLD | NEW |