| 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, 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |