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 #if ENABLE(SVG) | 31 #if ENABLE(SVG) |
| 32 #include "Color.h" |
| 33 #include "PlatformString.h" |
32 #include "SVGLength.h" | 34 #include "SVGLength.h" |
33 #include "SVGPaint.h" | |
34 #include "ShadowData.h" | 35 #include "ShadowData.h" |
35 #include <wtf/OwnPtr.h> | 36 #include <wtf/OwnPtr.h> |
36 #include <wtf/PassOwnPtr.h> | 37 #include <wtf/PassOwnPtr.h> |
37 #include <wtf/RefCounted.h> | 38 #include <wtf/RefCounted.h> |
38 #include <wtf/RefPtr.h> | 39 #include <wtf/RefPtr.h> |
39 | 40 |
40 namespace WebCore { | 41 namespace WebCore { |
41 | 42 |
42 enum EBaselineShift { | 43 enum EBaselineShift { |
43 BS_BASELINE, BS_SUB, BS_SUPER, BS_LENGTH | 44 BS_BASELINE, BS_SUB, BS_SUPER, BS_LENGTH |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 91 |
91 class CSSValue; | 92 class CSSValue; |
92 class CSSValueList; | 93 class CSSValueList; |
93 class SVGPaint; | 94 class SVGPaint; |
94 | 95 |
95 // Inherited/Non-Inherited Style Datastructures | 96 // Inherited/Non-Inherited Style Datastructures |
96 class StyleFillData : public RefCounted<StyleFillData> { | 97 class StyleFillData : public RefCounted<StyleFillData> { |
97 public: | 98 public: |
98 static PassRefPtr<StyleFillData> create() { return adoptRef(new StyleFil
lData); } | 99 static PassRefPtr<StyleFillData> create() { return adoptRef(new StyleFil
lData); } |
99 PassRefPtr<StyleFillData> copy() const { return adoptRef(new StyleFillDa
ta(*this)); } | 100 PassRefPtr<StyleFillData> copy() const { return adoptRef(new StyleFillDa
ta(*this)); } |
100 | 101 |
101 bool operator==(const StyleFillData&) const; | 102 bool operator==(const StyleFillData&) const; |
102 bool operator!=(const StyleFillData& other) const | 103 bool operator!=(const StyleFillData& other) const |
103 { | 104 { |
104 return !(*this == other); | 105 return !(*this == other); |
105 } | 106 } |
106 | 107 |
107 float opacity; | 108 float opacity; |
108 SVGPaint::SVGPaintType paintType; | 109 RefPtr<SVGPaint> paint; |
109 Color paintColor; | |
110 String paintUri; | |
111 | 110 |
112 private: | 111 private: |
113 StyleFillData(); | 112 StyleFillData(); |
114 StyleFillData(const StyleFillData&); | 113 StyleFillData(const StyleFillData&); |
115 }; | 114 }; |
116 | 115 |
117 class StyleStrokeData : public RefCounted<StyleStrokeData> { | 116 class StyleStrokeData : public RefCounted<StyleStrokeData> { |
118 public: | 117 public: |
119 static PassRefPtr<StyleStrokeData> create() { return adoptRef(new StyleS
trokeData); } | 118 static PassRefPtr<StyleStrokeData> create() { return adoptRef(new StyleS
trokeData); } |
120 PassRefPtr<StyleStrokeData> copy() const { return adoptRef(new StyleStro
keData(*this)); } | 119 PassRefPtr<StyleStrokeData> copy() const { return adoptRef(new StyleStro
keData(*this)); } |
121 | 120 |
122 bool operator==(const StyleStrokeData&) const; | 121 bool operator==(const StyleStrokeData&) const; |
123 bool operator!=(const StyleStrokeData& other) const | 122 bool operator!=(const StyleStrokeData& other) const |
124 { | 123 { |
125 return !(*this == other); | 124 return !(*this == other); |
126 } | 125 } |
127 | 126 |
128 float opacity; | 127 float opacity; |
129 float miterLimit; | 128 float miterLimit; |
130 | 129 |
131 SVGLength width; | 130 SVGLength width; |
132 SVGLength dashOffset; | 131 SVGLength dashOffset; |
133 Vector<SVGLength> dashArray; | 132 Vector<SVGLength> dashArray; |
134 | 133 |
135 SVGPaint::SVGPaintType paintType; | 134 RefPtr<SVGPaint> paint; |
136 Color paintColor; | |
137 String paintUri; | |
138 | 135 |
139 private: | 136 private: |
140 StyleStrokeData(); | 137 StyleStrokeData(); |
141 StyleStrokeData(const StyleStrokeData&); | 138 StyleStrokeData(const StyleStrokeData&); |
142 }; | 139 }; |
143 | 140 |
144 class StyleStopData : public RefCounted<StyleStopData> { | 141 class StyleStopData : public RefCounted<StyleStopData> { |
145 public: | 142 public: |
146 static PassRefPtr<StyleStopData> create() { return adoptRef(new StyleSto
pData); } | 143 static PassRefPtr<StyleStopData> create() { return adoptRef(new StyleSto
pData); } |
147 PassRefPtr<StyleStopData> copy() const { return adoptRef(new StyleStopDa
ta(*this)); } | 144 PassRefPtr<StyleStopData> copy() const { return adoptRef(new StyleStopDa
ta(*this)); } |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 String markerEnd; | 255 String markerEnd; |
259 | 256 |
260 private: | 257 private: |
261 StyleInheritedResourceData(); | 258 StyleInheritedResourceData(); |
262 StyleInheritedResourceData(const StyleInheritedResourceData&); | 259 StyleInheritedResourceData(const StyleInheritedResourceData&); |
263 }; | 260 }; |
264 | 261 |
265 } // namespace WebCore | 262 } // namespace WebCore |
266 | 263 |
267 #endif // ENABLE(SVG) | 264 #endif // ENABLE(SVG) |
| 265 |
268 #endif // SVGRenderStyleDefs_h | 266 #endif // SVGRenderStyleDefs_h |
OLD | NEW |