Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: Source/core/rendering/style/SVGRenderStyle.cpp

Issue 14907011: Support 'paint-order' from SVG2. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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, 2010 Rob Buis <buis@kde.org> 3 2004, 2005, 2010 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) 1999 Antti Koivisto (koivisto@kde.org) 7 Copyright (C) 1999 Antti Koivisto (koivisto@kde.org)
8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org) 8 Copyright (C) 1999-2003 Lars Knoll (knoll@kde.org)
9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org) 9 Copyright (C) 2002-2003 Dirk Mueller (mueller@kde.org)
10 Copyright (C) 2002 Apple Computer, Inc. 10 Copyright (C) 2002 Apple Computer, Inc.
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
225 225
226 if (svg_noninherited_flags.f.bufferedRendering != other->svg_noninherited_fl ags.f.bufferedRendering) 226 if (svg_noninherited_flags.f.bufferedRendering != other->svg_noninherited_fl ags.f.bufferedRendering)
227 return StyleDifferenceRepaint; 227 return StyleDifferenceRepaint;
228 228
229 if (svg_noninherited_flags.f.maskType != other->svg_noninherited_flags.f.mas kType) 229 if (svg_noninherited_flags.f.maskType != other->svg_noninherited_flags.f.mas kType)
230 return StyleDifferenceRepaint; 230 return StyleDifferenceRepaint;
231 231
232 return StyleDifferenceEqual; 232 return StyleDifferenceEqual;
233 } 233 }
234 234
235 EPaintOrder SVGRenderStyle::paintOrder(int index) const
236 {
237 ASSERT(index >= 0 && index < 3);
238 EPaintOrder po = paintOrder();
239 switch(index)
240 {
241 case 0:
242 switch(po)
243 {
244 case PO_FILL:
245 case PO_FILL_STROKE:
246 case PO_FILL_MARKERS:
247 case PO_FILL_MARKERS_STROKE:
248 case PO_NORMAL:
249 return PO_FILL;
250 case PO_STROKE:
251 case PO_STROKE_FILL:
252 case PO_STROKE_MARKERS:
253 case PO_STROKE_MARKERS_FILL:
254 case PO_STROKE_FILL_MARKERS:
255 return PO_STROKE;
256 case PO_MARKERS:
257 case PO_MARKERS_FILL:
258 case PO_MARKERS_STROKE:
259 case PO_MARKERS_FILL_STROKE:
260 case PO_MARKERS_STROKE_FILL:
261 return PO_MARKERS;
262 }
263 case 1:
264 switch(po)
265 {
266 case PO_STROKE:
267 case PO_STROKE_FILL:
268 case PO_MARKERS:
269 case PO_MARKERS_FILL:
270 case PO_MARKERS_FILL_STROKE:
271 case PO_STROKE_FILL_MARKERS:
272 return PO_FILL;
273 case PO_FILL:
274 case PO_FILL_STROKE:
275 case PO_MARKERS_STROKE:
276 case PO_MARKERS_STROKE_FILL:
277 case PO_NORMAL:
278 return PO_STROKE;
279 case PO_FILL_MARKERS:
280 case PO_FILL_MARKERS_STROKE:
281 case PO_STROKE_MARKERS:
282 case PO_STROKE_MARKERS_FILL:
283 return PO_MARKERS;
284 }
285 case 2:
286 switch(po)
287 {
288 case PO_STROKE_MARKERS:
289 case PO_STROKE_MARKERS_FILL:
290 case PO_MARKERS_STROKE:
291 case PO_MARKERS_STROKE_FILL:
292 return PO_FILL;
293 case PO_FILL_MARKERS:
294 case PO_FILL_MARKERS_STROKE:
295 case PO_MARKERS:
296 case PO_MARKERS_FILL:
297 case PO_MARKERS_FILL_STROKE:
298 return PO_STROKE;
299 case PO_FILL:
300 case PO_FILL_STROKE:
301 case PO_STROKE:
302 case PO_STROKE_FILL:
303 case PO_STROKE_FILL_MARKERS:
304 case PO_NORMAL:
305 return PO_MARKERS;
f(malita) 2013/05/03 14:36:25 Is there a better way to encode these internally?
pdr. 2013/05/03 17:58:29 +1 to Florin's idea. Using an int here is not easy
Erik Dahlström (inactive) 2013/06/03 15:58:24 If we can live with normalizing the paintorder her
306 }
307 }
308
309 ASSERT_NOT_REACHED();
310 return PO_FILL;
311 }
312
235 } 313 }
236 314
237 #endif // ENABLE(SVG) 315 #endif // ENABLE(SVG)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698