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

Side by Side Diff: Source/core/layout/style/SVGLayoutStyle.cpp

Issue 1001833002: Rename default -> initial style and use singletons. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyle.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 15 matching lines...) Expand all
26 */ 26 */
27 27
28 #include "config.h" 28 #include "config.h"
29 29
30 #include "core/layout/style/SVGLayoutStyle.h" 30 #include "core/layout/style/SVGLayoutStyle.h"
31 31
32 namespace blink { 32 namespace blink {
33 33
34 SVGLayoutStyle::SVGLayoutStyle() 34 SVGLayoutStyle::SVGLayoutStyle()
35 { 35 {
36 static SVGLayoutStyle* defaultStyle = new SVGLayoutStyle(CreateDefault); 36 static SVGLayoutStyle* initialStyle = new SVGLayoutStyle(CreateInitial);
37 37
38 fill = defaultStyle->fill; 38 fill = initialStyle->fill;
39 stroke = defaultStyle->stroke; 39 stroke = initialStyle->stroke;
40 stops = defaultStyle->stops; 40 stops = initialStyle->stops;
41 misc = defaultStyle->misc; 41 misc = initialStyle->misc;
42 inheritedResources = defaultStyle->inheritedResources; 42 inheritedResources = initialStyle->inheritedResources;
43 layout = defaultStyle->layout; 43 layout = initialStyle->layout;
44 resources = defaultStyle->resources; 44 resources = initialStyle->resources;
45 45
46 setBitDefaults(); 46 setBitDefaults();
47 } 47 }
48 48
49 SVGLayoutStyle::SVGLayoutStyle(CreateDefaultType) 49 SVGLayoutStyle::SVGLayoutStyle(CreateInitialType)
50 { 50 {
51 setBitDefaults(); 51 setBitDefaults();
52 52
53 fill.init(); 53 fill.init();
54 stroke.init(); 54 stroke.init();
55 stops.init(); 55 stops.init();
56 misc.init(); 56 misc.init();
57 inheritedResources.init(); 57 inheritedResources.init();
58 layout.init(); 58 layout.init();
59 resources.init(); 59 resources.init();
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 } 249 }
250 250
251 EPaintOrderType SVGLayoutStyle::paintOrderType(unsigned index) const 251 EPaintOrderType SVGLayoutStyle::paintOrderType(unsigned index) const
252 { 252 {
253 ASSERT(index < ((1 << kPaintOrderBitwidth)-1)); 253 ASSERT(index < ((1 << kPaintOrderBitwidth)-1));
254 unsigned pt = (paintOrder() >> (kPaintOrderBitwidth*index)) & ((1u << kPaint OrderBitwidth) - 1); 254 unsigned pt = (paintOrder() >> (kPaintOrderBitwidth*index)) & ((1u << kPaint OrderBitwidth) - 1);
255 return (EPaintOrderType)pt; 255 return (EPaintOrderType)pt;
256 } 256 }
257 257
258 } 258 }
OLDNEW
« no previous file with comments | « Source/core/layout/style/SVGLayoutStyle.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698