OLD | NEW |
1 /* | 1 /* |
2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> | 2 Copyright (C) 2004, 2005, 2007 Nikolas Zimmermann <zimmermann@kde.org> |
3 2004, 2005 Rob Buis <buis@kde.org> | 3 2004, 2005 Rob Buis <buis@kde.org> |
4 Copyright (C) Research In Motion Limited 2010. All rights reserved. | 4 Copyright (C) Research In Motion Limited 2010. All rights reserved. |
5 | 5 |
6 Based on khtml code by: | 6 Based on khtml code by: |
7 Copyright (C) 2000-2003 Lars Knoll (knoll@kde.org) | 7 Copyright (C) 2000-2003 Lars Knoll (knoll@kde.org) |
8 (C) 2000 Antti Koivisto (koivisto@kde.org) | 8 (C) 2000 Antti Koivisto (koivisto@kde.org) |
9 (C) 2000-2003 Dirk Mueller (mueller@kde.org) | 9 (C) 2000-2003 Dirk Mueller (mueller@kde.org) |
10 (C) 2002-2003 Apple Computer, Inc. | 10 (C) 2002-2003 Apple Computer, Inc. |
(...skipping 11 matching lines...) Expand all Loading... |
22 You should have received a copy of the GNU Library General Public License | 22 You should have received a copy of the GNU Library General Public License |
23 along with this library; see the file COPYING.LIB. If not, write to | 23 along with this library; see the file COPYING.LIB. If not, write to |
24 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 24 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
25 Boston, MA 02110-1301, USA. | 25 Boston, MA 02110-1301, USA. |
26 */ | 26 */ |
27 | 27 |
28 #ifndef SVGRenderStyleDefs_h | 28 #ifndef SVGRenderStyleDefs_h |
29 #define SVGRenderStyleDefs_h | 29 #define SVGRenderStyleDefs_h |
30 | 30 |
31 #include "core/svg/SVGLength.h" | 31 #include "core/svg/SVGLength.h" |
| 32 #include "core/svg/SVGLengthList.h" |
32 #include "core/svg/SVGPaint.h" | 33 #include "core/svg/SVGPaint.h" |
33 #include "wtf/OwnPtr.h" | 34 #include "wtf/OwnPtr.h" |
34 #include "wtf/PassOwnPtr.h" | 35 #include "wtf/PassOwnPtr.h" |
35 #include "wtf/RefCounted.h" | 36 #include "wtf/RefCounted.h" |
36 #include "wtf/RefPtr.h" | 37 #include "wtf/RefPtr.h" |
37 | 38 |
38 namespace WebCore { | 39 namespace WebCore { |
39 | 40 |
40 enum EBaselineShift { | 41 enum EBaselineShift { |
41 BS_BASELINE, BS_SUB, BS_SUPER, BS_LENGTH | 42 BS_BASELINE, BS_SUB, BS_SUPER, BS_LENGTH |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 140 |
140 bool operator==(const StyleStrokeData&) const; | 141 bool operator==(const StyleStrokeData&) const; |
141 bool operator!=(const StyleStrokeData& other) const | 142 bool operator!=(const StyleStrokeData& other) const |
142 { | 143 { |
143 return !(*this == other); | 144 return !(*this == other); |
144 } | 145 } |
145 | 146 |
146 float opacity; | 147 float opacity; |
147 float miterLimit; | 148 float miterLimit; |
148 | 149 |
149 SVGLength width; | 150 RefPtr<SVGLength> width; |
150 SVGLength dashOffset; | 151 RefPtr<SVGLength> dashOffset; |
151 Vector<SVGLength> dashArray; | 152 RefPtr<SVGLengthList> dashArray; |
152 | 153 |
153 SVGPaint::SVGPaintType paintType; | 154 SVGPaint::SVGPaintType paintType; |
154 Color paintColor; | 155 Color paintColor; |
155 String paintUri; | 156 String paintUri; |
156 SVGPaint::SVGPaintType visitedLinkPaintType; | 157 SVGPaint::SVGPaintType visitedLinkPaintType; |
157 Color visitedLinkPaintColor; | 158 Color visitedLinkPaintColor; |
158 String visitedLinkPaintUri; | 159 String visitedLinkPaintUri; |
159 | 160 |
160 private: | 161 private: |
161 StyleStrokeData(); | 162 StyleStrokeData(); |
(...skipping 23 matching lines...) Expand all Loading... |
185 public: | 186 public: |
186 static PassRefPtr<StyleTextData> create() { return adoptRef(new StyleTex
tData); } | 187 static PassRefPtr<StyleTextData> create() { return adoptRef(new StyleTex
tData); } |
187 PassRefPtr<StyleTextData> copy() const { return adoptRef(new StyleTextDa
ta(*this)); } | 188 PassRefPtr<StyleTextData> copy() const { return adoptRef(new StyleTextDa
ta(*this)); } |
188 | 189 |
189 bool operator==(const StyleTextData& other) const; | 190 bool operator==(const StyleTextData& other) const; |
190 bool operator!=(const StyleTextData& other) const | 191 bool operator!=(const StyleTextData& other) const |
191 { | 192 { |
192 return !(*this == other); | 193 return !(*this == other); |
193 } | 194 } |
194 | 195 |
195 SVGLength kerning; | 196 RefPtr<SVGLength> kerning; |
196 | 197 |
197 private: | 198 private: |
198 StyleTextData(); | 199 StyleTextData(); |
199 StyleTextData(const StyleTextData&); | 200 StyleTextData(const StyleTextData&); |
200 }; | 201 }; |
201 | 202 |
202 // Note: the rule for this class is, *no inheritance* of these props | 203 // Note: the rule for this class is, *no inheritance* of these props |
203 class StyleMiscData : public RefCounted<StyleMiscData> { | 204 class StyleMiscData : public RefCounted<StyleMiscData> { |
204 public: | 205 public: |
205 static PassRefPtr<StyleMiscData> create() { return adoptRef(new StyleMis
cData); } | 206 static PassRefPtr<StyleMiscData> create() { return adoptRef(new StyleMis
cData); } |
206 PassRefPtr<StyleMiscData> copy() const { return adoptRef(new StyleMiscDa
ta(*this)); } | 207 PassRefPtr<StyleMiscData> copy() const { return adoptRef(new StyleMiscDa
ta(*this)); } |
207 | 208 |
208 bool operator==(const StyleMiscData&) const; | 209 bool operator==(const StyleMiscData&) const; |
209 bool operator!=(const StyleMiscData& other) const | 210 bool operator!=(const StyleMiscData& other) const |
210 { | 211 { |
211 return !(*this == other); | 212 return !(*this == other); |
212 } | 213 } |
213 | 214 |
214 Color floodColor; | 215 Color floodColor; |
215 float floodOpacity; | 216 float floodOpacity; |
216 Color lightingColor; | 217 Color lightingColor; |
217 | 218 |
218 // non-inherited text stuff lives here not in StyleTextData. | 219 // non-inherited text stuff lives here not in StyleTextData. |
219 SVGLength baselineShiftValue; | 220 RefPtr<SVGLength> baselineShiftValue; |
220 | 221 |
221 private: | 222 private: |
222 StyleMiscData(); | 223 StyleMiscData(); |
223 StyleMiscData(const StyleMiscData&); | 224 StyleMiscData(const StyleMiscData&); |
224 }; | 225 }; |
225 | 226 |
226 // Non-inherited resources | 227 // Non-inherited resources |
227 class StyleResourceData : public RefCounted<StyleResourceData> { | 228 class StyleResourceData : public RefCounted<StyleResourceData> { |
228 public: | 229 public: |
229 static PassRefPtr<StyleResourceData> create() { return adoptRef(new Styl
eResourceData); } | 230 static PassRefPtr<StyleResourceData> create() { return adoptRef(new Styl
eResourceData); } |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 String markerEnd; | 262 String markerEnd; |
262 | 263 |
263 private: | 264 private: |
264 StyleInheritedResourceData(); | 265 StyleInheritedResourceData(); |
265 StyleInheritedResourceData(const StyleInheritedResourceData&); | 266 StyleInheritedResourceData(const StyleInheritedResourceData&); |
266 }; | 267 }; |
267 | 268 |
268 } // namespace WebCore | 269 } // namespace WebCore |
269 | 270 |
270 #endif // SVGRenderStyleDefs_h | 271 #endif // SVGRenderStyleDefs_h |
OLD | NEW |