OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
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 |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 // missing-glyph, path, pattern, polygon, polyline, rect, svg, switch, symbol, | 133 // missing-glyph, path, pattern, polygon, polyline, rect, svg, switch, symbol, |
134 // text, use | 134 // text, use |
135 struct ClipperFilterMaskerData { | 135 struct ClipperFilterMaskerData { |
136 USING_FAST_MALLOC(ClipperFilterMaskerData); | 136 USING_FAST_MALLOC(ClipperFilterMaskerData); |
137 | 137 |
138 public: | 138 public: |
139 ClipperFilterMaskerData() | 139 ClipperFilterMaskerData() |
140 : clipper(nullptr), filter(nullptr), masker(nullptr) {} | 140 : clipper(nullptr), filter(nullptr), masker(nullptr) {} |
141 | 141 |
142 static std::unique_ptr<ClipperFilterMaskerData> create() { | 142 static std::unique_ptr<ClipperFilterMaskerData> create() { |
143 return wrapUnique(new ClipperFilterMaskerData); | 143 return WTF::wrapUnique(new ClipperFilterMaskerData); |
144 } | 144 } |
145 | 145 |
146 LayoutSVGResourceClipper* clipper; | 146 LayoutSVGResourceClipper* clipper; |
147 LayoutSVGResourceFilter* filter; | 147 LayoutSVGResourceFilter* filter; |
148 LayoutSVGResourceMasker* masker; | 148 LayoutSVGResourceMasker* masker; |
149 }; | 149 }; |
150 | 150 |
151 // From SVG 1.1 2nd Edition | 151 // From SVG 1.1 2nd Edition |
152 // marker: line, path, polygon, polyline | 152 // marker: line, path, polygon, polyline |
153 struct MarkerData { | 153 struct MarkerData { |
154 USING_FAST_MALLOC(MarkerData); | 154 USING_FAST_MALLOC(MarkerData); |
155 | 155 |
156 public: | 156 public: |
157 MarkerData() | 157 MarkerData() |
158 : markerStart(nullptr), markerMid(nullptr), markerEnd(nullptr) {} | 158 : markerStart(nullptr), markerMid(nullptr), markerEnd(nullptr) {} |
159 | 159 |
160 static std::unique_ptr<MarkerData> create() { | 160 static std::unique_ptr<MarkerData> create() { |
161 return wrapUnique(new MarkerData); | 161 return WTF::wrapUnique(new MarkerData); |
162 } | 162 } |
163 | 163 |
164 LayoutSVGResourceMarker* markerStart; | 164 LayoutSVGResourceMarker* markerStart; |
165 LayoutSVGResourceMarker* markerMid; | 165 LayoutSVGResourceMarker* markerMid; |
166 LayoutSVGResourceMarker* markerEnd; | 166 LayoutSVGResourceMarker* markerEnd; |
167 }; | 167 }; |
168 | 168 |
169 // From SVG 1.1 2nd Edition | 169 // From SVG 1.1 2nd Edition |
170 // fill: 'shapes' and 'text content elements' | 170 // fill: 'shapes' and 'text content elements' |
171 // stroke: 'shapes' and 'text content elements' | 171 // stroke: 'shapes' and 'text content elements' |
172 // -> circle, ellipse, line, path, polygon, polyline, rect, text, textPath, | 172 // -> circle, ellipse, line, path, polygon, polyline, rect, text, textPath, |
173 // tspan | 173 // tspan |
174 struct FillStrokeData { | 174 struct FillStrokeData { |
175 USING_FAST_MALLOC(FillStrokeData); | 175 USING_FAST_MALLOC(FillStrokeData); |
176 | 176 |
177 public: | 177 public: |
178 FillStrokeData() : fill(nullptr), stroke(nullptr) {} | 178 FillStrokeData() : fill(nullptr), stroke(nullptr) {} |
179 | 179 |
180 static std::unique_ptr<FillStrokeData> create() { | 180 static std::unique_ptr<FillStrokeData> create() { |
181 return wrapUnique(new FillStrokeData); | 181 return WTF::wrapUnique(new FillStrokeData); |
182 } | 182 } |
183 | 183 |
184 LayoutSVGResourcePaintServer* fill; | 184 LayoutSVGResourcePaintServer* fill; |
185 LayoutSVGResourcePaintServer* stroke; | 185 LayoutSVGResourcePaintServer* stroke; |
186 }; | 186 }; |
187 | 187 |
188 std::unique_ptr<ClipperFilterMaskerData> m_clipperFilterMaskerData; | 188 std::unique_ptr<ClipperFilterMaskerData> m_clipperFilterMaskerData; |
189 std::unique_ptr<MarkerData> m_markerData; | 189 std::unique_ptr<MarkerData> m_markerData; |
190 std::unique_ptr<FillStrokeData> m_fillStrokeData; | 190 std::unique_ptr<FillStrokeData> m_fillStrokeData; |
191 LayoutSVGResourceContainer* m_linkedResource; | 191 LayoutSVGResourceContainer* m_linkedResource; |
192 }; | 192 }; |
193 | 193 |
194 } // namespace blink | 194 } // namespace blink |
195 | 195 |
196 #endif | 196 #endif |
OLD | NEW |