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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 LayoutSVGResourceClipper* clipper() const { return m_clipperFilterMaskerData
? m_clipperFilterMaskerData->clipper : 0; } | 53 LayoutSVGResourceClipper* clipper() const { return m_clipperFilterMaskerData
? m_clipperFilterMaskerData->clipper : 0; } |
54 LayoutSVGResourceMarker* markerStart() const { return m_markerData ? m_marke
rData->markerStart : 0; } | 54 LayoutSVGResourceMarker* markerStart() const { return m_markerData ? m_marke
rData->markerStart : 0; } |
55 LayoutSVGResourceMarker* markerMid() const { return m_markerData ? m_markerD
ata->markerMid : 0; } | 55 LayoutSVGResourceMarker* markerMid() const { return m_markerData ? m_markerD
ata->markerMid : 0; } |
56 LayoutSVGResourceMarker* markerEnd() const { return m_markerData ? m_markerD
ata->markerEnd : 0; } | 56 LayoutSVGResourceMarker* markerEnd() const { return m_markerData ? m_markerD
ata->markerEnd : 0; } |
57 LayoutSVGResourceMasker* masker() const { return m_clipperFilterMaskerData ?
m_clipperFilterMaskerData->masker : 0; } | 57 LayoutSVGResourceMasker* masker() const { return m_clipperFilterMaskerData ?
m_clipperFilterMaskerData->masker : 0; } |
58 | 58 |
59 LayoutSVGResourceFilter* filter() const | 59 LayoutSVGResourceFilter* filter() const |
60 { | 60 { |
61 if (m_clipperFilterMaskerData) | 61 if (m_clipperFilterMaskerData) |
62 return m_clipperFilterMaskerData->filter; | 62 return m_clipperFilterMaskerData->filter; |
63 return 0; | 63 return nullptr; |
64 } | 64 } |
65 | 65 |
66 // Paint servers | 66 // Paint servers |
67 LayoutSVGResourcePaintServer* fill() const { return m_fillStrokeData ? m_fil
lStrokeData->fill : 0; } | 67 LayoutSVGResourcePaintServer* fill() const { return m_fillStrokeData ? m_fil
lStrokeData->fill : 0; } |
68 LayoutSVGResourcePaintServer* stroke() const { return m_fillStrokeData ? m_f
illStrokeData->stroke : 0; } | 68 LayoutSVGResourcePaintServer* stroke() const { return m_fillStrokeData ? m_f
illStrokeData->stroke : 0; } |
69 | 69 |
70 // Chainable resources - linked through xlink:href | 70 // Chainable resources - linked through xlink:href |
71 LayoutSVGResourceContainer* linkedResource() const { return m_linkedResource
; } | 71 LayoutSVGResourceContainer* linkedResource() const { return m_linkedResource
; } |
72 | 72 |
73 void buildSetOfResources(HashSet<LayoutSVGResourceContainer*>&); | 73 void buildSetOfResources(HashSet<LayoutSVGResourceContainer*>&); |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // From SVG 1.1 2nd Edition | 109 // From SVG 1.1 2nd Edition |
110 // clipper: 'container elements' and 'graphics elements' | 110 // clipper: 'container elements' and 'graphics elements' |
111 // filter: 'container elements' and 'graphics elements' | 111 // filter: 'container elements' and 'graphics elements' |
112 // masker: 'container elements' and 'graphics elements' | 112 // masker: 'container elements' and 'graphics elements' |
113 // -> a, circle, defs, ellipse, glyph, g, image, line, marker, mask, missing
-glyph, path, pattern, polygon, polyline, rect, svg, switch, symbol, text, use | 113 // -> a, circle, defs, ellipse, glyph, g, image, line, marker, mask, missing
-glyph, path, pattern, polygon, polyline, rect, svg, switch, symbol, text, use |
114 struct ClipperFilterMaskerData { | 114 struct ClipperFilterMaskerData { |
115 WTF_MAKE_FAST_ALLOCATED(ClipperFilterMaskerData); | 115 WTF_MAKE_FAST_ALLOCATED(ClipperFilterMaskerData); |
116 public: | 116 public: |
117 ClipperFilterMaskerData() | 117 ClipperFilterMaskerData() |
118 : clipper(0) | 118 : clipper(nullptr) |
119 , filter(0) | 119 , filter(nullptr) |
120 , masker(0) | 120 , masker(nullptr) |
121 { | 121 { |
122 } | 122 } |
123 | 123 |
124 static PassOwnPtr<ClipperFilterMaskerData> create() | 124 static PassOwnPtr<ClipperFilterMaskerData> create() |
125 { | 125 { |
126 return adoptPtr(new ClipperFilterMaskerData); | 126 return adoptPtr(new ClipperFilterMaskerData); |
127 } | 127 } |
128 | 128 |
129 LayoutSVGResourceClipper* clipper; | 129 LayoutSVGResourceClipper* clipper; |
130 LayoutSVGResourceFilter* filter; | 130 LayoutSVGResourceFilter* filter; |
131 LayoutSVGResourceMasker* masker; | 131 LayoutSVGResourceMasker* masker; |
132 }; | 132 }; |
133 | 133 |
134 // From SVG 1.1 2nd Edition | 134 // From SVG 1.1 2nd Edition |
135 // marker: line, path, polygon, polyline | 135 // marker: line, path, polygon, polyline |
136 struct MarkerData { | 136 struct MarkerData { |
137 WTF_MAKE_FAST_ALLOCATED(MarkerData); | 137 WTF_MAKE_FAST_ALLOCATED(MarkerData); |
138 public: | 138 public: |
139 MarkerData() | 139 MarkerData() |
140 : markerStart(0) | 140 : markerStart(nullptr) |
141 , markerMid(0) | 141 , markerMid(nullptr) |
142 , markerEnd(0) | 142 , markerEnd(nullptr) |
143 { | 143 { |
144 } | 144 } |
145 | 145 |
146 static PassOwnPtr<MarkerData> create() | 146 static PassOwnPtr<MarkerData> create() |
147 { | 147 { |
148 return adoptPtr(new MarkerData); | 148 return adoptPtr(new MarkerData); |
149 } | 149 } |
150 | 150 |
151 LayoutSVGResourceMarker* markerStart; | 151 LayoutSVGResourceMarker* markerStart; |
152 LayoutSVGResourceMarker* markerMid; | 152 LayoutSVGResourceMarker* markerMid; |
153 LayoutSVGResourceMarker* markerEnd; | 153 LayoutSVGResourceMarker* markerEnd; |
154 }; | 154 }; |
155 | 155 |
156 // From SVG 1.1 2nd Edition | 156 // From SVG 1.1 2nd Edition |
157 // fill: 'shapes' and 'text content elements' | 157 // fill: 'shapes' and 'text content elements' |
158 // stroke: 'shapes' and 'text content elements' | 158 // stroke: 'shapes' and 'text content elements' |
159 // -> circle, ellipse, line, path, polygon, polyline, rect, text, textPath,
tspan | 159 // -> circle, ellipse, line, path, polygon, polyline, rect, text, textPath,
tspan |
160 struct FillStrokeData { | 160 struct FillStrokeData { |
161 WTF_MAKE_FAST_ALLOCATED(FillStrokeData); | 161 WTF_MAKE_FAST_ALLOCATED(FillStrokeData); |
162 public: | 162 public: |
163 FillStrokeData() | 163 FillStrokeData() |
164 : fill(0) | 164 : fill(nullptr) |
165 , stroke(0) | 165 , stroke(nullptr) |
166 { | 166 { |
167 } | 167 } |
168 | 168 |
169 static PassOwnPtr<FillStrokeData> create() | 169 static PassOwnPtr<FillStrokeData> create() |
170 { | 170 { |
171 return adoptPtr(new FillStrokeData); | 171 return adoptPtr(new FillStrokeData); |
172 } | 172 } |
173 | 173 |
174 LayoutSVGResourcePaintServer* fill; | 174 LayoutSVGResourcePaintServer* fill; |
175 LayoutSVGResourcePaintServer* stroke; | 175 LayoutSVGResourcePaintServer* stroke; |
176 }; | 176 }; |
177 | 177 |
178 OwnPtr<ClipperFilterMaskerData> m_clipperFilterMaskerData; | 178 OwnPtr<ClipperFilterMaskerData> m_clipperFilterMaskerData; |
179 OwnPtr<MarkerData> m_markerData; | 179 OwnPtr<MarkerData> m_markerData; |
180 OwnPtr<FillStrokeData> m_fillStrokeData; | 180 OwnPtr<FillStrokeData> m_fillStrokeData; |
181 LayoutSVGResourceContainer* m_linkedResource; | 181 LayoutSVGResourceContainer* m_linkedResource; |
182 }; | 182 }; |
183 | 183 |
184 } | 184 } |
185 | 185 |
186 #endif | 186 #endif |
OLD | NEW |